Bug 12240 - offset can't be used as label in Intel syntax
Summary: offset can't be used as label in Intel syntax
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 30336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-19 13:33 UTC by H.J. Lu
Modified: 2024-01-26 18:55 UTC (History)
4 users (show)

See Also:
Host:
Target: x86
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2010-11-19 13:33:57 UTC
[hjl@gnu-1 tmp]$ cat x.s
        .intel_syntax noprefix
        mov       DWORD PTR[rip+offset], 0
        mov       DWORD PTR offset[rip], 0
[hjl@gnu-1 tmp]$ gcc -c x.s
x.s: Assembler messages:
x.s:2: Error: bad expression
x.s:2: Error: bad expression
x.s:2: Error: junk `rip+offset]' after expression
x.s:3: Error: invalid use of register
[hjl@gnu-1 tmp]$
Comment 1 H.J. Lu 2010-11-22 16:58:35 UTC
None of the following operators can be used as label:

    { "and", O_bit_and, 2 },
    { "eq", O_eq, 2 },
    { "ge", O_ge, 2 },
    { "gt", O_gt, 2 },
    { "le", O_le, 2 },
    { "lt", O_lt, 2 },
    { "mod", O_modulus, 2 },
    { "ne", O_ne, 2 },
    { "not", O_bit_not, 1 },
    { "offset", O_offset, 1 },
    { "or", O_bit_inclusive_or, 2 },
    { "shl", O_left_shift, 2 },
    { "short", O_short, 1 },
    { "shr", O_right_shift, 2 },
    { "xor", O_bit_exclusive_or, 2 },
Comment 2 LIU Hao 2023-04-28 03:38:34 UTC
Is https://sourceware.org/bugzilla/show_bug.cgi?id=30336 a dup of this?
Comment 3 H.J. Lu 2023-04-28 15:46:38 UTC
*** Bug 30336 has been marked as a duplicate of this bug. ***