[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils-bugs
Subject:    [Bug gas/6994] New: Support L/LL suffix in integer constants
From:       "hjl dot tools at gmail dot com" <sourceware-bugzilla () sourceware ! org>
Date:       2008-10-29 6:59:54
Message-ID: 20081029065953.6994.hjl.tools () gmail ! com
[Download RAW message or body]

We may use the same macro for integer constants used in both
C and assembly codes. For 64bit integers in C, we use LL suffix.
But LL/L suffixes are rejected by assembler as in

[hjl@gnu-6 910]$ cat bad.s
.8byte 0x00000008007C0000ULL
.8byte 0x00000008007C0000UL
.8byte 0x00000008007C0000LL
.8byte 0x00000008007C0000L
.8byte 0x00000008007C0000ULl
.8byte 0x00000008007C0000Ul
.8byte 0x00000008007C0000Ll
.8byte 0x00000008007C0000l
[hjl@gnu-6 910]$ gcc -c bad.s
bad.s: Assembler messages:
bad.s:1: Error: junk at end of line, first unrecognized character is `U'
bad.s:2: Error: junk at end of line, first unrecognized character is `U'
bad.s:3: Error: junk at end of line, first unrecognized character is `L'
bad.s:4: Error: junk at end of line, first unrecognized character is `L'
bad.s:5: Error: junk at end of line, first unrecognized character is `U'
bad.s:6: Error: junk at end of line, first unrecognized character is `U'
bad.s:7: Error: junk at end of line, first unrecognized character is `L'
bad.s:8: Error: junk at end of line, first unrecognized character is `l'
[hjl@gnu-6 910]$ cat new.s
mov $0x00000008007C0000ULL,%rax
mov $0x00000008007C0000UL,%rax
mov $0x00000008007C0000LL,%rax
mov $0x00000008007C0000L,%rax
[hjl@gnu-6 910]$ gcc -c new.s
new.s: Assembler messages:
new.s:1: Error: junk `ULL' after expression
new.s:2: Error: junk `UL' after expression
new.s:3: Error: junk `LL' after expression
new.s:4: Error: junk `L' after expression
[hjl@gnu-6 910]$

I think we should allow C suffixes valid for for type valueT.

-- 
           Summary: Support L/LL suffix in integer constants
           Product: binutils
           Version: 2.20 (HEAD)
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=6994

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic