Added recompiled versions of PUSH [mem], PUSH seg, NOP, CLD, STD, JMP indirect, CALL indirect.

This commit is contained in:
TomW 2015-11-17 20:52:51 +00:00
commit e9bea8ab7e
6 changed files with 253 additions and 11 deletions

View file

@ -3008,6 +3008,16 @@ static int COPY_REG(int src_reg)
return REG_ECX | (src_reg & 0x10);
}
static int LOAD_HOST_REG(int host_reg)
{
if (host_reg & 8)
addbyte(0x44);
addbyte(0x89);
addbyte(0xc0 | REG_ECX | ((host_reg & 7) << 3));
return REG_ECX | (host_reg & 0x10);
}
static int ZERO_EXTEND_W_B(int reg)
{
if (reg & 0x10)
@ -4298,3 +4308,42 @@ static void FP_COMPARE_IL()
addbyte(0xc8);
FP_COMPARE_MEM();
}
static void SET_BITS(uintptr_t addr, uint32_t val)
{
if (val & ~0xff)
{
addbyte(0x81);
addbyte(0x0c);
addbyte(0x25);
addlong(addr);
addlong(val);
}
else
{
addbyte(0x80);
addbyte(0x0c);
addbyte(0x25);
addlong(addr);
addbyte(val);
}
}
static void CLEAR_BITS(uintptr_t addr, uint32_t val)
{
if (val & ~0xff)
{
addbyte(0x81);
addbyte(0x24);
addbyte(0x25);
addlong(addr);
addlong(~val);
}
else
{
addbyte(0x80);
addbyte(0x24);
addbyte(0x25);
addlong(addr);
addbyte(~val);
}
}