This is the mail archive of the mailing list for the GCC 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] Fix clear_hazard() for MIPS64r2 with 64-bit pointers

There is another place where SImode is hard-coded in the trampoline code when
dealing with pointers.  I initially was trying to fix the infinite loop
causing all the libjava timeouts in with n64.
However, after testing I found that this fixed the remaining n64 trampoline
failures as well.

(The infinite loop had to do with Java catching sigsegv but than the code
itself segfaulting while dereferencing the truncated PC value in the signal
unwinding code.)

Bootstrapped and tested on mips64octeon-linux-gnu with {,-mabi=64}.

OK to install?


	* config/mips/ (clear_hazard): Rename to
	clear_hazard_<mode>.  Use mode-specific addition.
	(clear_cache): Rename gen_clear_hazard to gen_clear_hazard_si
	or gen_clear_hazard_di depending on the size of Pmode.

---	(revision 142136)
+++	(working copy)
@@ -4703,7 +4703,9 @@ (define_expand "clear_cache"
       mips_expand_synci_loop (operands[0], operands[1]);
       emit_insn (gen_sync ());
-      emit_insn (gen_clear_hazard ());
+      emit_insn (Pmode == SImode
+		 ? gen_clear_hazard_si ()
+		 : gen_clear_hazard_di ());
   else if (mips_cache_flush_func && mips_cache_flush_func[0])
@@ -4732,14 +4734,14 @@ (define_insn "rdhwr_synci_step_<mode>"
-(define_insn "clear_hazard"
+(define_insn "clear_hazard_<mode>"
   [(unspec_volatile [(const_int 0)] UNSPEC_CLEAR_HAZARD)
-   (clobber (reg:SI 31))]
+   (clobber (reg:P 31))]
   return "%(%<bal\t1f\n"
-         "1:\taddiu\t$31,$31,12\n"
+         "1:\t<d>addiu\t$31,$31,12\n"

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