This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

as & FILD instruction


Hi,
something is wrong with 'as', it can't compile 'FILD' instruction

NASM compiles fine:
master waver # cat nasm-example.asm
section .text
       global myfunc

myfunc:
       fild qword [eax]
       ret
master waver # nasm -f aout nasm-example.asm
master waver # objdump -d -M intel nasm-example.o

nasm-example.o:     file format a.out-i386-linux

Disassembly of section .text:

0000000000000000 <myfunc>:
  0:   df 28                   fild   QWORD PTR [eax]
  2:   c3                      ret
  3:   90                      nop
master waver #
master waver # cat as-example.asm
.intel_syntax noprefix
myfunc:
       fild qword [eax]
       ret
master waver # as as-example.asm
as-example.asm: Assembler messages:
as-example.asm:3: Error: ambiguous operand size for `fild'
master waver #
master waver # /usr/bin/as -v
GNU assembler version 2.18 (x86_64-pc-linux-gnu) using BFD version
(GNU Binutils) 2.18

I get same thing when I use FILD in my inline asm() in gcc:
master waver # gcc -o mult_test2 -lrt -mfpmath=387 -masm=intel mult_test2.c
pipe_line_math.h: Assembler messages:
pipe_line_math.h:9: Error: ambiguous operand size for `fild'
master waver #

What is wrong here?
Thanks in advance

-- 
==================================
The power of zero is infinite


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]