Skip to content

[MC assembler] default suffix of fld mnemonic? #9059

@DimitryAndric

Description

@DimitryAndric
Bugzilla Link 8687
Resolution DUPLICATE
Resolved on Nov 25, 2010 08:16
Version trunk
OS FreeBSD
CC @asl

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilladuplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions