This is the mail archive of the 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]
Other format: [Raw text]

Re: SH @(expr,pc) fix-ups broken

On Feb  4, 2002, Alexandre Oliva <> wrote:

> On Feb  3, 2002, Hans-Peter Nilsson <> wrote:
>> On 1 Feb 2002, Alexandre Oliva wrote:
>>> Here's a patch that implements the idea I had
>>> delineated earlier.  Tested on athlon-pc-linux-gnu-x-sh-elf.  Ok to
>>> install?

>> Ok, with the update changelong entry.

> Well, of *course* I'd revert the patch in my tree and re-apply it to
> make sure it was exactly what I wanted to check it, but only later
> realize that I had fixed the ChangeLog entry in gas/ChangeLog but not
> in the patch file.  D'oh!  I've fixed the ChangeLog entry in a second
> check in.

And now I have realized that apparently I actually checked in the old
version of the patch, which was the reason why the CL entry was wrong.
This also means that the patch that went in was wrong too, as revealed
by my latest testsuite runs.  Here's the patch that I'm checking in to
correct my mistake.

Index: gas/ChangeLog
from  Alexandre Oliva  <>
	* config/tc-sh.c (parse_at): Install the correct version of
	2002-02-04's patch.

Index: gas/config/tc-sh.c
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.55
diff -u -p -r1.55 tc-sh.c
--- gas/config/tc-sh.c 2002/02/06 05:34:34 1.55
+++ gas/config/tc-sh.c 2002/02/06 06:23:47
@@ -981,15 +981,10 @@ parse_at (src, op)
 	      else if (mode == A_PC)
-		  /* Turn a plain @(4,pc) into @(.+4,pc).  */
-		  if (op->immediate.X_op == O_constant)
-		    {
-		      op->immediate.X_add_symbol = dot ();
-		      op->immediate.X_op = O_symbol;
-		      op->type = A_DISP_PC;
-		    }
-		  else
-		    op->type = A_DISP_PC_ABS;
+		  op->type = A_DISP_PC_ABS;
+		  /* Such operands don't get corrected for PC==.+4, so
+		     make the correction here.  */
+		  op->immediate.X_add_number -= 4;

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

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