similar to: [LLVMdev] How to initiate/throw an exception (resume just continues)

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] How to initiate/throw an exception (resume just continues)"

2013 Mar 29
0
[LLVMdev] How to initiate/throw an exception (resume just continues)
On 29 Mar 2013, at 17:15, edA-qa mort-ora-y <eda-qa at disemia.com> wrote: > I'm trying to add some basic exception handling to my language now and > I'm uncertain of how I actually start the exception propagation. It > appears that "resume" will continue the exception, but I see no mention > of how the exception actually starts. > > If I look at the IR
2013 Mar 29
1
[LLVMdev] How to initiate/throw an exception (resume just continues)
On 29/03/13 18:34, David Chisnall wrote: > handlers, and so on), and a generic structure for the unwind library. > It then passes it to _Unwind_RaiseException(), which is the generic > unwind routine. Excuse me if this sounds silly, but what "library" does the _Unwind_ series of functions come from? Is this a kind of target ABI instrinsic library, or must I link with a
2013 Apr 11
4
[LLVMdev] object file/linking is missing my exception handlers
I have some exception handling which works fine using the JIT. Now I am producing object files and linking them, but the exception handling tables seem to be missing. I call _Unwind_RaiseException and get _URC_END_OF_STACK as a result. I produce my object file using TargetMachine::addPassesToEmitFile and then I link my resulting files with: gcc -o prog input.o -fexceptions I'm sure I'm
2013 Apr 12
0
[LLVMdev] object file/linking is missing my exception handlers
I can confirm now that my personality handler is invoked (I call setHasUWTable on the functions now, but I'm not sure if that was the difference). In any case it appears the behaviour of the tables/handling is slightly different between the JIT and GCC linked. I'm trying to figure out what this is now. On 11/04/13 06:06, edA-qa mort-ora-y wrote: > I have some exception handling which
2013 Oct 17
4
[LLVMdev] post-link Dwarf information appears wrong, works in JIT
I'm working on exception handling and having some trouble with type information. My personality/types work fine when running in the JIT, but when I produce object files and link them it fails. In particular, from an action record and the LSDA I get a type table entry. The problem is this doesn't appear to be pointing to a valid location. If I derefence it a segfault occurs. Are there
2013 Nov 09
4
[LLVMdev] Error "Cannot emit physreg copy instruction"
I'm getting an error that I don't know how to fix. I've isolated the input as much as I easily can. I've attached the file that produces the problem. Just calling "llc err.ll -o err.s" generates the error. I'm going to try and isolate even further, but as I'm not sure what I'm looking for I don't know if I'll be successful. Does anybody know what this
2013 Oct 18
1
[LLVMdev] mixing PIC/static with exception handling
I was having problems with my exception handling due to mixing PIC and non-PIC code into my executable. Now I'm confused as to how I'm supposed to do this correctly when I do have to mix different code types. The basic setup: - shared library which throws and catches exceptions, some exceptions leave it's library bounds - main executable which throws and catches exceptions, exceptions
2013 Apr 25
4
[LLVMdev] trouble understanding value in dwarf exception mechanism
I'm having trouble understanding the value in the way exceptions are handled on Linux, the dwarf/system V ABI exception spec. The mechanism allows for both cleanup routines and catch handlers, where by cleanup handlers don't stop the search for a normal handler. The personality function (I guess no longer part of the standard, but a C++ thing) can also compare types of the landingpads.
2013 Mar 31
2
[LLVMdev] landingpad catch types not making it to Dwarf tables
I am having some trouble getting my catch clauses to appear as expected in the dwarf exception tables. I have an instruction like this: %0 = landingpad i64 personality i32 (i32, i32, i64, i8*, i8*)* @leaf_exception_personality catch i8* inttoptr (i64 987 to i8*) catch i8* inttoptr (i64 2453 to i8*) In my exception handler I walk through the records. I always get the correct
2013 Jan 31
2
[LLVMdev] multiple LLVMContext or just one?
When building multiple modules should I be using multiple LLVMContext's or just one of them shared between the modules? I'm a little bit uncertain in regards to how the types work. The IR type checking appears to check exact ptrs for equality so how would multiple contexts actually work? Or is the type checking limited to within a given module? -- edA-qa mort-ora-y -- -- -- -- -- -- --
2013 Apr 11
0
[LLVMdev] object file/linking is missing my exception handlers
Hi, On 11/04/13 06:06, edA-qa mort-ora-y wrote: > I have some exception handling which works fine using the JIT. Now I am > producing object files and linking them, but the exception handling > tables seem to be missing. I call _Unwind_RaiseException and get > _URC_END_OF_STACK as a result. you will get this if no catch clauses match (eg because there are no catch clauses, perhaps
2013 Nov 09
0
[LLVMdev] Error "Cannot emit physreg copy instruction"
I've reduced the example down to a minimum. The error is quite perplexing since the IR appears fine. It is a nonsensical infinite loop now, but that shouldn't be a problem. declare i64 @leaf_exception_personality(i64, i32, i64, i8*, i8*) declare i8* @count_malloc(i64) define internal i8 @junk___init_module_get_args_3() #0 { entry: %_exception = alloca { i8*, i64 } %ignore0 = invoke
2013 Mar 31
2
[LLVMdev] custom landingpad data, not dwarf encoded clauses?
How would I go about getting a custom data format stored at the exception landing pads (the location _Unwind_GetLanguageSpecificData returns)? The Dwarf encoded format is not well suited for the type of exception handling I wish to do in my language. Will this be possible, or is exception handling mechanism so tightly tied to the Dwarf format that it would be extremely difficult? -- edA-qa
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
That makes it more mysterious then since I am indeed only calling a main function. Perhaps I have to invoke it a different way. Here's my call I have now: auto main = linker->getModule()->getFunction( "main" ); std::vector<llvm::GenericValue> args(2); args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 ); args[1].PointerVal = nullptr; llvm::GenericValue gv =
2013 Oct 18
2
[LLVMdev] post-link Dwarf information appears wrong, works in JIT
On Oct 17, 2013, at 9:37 PM, edA-qa mort-ora-y <eda-qa at disemia.com> wrote: > I added several more clauses to see the result. It looks like the > landing pad information is generated correctly: I get the correct number > of action records, each record has a reasonable index into the type > table (from 1 to 9). The encoded address increment in 4 however, which > is
2012 Nov 11
4
[LLVMdev] IR sizeof?
Is there a way to get the size of a type in the IR assembly code? I know the size must be known since alloca and getelementptr both implicitly use it, but I don't see any way to get access to the size directly. I know my final compiler will have to get the size itself, but I'm just doing some simple tests directly in assembly now and am hoping there is an easy way to get the size of a
2013 Nov 08
1
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
It was the return type which was i64. I changed it also to my abi_int_size and it works now. I have to take care of a few other type translations, but it looks like MCJIT is working now. Thank you. On 08/11/13 18:12, Yaron Keren wrote: > Something must be wrong with the Function Type. Try to debug into > runFunction to see which if condition fails. > Just a guess, if this is on 64
2018 Apr 18
3
Why does clang do a memcpy? Is the cast not enough? (ABI function args)
Yes, but why is it even copying the memory?  It already has a pointer which it can cast and load from -- and does so in other scenarios. I'm wondering whether this copying is somehow required and I'm missing something, or it's just an artifact of the clang emitter. That is, could it not omit the memcpy and cast the original variable? On 18/04/18 19:43, Krzysztof Parzyszek via
2018 Apr 18
4
A struct {i8,i64} has size == 12, clang says size 16
I'm creating a struct of `{i8,i64}` and `DataLayout::getTypeAllocSize` is returning `12`. `getStructLayout` also gives an `4` offset for the second element. The native ABI, and clang, for the same type are producing a size of 16, with an alignment of 8, for the second element. This is for the system triple "x86_64-linux-gnu" What could be causing this difference in alignment and
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
Something must be wrong with the Function Type. Try to debug into runFunction to see which if condition fails. Just a guess, if this is on 64 bit system the first argument type may be int64 but needs to be int32. Yaron 2013/11/8 edA-qa mort-ora-y <eda-qa at disemia.com> > That makes it more mysterious then since I am indeed only calling a main > function. Perhaps I have to invoke