[PATCH] Code cleanup in tc-mips.c, addendum

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Sun Aug 26 07:19:00 GMT 2001


Hi All,

this fixes two checks for MAX_GPREL_OFFSET I've forgotten in the
last patch.


Thiemo


2001-08-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/gas/ChangeLog
	* tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.
	(macro): Likewise.


--- src-orig/gas/config/tc-mips.c	Sun Aug 26 15:22:58 2001
+++ src/gas/config/tc-mips.c	Sun Aug 26 16:10:28 2001
@@ -3330,7 +3330,7 @@
 	   lui		$reg,<sym>		(BFD_RELOC_HI16_S)
 	   addiu	$reg,$reg,<sym>		(BFD_RELOC_LO16)
 	 If we have an addend, we always use the latter form.  */
-      if ((valueT) ep->X_add_number >= MAX_GPREL_OFFSET
+      if ((valueT) ep->X_add_number > MAX_GPREL_OFFSET
 	  || nopic_need_relax (ep->X_add_symbol, 1))
 	p = NULL;
       else
@@ -4226,7 +4226,7 @@
 	       addiu	$tempreg,$tempreg,<sym>	(BFD_RELOC_LO16)
 	     If we have a constant, we need two instructions anyhow,
 	     so we may as well always use the latter form.  */
-	  if ((valueT) offset_expr.X_add_number >= MAX_GPREL_OFFSET
+	  if ((valueT) offset_expr.X_add_number > MAX_GPREL_OFFSET
 	      || nopic_need_relax (offset_expr.X_add_symbol, 1))
 	    p = NULL;
 	  else



More information about the Binutils mailing list