diff options
author | Kai Nacke <kai@redstar.de> | 2022-06-07 20:21:25 -0400 |
---|---|---|
committer | Kai Nacke <kai@redstar.de> | 2022-11-13 11:07:25 -0500 |
commit | 710b75b79b1f9564200248609f9c181f0ed8b10e (patch) | |
tree | e90885da55a399c7cfa57a115bbfb29b6b266a91 | |
parent | 42c9d2f118c2b287d6ac189a0f43693c43cd23cc (diff) | |
download | llvm-710b75b79b1f9564200248609f9c181f0ed8b10e.zip llvm-710b75b79b1f9564200248609f9c181f0ed8b10e.tar.gz llvm-710b75b79b1f9564200248609f9c181f0ed8b10e.tar.bz2 |
[m88k] Fix a couple of warnings.
-rw-r--r-- | llvm/lib/Target/M88k/M88kDelaySlotFiller.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/M88k/M88kFrameLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/M88k/M88kInstrInfo.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/M88k/M88kInstrInfo.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/M88k/MCTargetDesc/M88kMCAsmBackend.cpp | 4 |
5 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/M88k/M88kDelaySlotFiller.cpp b/llvm/lib/Target/M88k/M88kDelaySlotFiller.cpp index c6cf99d..6a4a306 100644 --- a/llvm/lib/Target/M88k/M88kDelaySlotFiller.cpp +++ b/llvm/lib/Target/M88k/M88kDelaySlotFiller.cpp @@ -89,7 +89,7 @@ bool M88kDelaySlotFiller::runOnMachineBasicBlock(MachineBasicBlock &MBB) { bool Changed = false; LastFiller = MBB.instr_end(); - unsigned Opc; + int Opc; for (MachineBasicBlock::instr_iterator I = MBB.instr_begin(); I != MBB.instr_end(); ++I) { if ((I->getDesc().isBranch() || I->getDesc().isCall() || diff --git a/llvm/lib/Target/M88k/M88kFrameLowering.cpp b/llvm/lib/Target/M88k/M88kFrameLowering.cpp index b6ede8a..65873ce 100644 --- a/llvm/lib/Target/M88k/M88kFrameLowering.cpp +++ b/llvm/lib/Target/M88k/M88kFrameLowering.cpp @@ -172,7 +172,7 @@ bool M88kFrameLowering::spillCalleeSavedRegisters( MachineFunction *MF = MBB.getParent(); const TargetSubtargetInfo &STI = MF->getSubtarget(); const TargetInstrInfo *TII = STI.getInstrInfo(); - const Register RAReg = STI.getRegisterInfo()->getRARegister(); + //const Register RAReg = STI.getRegisterInfo()->getRARegister(); for (auto &CS : CSI) { // Add the callee-saved register as live-in. diff --git a/llvm/lib/Target/M88k/M88kInstrInfo.cpp b/llvm/lib/Target/M88k/M88kInstrInfo.cpp index cf6177c..838f4e1 100644 --- a/llvm/lib/Target/M88k/M88kInstrInfo.cpp +++ b/llvm/lib/Target/M88k/M88kInstrInfo.cpp @@ -53,8 +53,7 @@ using namespace llvm; void M88kInstrInfo::anchor() {} M88kInstrInfo::M88kInstrInfo(M88kSubtarget &STI) - : M88kGenInstrInfo(M88k::ADJCALLSTACKDOWN, M88k::ADJCALLSTACKUP), RI(), - STI(STI) {} + : M88kGenInstrInfo(M88k::ADJCALLSTACKDOWN, M88k::ADJCALLSTACKUP), RI() {} std::pair<unsigned, unsigned> M88kInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { diff --git a/llvm/lib/Target/M88k/M88kInstrInfo.h b/llvm/lib/Target/M88k/M88kInstrInfo.h index 10385f9..a8829b5 100644 --- a/llvm/lib/Target/M88k/M88kInstrInfo.h +++ b/llvm/lib/Target/M88k/M88kInstrInfo.h @@ -37,8 +37,8 @@ int getOpcodeWithoutDelaySlot(uint16_t Opcode); } // namespace M88k class M88kInstrInfo : public M88kGenInstrInfo { + //M88kSubtarget &STI; const M88kRegisterInfo RI; - M88kSubtarget &STI; virtual void anchor(); diff --git a/llvm/lib/Target/M88k/MCTargetDesc/M88kMCAsmBackend.cpp b/llvm/lib/Target/M88k/MCTargetDesc/M88kMCAsmBackend.cpp index d89b140..5b41b92 100644 --- a/llvm/lib/Target/M88k/MCTargetDesc/M88kMCAsmBackend.cpp +++ b/llvm/lib/Target/M88k/MCTargetDesc/M88kMCAsmBackend.cpp @@ -140,8 +140,8 @@ bool M88kMCAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup, bool M88kMCAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target) { - return Fixup.getKind() == M88k::FK_88K_DISP16 || - Fixup.getKind() == M88k::FK_88K_DISP26; + unsigned Kind = Fixup.getKind(); + return Kind == M88k::FK_88K_DISP16 || Kind == M88k::FK_88K_DISP26; } bool M88kMCAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count, |