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

[PATCH] MIPS gas: Warnings for (d)la expansions


Hi All,

this patch adds warnings for wrong use of the la/dla macros.

Ah, I forgot to mention, the whole bunch of patches I sent was tested
for mips-linux and mips64-linux. Most of the n32 ABI fixes are a
result of trying gas with IRIX6.


Thiemo


2002-05-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/gas/ChangeLog
	* config/tc-mips.c (macro): Warn about wrong la/dla use.


diff -BurpN source-orig/gas/config/tc-mips.c source/gas/config/tc-mips.c
--- source-orig/gas/config/tc-mips.c	Tue Feb 12 17:04:35 2002
+++ source/gas/config/tc-mips.c	Sun Feb 17 14:04:54 2002
@@ -4571,7 +4589,13 @@ macro (ip)
     case M_LA_AB:
       /* Load the address of a symbol into a register.  If breg is not
 	 zero, we then add a base register to it.  */
+
+      if (dbl && HAVE_32BIT_GPRS)
+	as_warn (_("dla used to load 32-bit register"));
 
+      if (! dbl && HAVE_64BIT_ADDRESSES)
+	as_warn (_("la used to load 64-bit address"));
+
       if (treg == breg)
 	{
 	  tempreg = AT;


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