[LLVMbugs] [Bug 8687] New: [MC assembler] default suffix of fld mnemonic?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 24 14:54:15 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8687

           Summary: [MC assembler] default suffix of fld mnemonic?
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dimitry at andric.com
                CC: llvmbugs at cs.uiuc.edu


In the FreeBSD tree, there exists this fragment of inline assembly in a
.c file:

        float x;
    ...
        __asm __volatile("ffree %%st(7); fld %0" : : "m" (x));

This gets compiled to the following preprocessed assembly:

    ffree    %st(7)
    fld    -4(%ebp)

Though the fld mnemonic misses a size suffix such as 's', gas assembles
it anyway, and apparently interprets it as a float operation:

   6:   dd c7                   ffree  %st(7)
   8:   d9 45 fc                flds   0xfffffffc(%ebp)

I'm not sure what the right approach is here; it seems rather arbitrary
to use flds by default, but apparently that's what gas does.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list