diff options
author | Kevin Enderby <enderby@apple.com> | 2013-12-19 22:02:03 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2013-12-19 22:02:03 +0000 |
commit | 592d3ac226360d2b64c7e9bfa7de07e93c95dfd4 (patch) | |
tree | 7d5f5c3d8e2c56d258aa017fb1a1a10f479a4826 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | e555277780fc1bfd3c1fccf6b6ab905cc89c993a (diff) | |
download | bcm5719-llvm-592d3ac226360d2b64c7e9bfa7de07e93c95dfd4.tar.gz bcm5719-llvm-592d3ac226360d2b64c7e9bfa7de07e93c95dfd4.zip |
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler has a separate code to parser the intel assembly syntax
in X86AsmParser::ParseIntelOperand(). This did not parse directional labels.
And if something like 1f was used as a branch target it would get an
"Unexpected token" error.
The fix starts in X86AsmParser::ParseIntelExpression() in the case for
AsmToken::Integer, it needs to grab the IntVal from the current token
then look for a 'b' or 'f' following the Integer. Then it basically needs to
do what is done in AsmParser::parsePrimaryExpr() for directional
labels. It saves the MCExpr it creates in the IntelExprStateMachine
in the Sym field.
When it returns to X86AsmParser::ParseIntelOperand() it looks
for a non-zero Sym field in the IntelExprStateMachine and if
set it creates a memory operand not an immediate operand
it would normally do for the Integer.
rdar://14961158
llvm-svn: 197728
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
0 files changed, 0 insertions, 0 deletions