This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gas generating bad code for i386


   Date: 7 Mar 2000 20:00:28 -0000
   From: Andrew Haley <aph@pasanda.cygnus.co.uk>

   > Date: 7 Mar 2000 14:55:56 -0500
   > From: Ian Lance Taylor <ian@zembu.com>
   >
   >       Absolute (as opposed to PC relative) call and jump operands must be
   >    prefixed with `*'.  If no `*' is specified, `as' always chooses PC
   >    relative addressing for jump/call labels.
   > 
   > That has to do with the addressing mode, not the target of the jump.
   > I read `je 4' as a PC relative jump to the absolute address 4.  The
   > current version of gas generates that, using a PC relative relocation.

   Yes, but I think what he's referring to is the (IMHO unfortunate) fact
   that `call 4' generates a relative call; that is, four bytes from the
   following PC.  It doesn't generate a call to address 4.

This has changed.  With the current sources `call 4' generates a
relocation for a PC relative call to the absolute address 4.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]