diff options
author | David Sehr <sehr@chromium.org> | 2012-11-29 12:19:32 -0800 |
---|---|---|
committer | David Sehr <sehr@chromium.org> | 2012-11-29 12:19:32 -0800 |
commit | c78d230cd6d29e8ebb49ebc0c87170a35d707433 (patch) | |
tree | b50f7a1726371380c55a2d329154f749d3179e7b | |
parent | d7da5ec1c1faae820d0c1240c5cac379107f79a9 (diff) |
Conditionalize delay slot hazard checks
Filling the delay slot should not check for NaCl hazards unless the triple
is for NaCl.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=1711
Review URL: https://codereview.chromium.org/11299215
-rw-r--r-- | lib/Target/Mips/MipsDelaySlotFiller.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp index e71c9327f3..8fc5d53741 100644 --- a/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp @@ -173,9 +173,12 @@ bool Filler::findDelayInstr(MachineBasicBlock &MBB, || I->isPseudo() // @LOCALMOD-START // Don't put in delay slot instructions that could be masked. - || IsDangerousLoad(*FI, &Dummy) - || IsDangerousStore(*FI, &Dummy) - || FI->modifiesRegister(Mips::SP, TM.getRegisterInfo()) + || (Triple(TM.getTargetTriple()).getOS() == Triple::NativeClient && + (IsDangerousLoad(*FI, &Dummy) + || IsDangerousStore(*FI, &Dummy) + || FI->modifiesRegister(Mips::SP, TM.getRegisterInfo()) + ) + ) // @LOCALMOD-END // // Should not allow: |