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

           Summary: [MC assembler] does not support square bracket
                    notation
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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
labels:

#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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to