Menu

#186 "error: mismatch in operand sizes" on scalar sse instruction

open
nobody
None
1
2004-06-26
2004-06-24
Anonymous
No

i wrote following instruction:

ucomisd XMM1, qword [byte EDI+EAX*8+0xEF]

and nasm return an error:

error: mismatch in operand sizes

on this string.

But

ucomisd XMM1, [byte EDI+EAX*8+0xEF]

was compiled quietly.

I think it's wrong, because this instruction always use qword memory
operand. There is the same problem with following instructions:
MOVD
PINSRW
CVTSI2SD
MOVHPD
MOVHPS
MOVLPD
MOVLPS
CVTPI2PD
CVTPI2PS
SHUFPD
PSLLW
PSLLD
PSLLQ
PSRLW
PSRLD
PSRLQ
PSRAW
PSRAD
and some others

Discussion

  • nasm64developer

    nasm64developer - 2004-06-26
    • priority: 5 --> 1
     
  • nasm64developer

    nasm64developer - 2004-06-26

    Logged In: YES
    user_id=804543

    Yes, as of writing this, NASM's instruction database
    is missing the appropriate S[BWDQO] flags for quite a
    number of entries. (For my local forked version I've
    re-written the database from scratch, a process which
    revealed numerous issues with the old version.)

    Btw, also see SF feature request #560969 ("oword").

     
  • nasm64developer

    nasm64developer - 2004-06-26

    Logged In: YES
    user_id=804543

    Fwiw, NASM also fails to complain about the "+0xEF" not
    fitting into the requested (signed) byte displacement.
    But then, NASM fails to perform such boundary checks in
    quite a number of places all over its code. (In my local
    forked version there are ~50 of these, half of them in
    assemble.c, a few in nasm.c, and the rest throughout the
    various output format drivers.)

     
  • nasm64developer

    nasm64developer - 2004-06-26

    Logged In: YES
    user_id=804543

    Fwiw, NASM also fails to complain about the "+0xEF" not
    fitting into the requested (signed) byte displacement.
    But then, NASM fails to perform such boundary checks in
    quite a number of places all over its code. (In my local
    forked version there are ~50 of these, half of them in
    assemble.c, a few in nasm.c, and the rest throughout the
    various output format drivers.)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.