[PATCH] Fix ll and sc instructions

Jyun-Yan You jyyou.tw at gmail.com
Thu Jul 17 19:54:02 PDT 2014


Hi dsanders,

The ll and sc instructions for r6 and non-r6 are misplaced. This patch fixes that.

http://reviews.llvm.org/D4578

Files:
  lib/Target/Mips/MipsISelLowering.cpp

Index: lib/Target/Mips/MipsISelLowering.cpp
===================================================================
--- lib/Target/Mips/MipsISelLowering.cpp
+++ lib/Target/Mips/MipsISelLowering.cpp
@@ -968,16 +968,16 @@
       LL = Mips::LL_MM;
       SC = Mips::SC_MM;
     } else {
-      LL = Subtarget->hasMips32r6() ? Mips::LL : Mips::LL_R6;
-      SC = Subtarget->hasMips32r6() ? Mips::SC : Mips::SC_R6;
+      LL = Subtarget->hasMips32r6() ? Mips::LL_R6 : Mips::LL;
+      SC = Subtarget->hasMips32r6() ? Mips::SC_R6 : Mips::SC;
     }
     AND = Mips::AND;
     NOR = Mips::NOR;
     ZERO = Mips::ZERO;
     BEQ = Mips::BEQ;
   } else {
-    LL = Subtarget->hasMips64r6() ? Mips::LLD : Mips::LLD_R6;
-    SC = Subtarget->hasMips64r6() ? Mips::SCD : Mips::SCD_R6;
+    LL = Subtarget->hasMips64r6() ? Mips::LLD_R6 : Mips::LLD;
+    SC = Subtarget->hasMips64r6() ? Mips::SCD_R6 : Mips::SCD;
     AND = Mips::AND64;
     NOR = Mips::NOR64;
     ZERO = Mips::ZERO_64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4578.11625.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140718/cfeaeea4/attachment.bin>


More information about the llvm-commits mailing list