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] Re: mips 64-bit address generation is broken.


Did you come up with a final patch?


FYI, my patch to address (only) the issue I ran into is below.


I've found that it doesn't cause any regressions for check-gcc for
mips-elf/mips-sim or mips64-elf/mips64-sim, and, with the compiler
change I mentioned (to use 'dla' for the leadi mips.md pattern) it
does the right thing for the test case mentioned previously.



chris
===================================================================
[gas/ChangeLog]
2002-02-18  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (macro): When adding a base register
	to calculate the result of a "dla" or "la" macro, use
	"daddu" if the object file has 64-bit addresses or if
	"dla" was requested, otherwise use addu.

Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.109
diff -u -p -r1.109 tc-mips.c
--- tc-mips.c	2002/02/15 23:00:34	1.109
+++ tc-mips.c	2002/02/18 05:48:55
@@ -5080,7 +5080,7 @@ macro (ip)
 
       if (breg != 0)
 	macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
-		     HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
+		     (dbl || HAVE_64BIT_ADDRESSES) ? "daddu" : "addu",
 		     "d,v,t", treg, tempreg, breg);
 
       if (! used_at)




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