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]

PATCH: config/tc-mips.c (nopic_need_relax)


This patch seems to make the FSF assembler to generate the same better
code as the Linux assembler. A sample code is

	sw      $0,nlmsvc_ops
	j       $31

assembled with "-G 0 -mips2 -O2 -mtune=r5000 -v -non_shared --trap". I
don't know if we should add "g_switch_value > 0" to other checkings of
USE_GLOBAL_POINTER_OPT.

I will test if my kernel is stable next week. 


H.J.
----
2001-08-18  H.J. Lu  <hjl@gnu.org>

	* config/tc-mips.c (nopic_need_relax): Check
	USE_GLOBAL_POINTER_OPT only if g_switch_value > 0.

Index: config/tc-mips.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/config/tc-mips.c,v
retrieving revision 1.56
diff -u -p -r1.56 tc-mips.c
--- config/tc-mips.c	2001/09/14 23:57:51	1.56
+++ config/tc-mips.c	2001/09/15 17:33:40
@@ -10842,7 +10842,7 @@ nopic_need_relax (sym, before_relaxing)
   if (sym == 0)
     return 0;
 
-  if (USE_GLOBAL_POINTER_OPT)
+  if (USE_GLOBAL_POINTER_OPT && g_switch_value > 0)
     {
       const char *symname;
       int change;


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