I seem to relearn blr != return once every month or so.

This commit is contained in:
Ben Vanik
2014-02-02 14:35:16 -08:00
parent 2d65bea0ea
commit ef5f59ed0b
15 changed files with 67 additions and 13 deletions

View File

@@ -105,7 +105,7 @@ void IVMFunction::OnBreakpointHit(ThreadState* thread_state, IntCode* i) {
#undef TRACE_SOURCE_OFFSET
int IVMFunction::CallImpl(ThreadState* thread_state) {
int IVMFunction::CallImpl(ThreadState* thread_state, uint64_t return_address) {
// Setup register file on stack.
auto stack = (IVMStack*)thread_state->backend_data();
auto register_file = (Register*)stack->Alloc(register_count_);
@@ -122,6 +122,8 @@ int IVMFunction::CallImpl(ThreadState* thread_state) {
ics.did_saturate = 0;
ics.access_callbacks = thread_state->runtime()->access_callbacks();
ics.thread_state = thread_state;
ics.return_address = return_address;
ics.call_return_address = 0;
volatile int* suspend_flag_address = thread_state->suspend_flag_address();