Honour direction bit in fmove instruction (#1709)

Co-authored-by: Michal Schulz <michal@Michals-iMac-Pro.local>
This commit is contained in:
Michal Schulz 2020-12-03 08:30:35 +01:00 committed by GitHub
parent 2bc4e7cae7
commit cb3c3548e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -2062,9 +2062,18 @@ static void d68020_cpgen(m68k_info *info)
ext->op_size.type = M68K_SIZE_TYPE_CPU;
ext->op_size.cpu_size = 0;
op0 = &ext->operands[0];
op1 = &ext->operands[1];
// Special case - adjust direction of fmove
if ((opmode == 0x00) && ((next >> 13) & 0x1) != 0)
{
op0 = &ext->operands[1];
op1 = &ext->operands[0];
}
else
{
op0 = &ext->operands[0];
op1 = &ext->operands[1];
}
if (rm == 0 && supports_single_op && src == dst) {
ext->op_count = 1;
op0->reg = M68K_REG_FP0 + dst;