Add mul/div opcodes for x86.nz assembler and fix osx build

This commit is contained in:
pancake 2015-02-20 19:39:38 +01:00
parent 37cfb20360
commit 5c8b417cf2
2 changed files with 21 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2008-2014 - pancake */
/* Copyright (C) 2008-2015 - pancake */
#include <stdio.h>
#include <string.h>
@ -661,6 +661,26 @@ SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+)
data[l++] = ptr[2];
data[l++] = ptr[3];
return 5;
} else if (!strcmp (op, "div")) {
int pfx = 0xf0;
int arg0 = getreg (arg);
if (arg0 == 0xff)
return -1;
if (*arg == 'r')
data[l++] = 0x48;
data[l++] = 0xf7;
data[l++] = arg0 | pfx;
return l;
} else if (!strcmp (op, "mul")) {
int pfx = 0xe0;
int arg0 = getreg (arg);
if (arg0 == 0xff)
return -1;
if (*arg == 'r')
data[l++] = 0x48;
data[l++] = 0xf7;
data[l++] = arg0 | pfx;
return l;
} else if (!strcmp (op, "pop")) {
char *delta;
ut64 dst;

View File

@ -949,7 +949,6 @@ eprintf ("++ EFL = 0x%08x %d\n", ctx.EFlags, r_offsetof (CONTEXT, EFlags));
return R_FALSE;
}
int tid = dbg->tid;
if (tid <0 || tid>=inferior_thread_count) {
dbg->tid = tid = dbg->pid;
}