File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
3131// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
32- State __remill_state;
32+ extern " C " State __remill_state;
3333
3434#define REG_PC state.gpr.r15.dword
3535#define REG_LR state.gpr.r14.dword
Original file line number Diff line number Diff line change 2929
3030// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
3131// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
32- State __remill_state;
32+ extern " C " State __remill_state;
3333
3434#define REG_PC state.gpr.pc.qword
3535#define REG_SP state.gpr.sp.qword
Original file line number Diff line number Diff line change 2121
2222// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
2323// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004f
24- State __remill_state;
24+ extern " C " State __remill_state;
2525
2626#define HYPER_CALL state.hyper_call
2727
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ extern "C" void __remill_mark_as_used(const void *);
2929
3030// Each architecture's semantics module defines this variable
3131// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
32- extern State __remill_state;
32+ extern " C " State __remill_state;
3333
3434#if defined(REMILL_ON_SPARC32) || defined(REMILL_ON_SPARC64)
3535extern RegisterWindow __remill_register_window;
Original file line number Diff line number Diff line change 2525
2626// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
2727// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
28- State __remill_state;
28+ extern " C " State __remill_state;
2929
3030#define REG_PC state.pc.aword
3131#define REG_NPC state.next_pc.aword
Original file line number Diff line number Diff line change 2525
2626// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
2727// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
28- State __remill_state;
28+ extern " C " State __remill_state;
2929
3030#define REG_PC state.pc.aword
3131#define REG_NPC state.next_pc.aword
Original file line number Diff line number Diff line change 2929
3030// A definition is required to ensure that LLVM doesn't optimize the `State` type out of the bytecode
3131// See https://github.com/lifting-bits/remill/pull/631#issuecomment-1279989004
32- State __remill_state;
32+ extern " C " State __remill_state;
3333
3434#define REG_IP state.gpr.rip.word
3535#define REG_EIP state.gpr.rip.dword
You can’t perform that action at this time.
0 commit comments