Merge branch 'master' of https://github.com/86Box/86Box into feature/968_new

This commit is contained in:
OBattler
2020-12-12 15:59:47 +01:00
2 changed files with 18 additions and 29 deletions

View File

@@ -297,33 +297,26 @@ static inline void STORE_REG_TARGET_B_RELEASE(int host_reg, int guest_reg)
addbyte(0x44);
addbyte(0x89);
addbyte(0xc0 | ((host_reg & 3) << 3));
if (host_reg & 0x10)
{
addbyte(0x66); /*AND AX, 0xff00*/
addbyte(0x25);
addword(0xff00);
}
else
{
addbyte(0x66); /*SHL AX, 8*/
addbyte(0xc1);
addbyte(0xe0);
addbyte(0x08);
}
}
else
{
if (host_reg)
{
addbyte(0x66); /*MOV AX, host_reg*/
addbyte(0x89);
addbyte(0xc0 | ((host_reg & 3) << 3));
}
addbyte(0x66); /*SHL AX, 8*/
addbyte(0xc1);
addbyte(0xe0);
addbyte(0x08);
else if (host_reg & 3)
{
addbyte(0x66); /*MOV AX, host_reg*/
addbyte(0x89);
addbyte(0xc0 | ((host_reg & 3) << 3));
}
if (host_reg & 0x10)
{
addbyte(0x66); /*AND AX, 0xff00*/
addbyte(0x25);
addword(0xff00);
}
else
{
addbyte(0x66); /*SHL AX, 8*/
addbyte(0xc1);
addbyte(0xe0);
addbyte(0x08);
}
addbyte(0x66); /*AND dest_reg, 0x00ff*/
addbyte(0x41);
addbyte(0x81);

View File

@@ -44,9 +44,6 @@ OP_XCHG_EAX_(EBP)
static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
{
/* #ifdef __amd64__
return 0;
#else */
int src_reg, dst_reg, temp_reg;
if ((fetchdat & 0xc0) != 0xc0)
@@ -59,7 +56,6 @@ static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uin
STORE_REG_TARGET_B_RELEASE(temp_reg, fetchdat & 7);
return op_pc + 1;
/* #endif */
}
static uint32_t ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
{