Search
lxdream.org :: lxdream/src/xlat/x86/x86op.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/xlat/x86/x86op.h
changeset 1071:182cfe43c09e
prev995:eb9d43e8aa08
next1112:4cac5e474d4c
author nkeynes
date Tue Jul 21 20:21:52 2009 +1000 (12 years ago)
permissions -rw-r--r--
last change Fix assorted -Wall warnings
file annotate diff log raw
1.1 --- a/src/xlat/x86/x86op.h Thu Mar 05 21:42:35 2009 +0000
1.2 +++ b/src/xlat/x86/x86op.h Tue Jul 21 20:21:52 2009 +1000
1.3 @@ -146,7 +146,7 @@
1.4 #define OPPTR(x) *((void **)xlat_output) = ((void *)x); xlat_output+=(sizeof(void*))
1.5
1.6 /* Primary opcode emitter, eg OPCODE(0x0FBE) for MOVSX */
1.7 -#define OPCODE(x) if( (x) > 0xFFFF ) { OP(x>>16); OP((x>>8)&0xFF); OP(x&0xFF); } else if( (x) > 0xFF ) { OP(x>>8); OP(x&0xFF); } else { OP(x); }
1.8 +#define OPCODE(x) if( (x) > 0xFFFF ) { OP((x)>>16); OP(((x)>>8)&0xFF); OP((x)&0xFF); } else if( (x) > 0xFF ) { OP((x)>>8); OP((x)&0xFF); } else { OP(x); }
1.9
1.10 /* Test if immediate value is representable as a signed 8-bit integer */
1.11 #define IS_INT8(imm) ((imm) >= INT8_MIN && (imm) <= INT8_MAX)
1.12 @@ -174,7 +174,7 @@
1.13 * @param rr reg field
1.14 * @param rb r/m field
1.15 */
1.16 -static int x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
1.17 +static void x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
1.18 {
1.19 int rex = rexw;
1.20 rr &= 0x0F;
.