Author Topic: movq incorrectly translated  (Read 479 times)

AW

  • Member
  • *****
  • Posts: 2435
  • Let's Make ASM Great Again!
movq incorrectly translated
« on: May 22, 2019, 08:51:11 PM »
movq r11, xmm1

is translated to:

movq    r11,mm1

habran

  • Member
  • *****
  • Posts: 1210
    • uasm
Re: movq incorrectly translated
« Reply #1 on: May 22, 2019, 08:57:42 PM »
Thanks AW,
will be fixed

Cod-Father

habran

  • Member
  • *****
  • Posts: 1210
    • uasm
Re: movq incorrectly translated
« Reply #2 on: May 23, 2019, 08:09:59 AM »
fix for MOVQ is in codegen.c on line 489:
Code: [Select]
    if (CodeInfo->token == T_MOVQ && CodeInfo->basereg != 0x10){
      if (CodeInfo->opnd[OPND1].type == OP_XMM && (CodeInfo->opnd[OPND2].type & OP_MS)){
        CodeInfo->prefix.opsiz = FALSE;
        OutputCodeByte(0xF3);
        }
      else if ((CodeInfo->opnd[OPND1].type & OP_MS) && CodeInfo->opnd[OPND2].type == OP_XMM){
        CodeInfo->prefix.opsiz = TRUE;
        OutputCodeByte(OPSIZ);
        }
      else if ((CodeInfo->opnd[OPND1].type == OP_XMM) && (CodeInfo->opnd[OPND2].type & OP_R64)) {
CodeInfo->prefix.opsiz = TRUE;
         OutputCodeByte(OPSIZ);
}
      else if ((CodeInfo->opnd[OPND2].type == OP_XMM) && (CodeInfo->opnd[OPND1].type & OP_R64)) {
        CodeInfo->prefix.opsiz = TRUE;
        OutputCodeByte(OPSIZ);
      }
    }
    else
    OutputCodeByte(OPSIZ);
  }

it will be fixed in next release
Cod-Father

AW

  • Member
  • *****
  • Posts: 2435
  • Let's Make ASM Great Again!
Re: movq incorrectly translated
« Reply #3 on: May 23, 2019, 07:30:13 PM »
Thank you, habran.  :Thmbsup: