[PATCH] D11406: [mips][microMIPS] Implement LWM16, SB16, SH16, SW16, SWSP and SWM16 instructions

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 03:40:16 PST 2015


dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM. There was one unanswered question but after re-reading this patch I'm of the opinion that there's no correct answer and using isGP64bit() as the condition is the most correct answer possible.


================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:4174-4176
@@ -4159,4 +4173,5 @@
       // should be inserted first.
-      if (RegNo == Mips::RA) {
+      if ((isGP64bit() && RegNo == Mips::RA_64) ||
+          (!isGP64bit() && RegNo == Mips::RA)) {
         Regs.push_back(RegNo);
       } else {
----------------
> Do the registers mentioned here contain data or pointers? The reason I ask is that if it's a pointer then isGP64bit() isn't the 
> right predicate (it should be ArePtrs64bit())
> 
> If the answer is 'either', then sticking with isGP64bit() is wrong but it's less wrong than ArePtrs64bit() and there's no right 
> answer without knowing the data type.
> 
> Likewise for the other registers below.

I haven't seen an answer to this question but after re-reading I'm pretty sure the answer is 'either'.


http://reviews.llvm.org/D11406





More information about the llvm-commits mailing list