Author Topic: instruction normally not allowed but finnaly yes (intel compiler like proof)  (Read 10419 times)

Offline shaynox

  • Full Member
  • **
  • Posts: 118
  • Country: gr
Hello, i use intel compiler and nasm for build my program in assembly, i take the asm file product by the compiler.

And i found something strange, intel compiler allowed :
    - vmovd     rdx, xmm1
but nasm no, we can only moving dest. to a 32 bit register (edx in that case).

Here the c code and code asm product by intel compiler:

c:
Code: [Select]
printf("FPS = %f\n", 50.0);
asm:
Code: [Select]
;;; printf("FPS = %f\n", 50.0);

        vmovsd    xmm1, QWORD PTR [_2il0floatpacket.27]         ;505.5
$LN367:
        lea       rcx, QWORD PTR [??_C@_09A@FPS?5?$DN?5?$CFf?6?$AA@] ;505.5
$LN368:
        vmovd     rdx, xmm1                                     ;505.5
$LN369:
        call      QWORD PTR [__imp_printf]                      ;505.5
$LN370:
                                ; LOE rbp rsi r15 edi xmm6 xmm7 xmm8 xmm9
.B1.44::                        ; Preds .B1.43

Here the error of nasm:
"error: invalid combination of opcode and operands"

Thanks
« Last Edit: December 01, 2014, 04:20:31 PM by shaynox »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Developers' list says "use vmovq". I guess they're saying the bug is in the compiler(?). I have no clue. Thanks for the feedback!

Best,
Frank