diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-12-31 14:08:47 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-12-31 14:08:47 -0800 |
commit | d7331c70ead9e7b511f35a1825a4715b3bfad448 (patch) | |
tree | d9b51d83eb034aebe74a9f266c40ccef3fe6feda /backend_x86.c | |
parent | f34bb0f36e058fc744546a33ed41c08c4954feca (diff) |
Fix accidental add to RSP with SZ_D and SZ_PTR. Using SZ_D breakse when the stack is located outside of the 32-bit addressable range
Diffstat (limited to 'backend_x86.c')
-rw-r--r-- | backend_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend_x86.c b/backend_x86.c index 614df1b..9458499 100644 --- a/backend_x86.c +++ b/backend_x86.c @@ -244,7 +244,7 @@ code_ptr gen_mem_fun(cpu_options * opts, memmap_chunk const * memmap, uint32_t n if (is_write && (memmap[chunk].flags & MMAP_CODE)) { pop_r(code, opts->scratch2); } else { - add_ir(code, sizeof(void*), RSP, SZ_D); + add_ir(code, sizeof(void*), RSP, SZ_PTR); code->stack_off -= sizeof(void *); } } else { |