mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
Provide an implementation of getNoopForMachoTarget for SPARC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,6 +37,11 @@ SparcInstrInfo::SparcInstrInfo(SparcSubtarget &ST)
|
|||||||
RI(ST), Subtarget(ST) {
|
RI(ST), Subtarget(ST) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
|
||||||
|
void SparcInstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
|
||||||
|
NopInst.setOpcode(SP::NOP);
|
||||||
|
}
|
||||||
|
|
||||||
/// isLoadFromStackSlot - If the specified machine instruction is a direct
|
/// isLoadFromStackSlot - If the specified machine instruction is a direct
|
||||||
/// load from a stack slot, return the virtual or physical register number of
|
/// load from a stack slot, return the virtual or physical register number of
|
||||||
/// the destination along with the FrameIndex of the loaded stack slot. If
|
/// the destination along with the FrameIndex of the loaded stack slot. If
|
||||||
|
@@ -93,6 +93,8 @@ public:
|
|||||||
const TargetRegisterInfo *TRI) const override;
|
const TargetRegisterInfo *TRI) const override;
|
||||||
|
|
||||||
unsigned getGlobalBaseReg(MachineFunction *MF) const;
|
unsigned getGlobalBaseReg(MachineFunction *MF) const;
|
||||||
|
|
||||||
|
void getNoopForMachoTarget(MCInst &NopInst) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
8
test/CodeGen/SPARC/empty-functions.ll
Normal file
8
test/CodeGen/SPARC/empty-functions.ll
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
; RUN: llc < %s -mtriple=sparc-unknown-openbsd -disable-fp-elim | FileCheck -check-prefix=CHECK-FP-LABEL %s
|
||||||
|
|
||||||
|
define void @func() {
|
||||||
|
entry:
|
||||||
|
unreachable
|
||||||
|
}
|
||||||
|
; CHECK-FP-LABEL: {{_?}}func:
|
||||||
|
; CHECK-FP-LABEL: nop {{[;!]}} avoids zero-length function
|
Reference in New Issue
Block a user