summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-07-24 09:47:14 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-07-24 09:47:14 +0000
commitbdcfab117c7b7c4408ab5d9a304c054299984dff (patch)
tree1a295080d61e80fade01453fd01d1d8a4f8f8646 /llvm
parent82bad8b02649d6d28039f6c5d43618753077d5b0 (diff)
downloadbcm5719-llvm-bdcfab117c7b7c4408ab5d9a304c054299984dff.tar.gz
bcm5719-llvm-bdcfab117c7b7c4408ab5d9a304c054299984dff.zip
[mips] Fix ll and sc instructions
Summary: The ll and sc instructions for r6 and non-r6 are misplaced. This patch fixes that. Patch by Jyun-Yan You Differential Revision: http://reviews.llvm.org/D4578 llvm-svn: 213847
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 12b339188b1..40dc8e41b05 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -969,16 +969,16 @@ MipsTargetLowering::emitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
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;
OpenPOWER on IntegriCloud