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]

Re: Avoiding MIPS mthi/mflo and mtlo/mfhi hazards

At Wed, 5 May 2004 08:40:46 +0000 (UTC), "Richard Sandiford" wrote:
> 2004-05-05  Eric Christopher  <>
> 	* config/mips/ Update the madd define_split for new mflo/mfhi
> 	representation.

I find that even with this, the sb1-elf build chokes building libgcc.

Looks like there's a corresponding msub define_split.

I made the following, and with it sb1-elf builds and
mipsisa64-elf tests same for c/c++ testsuites before/after.

(It's based on Eric's patch for the madd define_split.  I could
believe it's correct, I didn't see any obvious differences in the RTL
pattern that mean that it should be different.  But I don't know.  I
didn't want to check it in until I found out for sure.  8-)

2004-05-05  Chris Demetriou  <>

	* config/mips/ Update the msub define_split for new mflo/mfhi

Index: config/mips/
RCS file: /cvs/gcc/gcc/gcc/config/mips/,v
retrieving revision 1.240
diff -u -p -r1.240
--- config/mips/	5 May 2004 08:37:30 -0000	1.240
+++ config/mips/	5 May 2004 22:39:33 -0000
@@ -1883,7 +1883,7 @@
               (clobber (match_dup 4))
               (clobber (match_dup 5))
               (clobber (match_dup 6))])
-   (set (match_dup 0) (match_dup 1))]
+   (set (match_dup 0) (unspec:SI [(match_dup 5) (match_dup 4)] UNSPEC_MFHILO))]
 (define_insn "*muls"

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