diff options
author | Kevin Enderby <enderby@apple.com> | 2013-12-19 23:16:14 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2013-12-19 23:16:14 +0000 |
commit | 3121da3298fba5e4cb69af67557f74700624a6bd (patch) | |
tree | d35d4b18a97ee630050d81857b1a1fa6e144f0ae /test/MC | |
parent | b4fcab42ca052b215f6445e2b20965e2bfe08dc8 (diff) | |
download | llvm-3121da3298fba5e4cb69af67557f74700624a6bd.tar.gz llvm-3121da3298fba5e4cb69af67557f74700624a6bd.tar.bz2 llvm-3121da3298fba5e4cb69af67557f74700624a6bd.tar.xz |
Un-revert: the buildbot failure in LLVM on lld-x86_64-win7 had me with
this commit as the only one on the Blamelist so I quickly reverted this.
However it was actually Nick's change who has since fixed that issue.
Original commit message:
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler as 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 an 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/X86/intel-syntax-directional-label.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/X86/intel-syntax-directional-label.s b/test/MC/X86/intel-syntax-directional-label.s new file mode 100644 index 0000000000..1ed16733bb --- /dev/null +++ b/test/MC/X86/intel-syntax-directional-label.s @@ -0,0 +1,16 @@ +// RUN: llvm-mc -triple x86_64-apple-darwin -x86-asm-syntax=intel %s | FileCheck %s +// rdar://14961158 + .text + .align 16 + .globl FUNCTION_NAME + .private_extern FUNCTION_NAME +FUNCTION_NAME: + .intel_syntax + cmp rdi, 1 + jge 1f +// CHECK: jge "L11" + add rdi, 2 +1: +// CHECK: "L11": + add rdi, 1 + ret |