diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-02-03 03:07:37 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-02-03 03:07:37 +0000 |
commit | 133d3100eafed975b92f0714a959be438edcb32a (patch) | |
tree | 900dfb6d1163982d6185835beb442d2d7351b37f /lib/Target/Alpha/AlphaInstrInfo.cpp | |
parent | 84e752a8129e7a02ee6e3c6d356a8fd68fbdf698 (diff) |
isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaInstrInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp index c64fe3bee9..7089f52e48 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -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; +} + |