search for: addressofreturninstruction

Displaying 1 result from an estimated 1 matches for "addressofreturninstruction".

2018 Jan 12
0
best way to represent this pseudocode in LLVM IR?
...br label %ReturnError, !dbg !70 ReturnError: ; preds = %Entry ret i16 1, !dbg !70 } Everywhere that we can return an error from a function, we generate code like this. Here it is in pseudocode form: stack_trace_ptr.addresses[stack_trace_ptr.index % 31] = addressOfReturnInstruction; stack_trace_ptr.index += 1; return error_code; I'd like to try to extract some of this out to make a smaller binary size. If we extract pseudocode into a function: %0 = tail call func(ptr, addressOfReturnInstruction, error_code); return %0; func(ptr, address, error_code) { ptr.addresses[...