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]

Re: as & FILD instruction


On Tue, Jun 2, 2009 at 1:16 PM, Nulik Nol <nuliknol@gmail.com> wrote:
> 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]

It should be

 fild qword ptr [eax]


H.J.
> ? ? ? 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
>



-- 
H.J.


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