summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorShiva Chen <shiva@andestech.com>2020-02-14 15:57:11 +0800
committerHans Wennborg <hans@chromium.org>2020-02-20 15:13:56 +0100
commit4bcdac8d762794d822819eb6d207a0630c345d0b (patch)
tree27d585dfc3cb50e675abfcd1b5a8a208ea804c47 /llvm/lib
parentf004359106cfda578733dff1380560b68f9c3713 (diff)
downloadbcm5719-llvm-4bcdac8d762794d822819eb6d207a0630c345d0b.tar.gz
bcm5719-llvm-4bcdac8d762794d822819eb6d207a0630c345d0b.zip
[RISCV] Correct the CallPreservedMask for the function call in an interrupt handler
CallPreservedMask is used to describe the register liveness after a function call. The function call in an interrupt handler should use the same CallPreservedMask as normal functions. So that only callee save registers can live through the function call. (cherry picked from commit 1cae2f9d192c69833e22684ca338660942ab464e)
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp b/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
index 1d41994ef1e..207742520ed 100644
--- a/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
@@ -156,13 +156,6 @@ const uint32_t *
RISCVRegisterInfo::getCallPreservedMask(const MachineFunction & MF,
CallingConv::ID /*CC*/) const {
auto &Subtarget = MF.getSubtarget<RISCVSubtarget>();
- if (MF.getFunction().hasFnAttribute("interrupt")) {
- if (Subtarget.hasStdExtD())
- return CSR_XLEN_F64_Interrupt_RegMask;
- if (Subtarget.hasStdExtF())
- return CSR_XLEN_F32_Interrupt_RegMask;
- return CSR_Interrupt_RegMask;
- }
switch (Subtarget.getTargetABI()) {
default:
OpenPOWER on IntegriCloud