Displaying 4 results from an estimated 4 matches for "eh_dwarf_cfa".
2018 Mar 14
0
What is __builtin_dwarf_cfa()?
Hi All,
While compiling libgcc with LLVM for our target, it seems I don't
get __builtin_dwarf_cfa() right. That causes uw_init_context_1 [1]
initialize the wrong context, and the overall exception handling fail.
I find Hal provided patch years ago adding ISD::EH_DWARF_CFA, which
corresponding to __builtin_dwarf_cfa(), and let us have the
opportunity to handle __builtin_dwarf_cfa() for our own [2].
I copy Mips' lowerEH_DWARF_CFA for our target, and it *just* works
[3]. I have to admit that I don't understand what Hal explained in his
patch, also don't...
2007 Aug 22
0
[LLVMdev] RFC: Patch for CFA on Darwin
...lvm-convert.cpp (revision 41260)
+++ llvm-convert.cpp (working copy)
@@ -4240,11 +4240,12 @@
return false;
int cfa_offset = ARG_POINTER_CFA_OFFSET(0);
-
- Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
- Intrinsic::eh_dwarf_cfa),
- ConstantInt::get(Type::Int32Ty, cfa_offset));
-
+ Result =
+ Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
+ Intrinsic::eh_dwarf_cfa),
+ Builder.CreateIntToPtr(ConstantInt::get(Type:...
2007 Aug 22
1
[LLVMdev] RFC: Patch for CFA on Darwin
...was adding an offset of type i32 to a pointer. This is
> fine if pointers are 32-bits, but we get an assert if the types are
> different. By converting the cfa_offset to a pointer, we get it to be
> that size.
Please ignore my prev. e-mail. The code breaks at least 32-bit stuff.
The arg of eh_dwarf_cfa is i32, how it can be pointer?
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
2007 Aug 23
1
[LLVMdev] RFC: Patch for CFA on Darwin
Bill,
> The built-in dwarf_cfa doesn't take an argument. It returns a pointer.
Ah. Sorry for confusion:
gcc's __builtin_draft_cfa doesn't have any argument
LLVM's eh_dwarf_cfa intrinsic has extra "offset" argument, which is
i32, because we have to propagate some information from GCC to LLVM.
> But there's an offset associated with the CFA. So it looks like LLVM
> is taking the pointer and adding the offset to it to synthesize what
> GCC is doing....