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]

Re: [PATCHv3] rs6000: Add 2 built-ins to read the Time Base Register on PowerPC


Hi Tulio,

Thanks for all the cleanups!

Two quite minor things...

+(define_insn "rs6000_get_timebase_ppc64"
+  [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
+        (unspec_volatile:DI [(const_int 0)] UNSPECV_GETTB))]
+  "TARGET_POWERPC64"
+{
+  if (TARGET_MFCRF)
+    return "mfspr %0, 268";
+  else
+    return "mftb %0";
+})
+
+(define_insn "rs6000_mftb_<mode>"
+  [(set (match_operand:P 0 "gpc_reg_operand" "=r")
+        (unspec_volatile:P [(const_int 0)] UNSPECV_MFTB))]
+  ""
+  {
+  if (TARGET_MFCRF)
+    return "mfspr %0, 268";
+  else
+    return "mftb %0";
+  })

These are identical; remove the _ppc64 pattern? (The indenting of the {} is wrong in the mftb pattern).


Segher



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