Search
lxdream.org :: lxdream :: r1176:70feb1749427
lxdream 0.9.1
released Jun 29
Download Now
changeset1176:70feb1749427
parent1175:712c418cad83
child1177:bd5893522efc
authorNathan Keynes <nkeynes@lxdream.org>
dateThu May 12 08:45:25 2011 +1000 (8 years ago)
Fix block-chaining epilogue for 64-bit builds (was loading a 32-bit pointer,
oops...)
src/sh4/sh4x86.in
src/xlat/x86/x86op.h
1.1 --- a/src/sh4/sh4x86.in Wed May 11 20:25:49 2011 +1000
1.2 +++ b/src/sh4/sh4x86.in Thu May 12 08:45:25 2011 +1000
1.3 @@ -552,7 +552,7 @@
1.4 JMP_rptr(REG_EAX);
1.5 }
1.6 JMP_TARGET(wrongmode);
1.7 - MOVL_r32disp_r32( REG_EAX, XLAT_CHAIN_CODE_OFFSET, REG_EAX );
1.8 + MOVP_rptrdisp_rptr( REG_EAX, XLAT_CHAIN_CODE_OFFSET, REG_EAX );
1.9 int rel = ptr - xlat_output;
1.10 JMP_prerel(rel);
1.11 JMP_TARGET(nocode);
2.1 --- a/src/xlat/x86/x86op.h Wed May 11 20:25:49 2011 +1000
2.2 +++ b/src/xlat/x86/x86op.h Thu May 12 08:45:25 2011 +1000
2.3 @@ -320,6 +320,7 @@
2.4 #define x86_encode_rptr_memptr(opcode,rr,rb,rx,ss,disp32) x86_encode_modrm(PREF_PTR,opcode,rr,rb,rx,ss,disp32)
2.5 #define x86_encode_r32_mem32disp32(opcode,rr,rb,disp32) x86_encode_modrm(0,opcode,rr,rb,-1,0,disp32)
2.6 #define x86_encode_r64_mem64disp64(opcode,rr,rb,disp32) x86_encode_modrm(PREF_REXW,opcode,rr,rb,-1,0,disp32)
2.7 +#define x86_encode_rptr_memptrdisp(opcode,rr,rb,disp32) x86_encode_modrm(PREF_PTR,opcode,rr,rb,-1,0,disp32)
2.8 #define x86_encode_r32_ripdisp32(opcode,rr,disp32) x86_encode_modrm_rip(0,opcode,rr,disp32)
2.9 #define x86_encode_r64_ripdisp64(opcode,rr,disp32) x86_encode_modrm_rip(PREF_REXW,opcode,rr,disp32)
2.10
2.11 @@ -455,6 +456,7 @@
2.12 #define MOVP_moffptr_rax(p) if( sizeof(void*)==8 ) { OP(PREF_REXW); } OP(0xA1); OPPTR(p)
2.13 #define MOVP_rptr_rptr(r1,r2) x86_encode_reg_rm(PREF_PTR, 0x89, r1, r2)
2.14 #define MOVP_sib_rptr(ss,ii,bb,d,r1) x86_encode_rptr_memptr(0x8B, r1, bb, ii, ss, d)
2.15 +#define MOVP_rptrdisp_rptr(r1,dsp,r2) x86_encode_rptr_memptrdisp(0x8B, r2, r1, dsp)
2.16
2.17 #define MOVSXL_r8_r32(r1,r2) x86_encode_r32_rm32(0x0FBE, r2, r1)
2.18 #define MOVSXL_r16_r32(r1,r2) x86_encode_r32_rm32(0x0FBF, r2, r1)
.