This is the mail archive of the gcc-patches@gcc.gnu.org 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] rs6000: Fix mftb for -m32 -mpowerpc64


The rs6000_get_timebase expander expands to rs6000_mftb_di for
TARGET_POWERPC64, so the define_insn should allow it too.

This fixes gcc.target/powerpc/ppc-get-timebase.c for -m32 -mpowerpc64.

Okay for mainline?


Segher


2014-11-11  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (rs6000_mftb_<mode>): Use mode iterator
	GPR instead of P.

---
 gcc/config/rs6000/rs6000.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 1f1e06d..78960e0 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -13550,8 +13550,8 @@ (define_insn "rs6000_get_timebase_ppc32"
   [(set_attr "length" "20")])
 
 (define_insn "rs6000_mftb_<mode>"
-  [(set (match_operand:P 0 "gpc_reg_operand" "=r")
-        (unspec_volatile:P [(const_int 0)] UNSPECV_MFTB))]
+  [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
+        (unspec_volatile:GPR [(const_int 0)] UNSPECV_MFTB))]
   ""
 {
   if (TARGET_MFCRF)
-- 
1.8.1.4


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