aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2019-12-04 10:06:02 +0000
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2019-12-04 11:30:00 +0000
commitb91f239485fb7bb8d29be3e0b60660a2de7570a9 (patch)
tree3d460f81c46ac65d65d2d270ea0fe09c254557b0 /llvm/lib/Support/CommandLine.cpp
parent0cc4b959851e7a2e98388a34e634fa922a1bc444 (diff)
downloadllvm-b91f239485fb7bb8d29be3e0b60660a2de7570a9.zip
llvm-b91f239485fb7bb8d29be3e0b60660a2de7570a9.tar.gz
llvm-b91f239485fb7bb8d29be3e0b60660a2de7570a9.tar.bz2
MipsDelaySlotFiller: Don't move BUNDLE instructions into the delay slot
Summary: In our CHERI fork we use BUNDLE instructions to ensure that a three-instruction sequence to generate a program-counter-relative value is emitted without reordering or insertions (since that would break the 32-bit offset computation). This sequence is created in MipsExpandPseudo and we use finalizeBundle() to create the BUNDLE instruction. However, the delay slot filler currently breaks this pattern since the BUNDLE will be removed and so all instructions are moved into the delay slot. Since the delay slot only executes the first instruction, this results in incorrect computations (and run-time crashes) if the branch is taken. The original test cases uses CHERI instructions, so for the test case here I simple filled a BUNDLE with a no-op DADDiu $sp_64, -16 and DADDiu $sp_64, 16. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: merge_guards_bot, sdardis, hiraditya, jrtc27, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70944
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions