Author Topic: error: mismatch in operand sizes - why is that happening?  (Read 11564 times)

Offline Flo

  • Jr. Member
  • *
  • Posts: 3
error: mismatch in operand sizes - why is that happening?
« on: June 17, 2017, 01:20:04 PM »
Hello there,
I have an instruction:

Code: [Select]
divsd xmm0, qword [ebp-0x18]
I get this error on the line where this instruction is located: "error: mismatch in operand sizes"

However
Code: [Select]
movsd xmm2, qword [ebp-0x18]seems to compile without an error.

Code is generated with "libudis86"

Why this is code wrong?

Edit:
However
Code: [Select]
divsd xmm0, [ebp-0x18]
Seems to result in the expected code
« Last Edit: June 17, 2017, 01:37:38 PM by Flo »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: error: mismatch in operand sizes - why is that happening?
« Reply #1 on: June 18, 2017, 02:22:52 AM »
Hi Flo,

Dunno. Nasm only seems happy with no size specifier at all. Seems to me that it might be a bug(?).

(Thanks for your answers to other questions here!)

Best,
Frank