diff options
author | Matthias Braun <matze@braunis.de> | 2016-06-08 00:47:07 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-06-08 00:47:07 +0000 |
commit | 3ef7df9cdfdfc302f557e6f170546e47afe7b8f8 (patch) | |
tree | d50e0172b5e8b7ba543829c4e166bd8376b0dba3 /llvm/lib/CodeGen/MIRParser/MIParser.cpp | |
parent | b202ad6518438f2ce1e0241ab9df81b5706e5e4e (diff) | |
download | bcm5719-llvm-3ef7df9cdfdfc302f557e6f170546e47afe7b8f8.tar.gz bcm5719-llvm-3ef7df9cdfdfc302f557e6f170546e47afe7b8f8.zip |
MIR: Fix parsing of stack object references in MachineMemOperands
The MachineMemOperand parser lacked the code to handle %stack.X
references (%fixed-stack.X was working).
llvm-svn: 272082
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIParser.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp index 41454dd9d66..158502ce353 100644 --- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp @@ -1695,6 +1695,14 @@ bool MIParser::parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV) { // The token was already consumed, so use return here instead of break. return false; } + case MIToken::StackObject: { + int FI; + if (parseStackFrameIndex(FI)) + return true; + PSV = MF.getPSVManager().getFixedStack(FI); + // The token was already consumed, so use return here instead of break. + return false; + } case MIToken::kw_call_entry: { lex(); switch (Token.kind()) { @@ -1726,7 +1734,8 @@ bool MIParser::parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV) { bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) { if (Token.is(MIToken::kw_constant_pool) || Token.is(MIToken::kw_stack) || Token.is(MIToken::kw_got) || Token.is(MIToken::kw_jump_table) || - Token.is(MIToken::FixedStackObject) || Token.is(MIToken::kw_call_entry)) { + Token.is(MIToken::FixedStackObject) || Token.is(MIToken::StackObject) || + Token.is(MIToken::kw_call_entry)) { const PseudoSourceValue *PSV = nullptr; if (parseMemoryPseudoSourceValue(PSV)) return true; |