Mercurial > hg > tinycc
changeset 471:46f5437276f3
Joshua Phillips: Added opcode definition for 8-bit sign-extended immediates in
16/32-bit arithmetic. Not really a fix (hence not counted as one of the
four), but I was a bit frustrated when asm ("addl $4,%esp") produced the long,
6-byte opcode. I fixed this to use the shorter opcode where possible.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 05 Sep 2007 17:32:02 -0500 |
parents | 44036032a50a |
children | 5ecdf063c480 |
files | i386/i386-asm.h |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/i386-asm.h Wed Sep 05 00:06:26 2007 -0500 +++ b/i386/i386-asm.h Wed Sep 05 17:32:02 2007 -0500 @@ -154,6 +154,7 @@ /* arith */ ALT(DEF_ASM_OP2(addb, 0x00, 0, OPC_ARITH | OPC_MODRM | OPC_BWL, OPT_REG, OPT_EA | OPT_REG)) /* XXX: use D bit ? */ ALT(DEF_ASM_OP2(addb, 0x02, 0, OPC_ARITH | OPC_MODRM | OPC_BWL, OPT_EA | OPT_REG, OPT_REG)) +ALT(DEF_ASM_OP2(addb, 0x83, 0, OPC_ARITH | OPC_MODRM | OPC_WL, OPT_IM8S, OPT_EA | OPT_REG)) ALT(DEF_ASM_OP2(addb, 0x04, 0, OPC_ARITH | OPC_BWL, OPT_IM, OPT_EAX)) ALT(DEF_ASM_OP2(addb, 0x80, 0, OPC_ARITH | OPC_MODRM | OPC_BWL, OPT_IM, OPT_EA | OPT_REG)) ALT(DEF_ASM_OP2(addw, 0x83, 0, OPC_ARITH | OPC_MODRM | OPC_WL, OPT_IM8S, OPT_EA | OPT_REG))