summaryrefslogtreecommitdiff
path: root/disasm.c
diff options
context:
space:
mode:
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 e7e634ef..91846862 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))