mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,3 +61,21 @@ AlphaInstrInfo::isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned
|
||||
AlphaInstrInfo::isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const {
|
||||
switch (MI->getOpcode()) {
|
||||
case Alpha::STL:
|
||||
case Alpha::STQ:
|
||||
case Alpha::STB:
|
||||
case Alpha::STW:
|
||||
case Alpha::STS:
|
||||
case Alpha::STT:
|
||||
if (MI->getOperand(1).isFrameIndex()) {
|
||||
FrameIndex = MI->getOperand(1).getFrameIndex();
|
||||
return MI->getOperand(0).getReg();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user