News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

movq incorrectly translated

Started by aw27, May 22, 2019, 08:51:11 PM

Previous topic - Next topic

aw27

movq r11, xmm1

is translated to:

movq    r11,mm1

habran

Cod-Father

habran

fix for MOVQ is in codegen.c on line 489:

    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

aw27