Displaying 1 result from an estimated 1 matches for "stack_trace_ptr".
2018 Jan 12
0
best way to represent this pseudocode in LLVM IR?
...1, !dbg !70
store i64 %6, i64* %1, align 8, !dbg !70
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_c...