Mercurial > repos > blastem
comparison gen_x86.c @ 1072:cd6048e0397b
Fixed a bug in call_raxfallback that would cause the call to be omitted completely in the RAX fallback case. This fixes a crash on OpenBSD and possibly other systems
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 09 Aug 2016 21:29:49 -0700 |
parents | dc71e32091d8 |
children | 2ec5e6eaf81d |
comparison
equal
deleted
inserted
replaced
1071:0fff9bf3a3ee | 1072:cd6048e0397b |
---|---|
2017 *(out++) = disp; | 2017 *(out++) = disp; |
2018 disp >>= 8; | 2018 disp >>= 8; |
2019 *(out++) = disp; | 2019 *(out++) = disp; |
2020 disp >>= 8; | 2020 disp >>= 8; |
2021 *(out++) = disp; | 2021 *(out++) = disp; |
2022 code->cur = out; | |
2022 } else { | 2023 } else { |
2023 mov_ir(code, (int64_t)fun, RAX, SZ_PTR); | 2024 mov_ir(code, (int64_t)fun, RAX, SZ_PTR); |
2024 call_r(code, RAX); | 2025 call_r(code, RAX); |
2025 } | 2026 } |
2026 code->cur = out; | |
2027 } | 2027 } |
2028 | 2028 |
2029 void call_r(code_info *code, uint8_t dst) | 2029 void call_r(code_info *code, uint8_t dst) |
2030 { | 2030 { |
2031 code->stack_off += sizeof(void *); | 2031 code->stack_off += sizeof(void *); |