Search
lxdream.org :: lxdream/src/sh4/x86op.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/x86op.h
changeset 930:07e5b11419db
prev929:fd8cb0c82f5f
next936:f394309c399a
author nkeynes
date Mon Dec 22 09:51:11 2008 +0000 (11 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Remove pointer cache and add full address-space map. Much better
file annotate diff log raw
1.1 --- a/src/sh4/x86op.h Sat Dec 20 03:01:40 2008 +0000
1.2 +++ b/src/sh4/x86op.h Mon Dec 22 09:51:11 2008 +0000
1.3 @@ -112,7 +112,7 @@
1.4 /* ebp+disp32 modrm form */
1.5 #define MODRM_r32_ebp32(r1,disp) OP(0x85 | (r1<<3)); OP32(disp)
1.6
1.7 -/* esp+disp32 modrm+sib form */
1.8 +/* esp+disp8 modrm+sib form */
1.9 #define MODRM_r32_esp8(r1,disp) OP(0x44 | (r1<<3)); OP(0x24); OP(disp)
1.10
1.11 #define MODRM_r32_sh4r(r1,disp) if(disp>127){ MODRM_r32_ebp32(r1,disp);}else{ MODRM_r32_ebp8(r1,(unsigned char)disp); }
1.12 @@ -138,7 +138,7 @@
1.13 #define CALL_r32(r1) OP(0xFF); MODRM_rm32_r32(r1,2)
1.14 #define CALL_ptr(ptr) OP(0xE8); OP32( (((char *)ptr) - (char *)xlat_output) - 4)
1.15 #define CALL_sh4r(disp) OP(0xFF); MODRM_r32_sh4r(2, disp)
1.16 -#define CALL_r32ind(r1,disp) OP(0xFF); OP(0x50 + r1); OP(disp)
1.17 +#define CALL_r32disp8(r1,disp) OP(0xFF); OP(0x50 + r1); OP(disp)
1.18 #define CLC() OP(0xF8)
1.19 #define CMC() OP(0xF5)
1.20 #define CMP_sh4r_r32(disp,r1) OP(0x3B); MODRM_r32_sh4r(r1,disp)
1.21 @@ -158,6 +158,10 @@
1.22 #define MOV_sh4r_r32(disp, r1) OP(0x8B); MODRM_r32_sh4r(r1,disp)
1.23 #define MOV_r32_r32ind(r2,r1) OP(0x89); OP(0 + (r2<<3) + r1 )
1.24 #define MOV_r32ind_r32(r1,r2) OP(0x8B); OP(0 + (r2<<3) + r1 )
1.25 +#define MOV_r32_r32disp32(r2,r1,disp) OP(0x89); OP(0x80 + (r2<<3) + r1); OP32(disp)
1.26 +#define MOV_r32_ebpr32disp32(r2,r1,disp) OP(0x89); OP(0x84 + (r2<<3)); OP(0x05 + (r1<<3)); OP32(disp)
1.27 +#define MOV_r32disp32_r32(r1,disp,r2) OP(0x8B); OP(0x80 + (r2<<3) + r1); OP32(disp)
1.28 +#define MOV_r32disp32x4_r32(r1,disp,r2) OP(0x8B); OP(0x04 + (r2<<3)); OP(0x85+(r1<<3)); OP32(disp)
1.29 #define MOV_r32_esp8(r1,disp) OP(0x89); MODRM_r32_esp8(r1,disp)
1.30 #define MOV_esp8_r32(disp,r1) OP(0x8B); MODRM_r32_esp8(r1,disp)
1.31 #define MOVSX_r8_r32(r1,r2) OP(0x0F); OP(0xBE); MODRM_rm32_r32(r1,r2)
.