mirror of
https://github.com/mupen64plus/mupen64plus-core.git
synced 2024-06-02 19:27:51 -04:00
new_dynarec: fix invalid CPU instruction generation in emit_writeword()
This commit is contained in:
parent
3407229ddc
commit
da3b9bfbdd
|
@ -2040,6 +2040,7 @@ static void emit_writebyte_indexed_tlb(int rt, int addr, int rs, int map)
|
|||
}
|
||||
static void emit_writeword(int rt, int addr)
|
||||
{
|
||||
if(rt<0) return;
|
||||
u_int offset = addr-(u_int)&g_dev.r4300.new_dynarec_hot_state;
|
||||
assert(offset<4096);
|
||||
assem_debug("str %s,fp+%d",regname[rt],offset);
|
||||
|
|
|
@ -2393,6 +2393,7 @@ static void emit_writebyte_indexed_tlb(int rt, int addr, int rs, int map)
|
|||
|
||||
static void emit_writeword(int rt, intptr_t addr)
|
||||
{
|
||||
if(rt<0) return;
|
||||
intptr_t offset = addr-(intptr_t)&g_dev.r4300.new_dynarec_hot_state;
|
||||
assert(offset<16380LL);
|
||||
assert(offset%4 == 0); /* 4 bytes aligned */
|
||||
|
|
|
@ -2309,6 +2309,7 @@ static void emit_xchg64(int rs, int rt)
|
|||
}
|
||||
static void emit_writeword(int rt, intptr_t addr)
|
||||
{
|
||||
if(rt<0) return;
|
||||
assert((intptr_t)addr-(intptr_t)out>=-2147483648LL&&(intptr_t)addr-(intptr_t)out<2147483647LL);
|
||||
assem_debug("movl %%%s,%llx",regname[rt],addr);
|
||||
output_byte(0x89);
|
||||
|
|
Loading…
Reference in a new issue