This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas jmp problems
- To: Mr Bro <br0user at yahoo dot com>
- Subject: Re: gas jmp problems
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Mon, 2 Jul 2001 09:54:48 +0930
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010701192652.62655.qmail@web13604.mail.yahoo.com>
On Sun, Jul 01, 2001 at 12:26:52PM -0700, Mr Bro wrote:
>
> I skimmed through manuals and ChangeLogs and couldn't
> find a reference to it, and decided to ask before
> diving into the source. Any help is appreciated.
>
> Using the following code: main(){__asm__("jmp 13");}
> gas correctly produces near jmp opcode with binutils
> shipped with Red Hat 6.1 (binutils-2.9.1.0.23-6), i.e.
> it produces
>
> \xeb\x0d
"jmp 13" is illegal assembly. Older gnu assemblers accept it, but
it's really a bug.
> But with more recent binutils (like the one shipped
> with Red Hat 6.2), it fails to do so and produces far
> jmp opcode:
>
> \xe9\x89\x7b\xfb\xf7
Older versions of gcc generate assembly like "call 13" under certain
circumstances. Rather than throw such invalid assembly out, we now
support it and generate the machine instructions that gcc intended.
> Could someone point out how to get gas to produce near
> jmp opcode with the latest versions?
jmp .+2+13
Alan