Mercurial > repos > blastem
comparison backend_x86.c @ 894:a7774fc2de4b
Partially working change to do proper stack alignment rather than doing a lame alignment check when calling a C compile dfunction. 68K core seems okay, but Z80 is busted.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 25 Nov 2015 08:40:45 -0800 |
parents | 381a3b2f6065 |
children | 1f09994e92c5 |
comparison
equal
deleted
inserted
replaced
893:4f46b4cd5035 | 894:a7774fc2de4b |
---|---|
171 mov_rrind(code, opts->scratch1, opts->scratch2, tmp_size); | 171 mov_rrind(code, opts->scratch1, opts->scratch2, tmp_size); |
172 if (is_write && (memmap[chunk].flags & MMAP_CODE)) { | 172 if (is_write && (memmap[chunk].flags & MMAP_CODE)) { |
173 pop_r(code, opts->scratch2); | 173 pop_r(code, opts->scratch2); |
174 } else { | 174 } else { |
175 add_ir(code, sizeof(void*), RSP, SZ_D); | 175 add_ir(code, sizeof(void*), RSP, SZ_D); |
176 code->stack_off -= sizeof(void *); | |
176 } | 177 } |
177 } else { | 178 } else { |
178 push_r(code, opts->scratch2); | 179 push_r(code, opts->scratch2); |
179 mov_ir(code, (intptr_t)memmap[chunk].buffer, opts->scratch2, SZ_PTR); | 180 mov_ir(code, (intptr_t)memmap[chunk].buffer, opts->scratch2, SZ_PTR); |
180 mov_rindexr(code, opts->scratch2, opts->scratch1, 1, opts->scratch1, tmp_size); | 181 mov_rindexr(code, opts->scratch2, opts->scratch1, 1, opts->scratch1, tmp_size); |