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] MIPS: Cleanup assembly output for clear_hazard insn.

The patch that added the clear_hazard insn for MIPS uses ".set push;
.set noreorder; .set nomacro ... .set pop" .  Since %(%<...%>%) is the
preferred way of handling this construct, I have changed it to do it the
'right way'.

Testing c,c++,java with mipsel-linux cross compiler configured
--with-arch=mips32r2  and the generated code looks good.  I will also
run the testsuite on mips32r2 hardware.

OK to commit if testing succeeds?

2007-12-15  David Daney  <>

    * config/mips/ (clear_hazard): Use PRINT_OPERAND punctuation
    instead of .set push and .set pop.

Index: config/mips/
--- config/mips/	(revision 130986)
+++ config/mips/	(working copy)
@@ -4398,15 +4398,11 @@ (define_insn "clear_hazard"
    (clobber (reg:SI 31))]
-  return ".set\tpush\n"
-         "\t.set\tnoreorder\n"
-         "\t.set\tnomacro\n"
-         "\tbal\t1f\n"
+  return "%(%<bal\t1f\n"
-         "\tnop\n"
-         "\t.set\tpop";
+         "\tnop%>%)";
   [(set_attr "length" "20")])

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