Skip to content

Commit

Permalink
[DPWBS-1396] refactor(InstrInfo): make getOffsetBits a member function
Browse files Browse the repository at this point in the history
  • Loading branch information
gargaroff authored and konstantinschwarz committed Mar 18, 2020
1 parent 376cf4e commit b3beca0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/TriCore/TriCoreInstrInfo.cpp
Expand Up @@ -305,8 +305,8 @@ void TriCoreInstrInfo::emitFrameOffset(MachineBasicBlock &MBB,
}
}

static unsigned getOffsetBits(unsigned Opc) {
switch (Opc) {
unsigned TriCoreInstrInfo::getOffsetBits(unsigned Opcode) const {
switch (Opcode) {
default:
llvm_unreachable("unexpected opcode!");
case TriCore::LDB_dalc:
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Target/TriCore/TriCoreInstrInfo.h
Expand Up @@ -55,6 +55,8 @@ class TriCoreInstrInfo : public TriCoreGenInstrInfo {
uint64_t Val,
MachineInstr::MIFlag Flag = MachineInstr::NoFlags) const;

unsigned getOffsetBits(unsigned Opcode) const;

bool doesOffsetFitInOffsetOperand(unsigned Opcode, int64_t Offset) const;
};
} // namespace llvm
Expand Down

0 comments on commit b3beca0

Please sign in to comment.