[LLVMbugs] [Bug 8685] New: [MC assembler] does not support square bracket notation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 24 13:16:28 PST 2010


           Summary: [MC assembler] does not support square bracket
           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

The MC assembler does not appear to support the following notation,
using square brackets, which occurs in some x86 assembly files:

.size   x, [.-x]

Another example of this is used in FreeBSD, in combination with local

#define PIC_PROLOGUE    \
    pushl    %ebx;    \
    call    1f;    \
1:            \
    popl    %ebx;    \
    addl    $_GLOBAL_OFFSET_TABLE_+[.-1b],%ebx

As there is no reference at all in the gas documentation about this
'feature', I just looked in the source code instead...

It seems that only in case of ia64, square brackets are considered an
index operator (with unclear semantics, though).  For most other cases,
they are equivalent with parentheses.

In binutils trunk, there is also an exception for i386, but only if gas
is using Intel syntax at that particular point in the file.

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