summaryrefslogtreecommitdiff
path: root/disasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 21:01:38 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 21:01:38 +0000
commit4cf1748e6829f80be251b8d7d274738009f934cf (patch)
tree59260e9aa7867952d80890859c0d06f6665fdfa5 /disasm.c
parent734b188090539eddf08e61c317415f566446691b (diff)
downloadnasm-4cf1748e6829f80be251b8d7d274738009f934cf.tar.gz
nasm-4cf1748e6829f80be251b8d7d274738009f934cf.tar.bz2
nasm-4cf1748e6829f80be251b8d7d274738009f934cf.zip
NASM 0.98.11
Diffstat (limited to 'disasm.c')
-rw-r--r--disasm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/disasm.c b/disasm.c
index e7e634e..9184686 100644
--- a/disasm.c
+++ b/disasm.c
@@ -377,13 +377,23 @@ static int matches (struct itemplate *t, unsigned char *data, int asize,
ins->oprs[c-070].offset |= (((long) *data++) << 24);
ins->oprs[c-070].segment |= SEG_32BIT | SEG_RELATIVE;
}
- if (c >= 0100 && c <= 0177) {
+ if (c >= 0100 && c < 0130) {
int modrm = *data++;
ins->oprs[c & 07].basereg = (modrm >> 3) & 07;
ins->oprs[c & 07].segment |= SEG_RMREG;
data = do_ea (data, modrm, asize, segsize,
&ins->oprs[(c >> 3) & 07]);
}
+ if (c >= 0130 && c <= 0132) {
+ ins->oprs[c-0130].offset = *data++;
+ ins->oprs[c-0130].offset |= (*data++ << 8);
+ }
+ if (c >= 0140 && c <= 0142) {
+ ins->oprs[c-0140].offset = *data++;
+ ins->oprs[c-0140].offset |= (*data++ << 8);
+ ins->oprs[c-0140].offset |= (((long) *data++) << 16);
+ ins->oprs[c-0140].offset |= (((long) *data++) << 24);
+ }
if (c >= 0200 && c <= 0277) {
int modrm = *data++;
if (((modrm >> 3) & 07) != (c & 07))