Bug 10150 - GAS doesn't allow ljmp foo:bar syntax when using .intel_syntax mode
Summary: GAS doesn't allow ljmp foo:bar syntax when using .intel_syntax mode
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
Depends on:
Reported: 2009-05-13 09:42 UTC by Jacob Myers
Modified: 2009-05-18 18:16 UTC (History)
1 user (show)

See Also:
Host: linux-elf-i386
Target: linux-elf-i386
Build: elf-i386
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Myers 2009-05-13 09:42:23 UTC
GAS currently doesn't allow the following syntax for ljmp when using
.intel_syntax noprefix: ljmp 0x8:gdt_update_flush

The equavilent AT&T syntax is: ljmp $0x8, $gdt_update_flush.

The error GAS spits out is foo.S:bar: Error: ambiguous operand size or operands
invalid for `ljmp'.

The current workaround I'm using is turning on .att_syntax then using the
equavilent AT&T syntax. However, this is obviously suboptimal.
Comment 1 H.J. Lu 2009-05-18 18:16:42 UTC
Works with binutils in CVS:

[hjl@gnu-6 tmp]$ cat x.s
 ljmp $0x8, $gdt_update_flush
 .intel_syntax noprefix
 ljmp 0x:gdt_update_flush
[hjl@gnu-6 tmp]$ gcc -c x.s -m32    
[hjl@gnu-6 tmp]$ objdump -dwr  x.o

x.o:     file format elf32-i386

Disassembly of section .text:

00000000 <.text>:
   0:	ea 00 00 00 00 08 00 	ljmp   $0x8,$0x0	1: R_386_32	gdt_update_flush
   7:	ea 00 00 00 00 00 00 	ljmp   $0x0,$0x0	8: R_386_32	gdt_update_flush
[hjl@gnu-6 tmp]$