This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] MIPS: Cleanup assembly output for clear_hazard insn.
- From: David Daney <ddaney at avtrex dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Sandiford <rsandifo at nildram dot co dot uk>
- Date: Sat, 15 Dec 2007 22:47:52 -0800
- Subject: [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 <ddaney@avtrex.com>
* config/mips/mips.md (clear_hazard): Use PRINT_OPERAND punctuation
instead of .set push and .set pop.
Index: config/mips/mips.md
===================================================================
--- config/mips/mips.md (revision 130986)
+++ config/mips/mips.md (working copy)
@@ -4398,15 +4398,11 @@ (define_insn "clear_hazard"
(clobber (reg:SI 31))]
"ISA_HAS_SYNCI"
{
- return ".set\tpush\n"
- "\t.set\tnoreorder\n"
- "\t.set\tnomacro\n"
- "\tbal\t1f\n"
+ return "%(%<bal\t1f\n"
"\tnop\n"
"1:\taddiu\t$31,$31,12\n"
"\tjr.hb\t$31\n"
- "\tnop\n"
- "\t.set\tpop";
+ "\tnop%>%)";
}
[(set_attr "length" "20")])