Search
lxdream.org :: lxdream/src/sh4/x86op.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/x86op.h
changeset 388:13bae2fb0373
prev386:6fb10951326a
next394:7eb172bfeefe
author nkeynes
date Tue Sep 18 08:59:00 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change More fixes and complete missing instructions
file annotate diff log raw
1.1 --- a/src/sh4/x86op.h Sun Sep 16 07:03:23 2007 +0000
1.2 +++ b/src/sh4/x86op.h Tue Sep 18 08:59:00 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: x86op.h,v 1.8 2007-09-16 07:03:23 nkeynes Exp $
1.6 + * $Id: x86op.h,v 1.9 2007-09-18 08:59:00 nkeynes Exp $
1.7 *
1.8 * Definitions of x86 opcodes for use by the translator.
1.9 *
1.10 @@ -120,6 +120,7 @@
1.11 #define MOV_r32_sh4r(r1,disp) OP(0x89); MODRM_r32_sh4r(r1,disp)
1.12 #define MOV_moff32_EAX(off) OP(0xA1); OP32(off)
1.13 #define MOV_sh4r_r32(disp, r1) OP(0x8B); MODRM_r32_sh4r(r1,disp)
1.14 +#define MOV_r32ind_r32(r1,r2) OP(0x8B); OP(0 + (r2<<3) + r1 )
1.15 #define MOVSX_r8_r32(r1,r2) OP(0x0F); OP(0xBE); MODRM_rm32_r32(r1,r2)
1.16 #define MOVSX_r16_r32(r1,r2) OP(0x0F); OP(0xBF); MODRM_rm32_r32(r1,r2)
1.17 #define MOVZX_r8_r32(r1,r2) OP(0x0F); OP(0xB6); MODRM_rm32_r32(r1,r2)
1.18 @@ -128,7 +129,7 @@
1.19 #define NEG_r32(r1) OP(0xF7); MODRM_rm32_r32(r1,3)
1.20 #define NOT_r32(r1) OP(0xF7); MODRM_rm32_r32(r1,2)
1.21 #define OR_r32_r32(r1,r2) OP(0x0B); MODRM_rm32_r32(r1,r2)
1.22 -#define OR_imm8_r8(imm,r1) OP(0x80); MODRM_rm32_r32(r1,1)
1.23 +#define OR_imm8_r8(imm,r1) OP(0x80); MODRM_rm32_r32(r1,1); OP(imm)
1.24 #define OR_imm32_r32(imm,r1) OP(0x81); MODRM_rm32_r32(r1,1); OP32(imm)
1.25 #define OR_sh4r_r32(disp,r1) OP(0x0B); MODRM_r32_sh4r(r1,disp)
1.26 #define POP_r32(r1) OP(0x58 + r1)
1.27 @@ -171,12 +172,13 @@
1.28 #define FCOMIP_st(st) OP(0xDF); OP(0xF0+st)
1.29 #define FDIVP_st(st) OP(0xDE); OP(0xF8+st)
1.30 #define FILD_sh4r(disp) OP(0xDB); MODRM_r32_sh4r(0, disp)
1.31 -#define FISTTP_shr4(disp) OP(0xDB); MODRM_r32_sh4r(1, disp)
1.32 +#define FILD_r32ind(r32) OP(0xDB); OP(0x00+r32)
1.33 +#define FISTP_sh4r(disp) OP(0xDB); MODRM_r32_sh4r(3, disp)
1.34 #define FLD0_st0() OP(0xD9); OP(0xEE);
1.35 #define FLD1_st0() OP(0xD9); OP(0xE8);
1.36 #define FMULP_st(st) OP(0xDE); OP(0xC8+st)
1.37 #define FPOP_st() OP(0xDD); OP(0xC0); OP(0xD9); OP(0xF7)
1.38 -#define FSUB_st(st) OP(0xDE); OP(0xE8+st)
1.39 +#define FSUBP_st(st) OP(0xDE); OP(0xE8+st)
1.40 #define FSQRT_st0() OP(0xD9); OP(0xFA)
1.41
1.42 /* Conditional branches */
.