mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
[ms-inline asm] Add support for .att_syntax directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b6d52a5b4a
commit
3c4ecd7dab
@ -1745,7 +1745,10 @@ bool X86AsmParser::ParseDirective(AsmToken DirectiveID) {
|
||||
return ParseDirectiveWord(2, DirectiveID.getLoc());
|
||||
else if (IDVal.startswith(".code"))
|
||||
return ParseDirectiveCode(IDVal, DirectiveID.getLoc());
|
||||
else if (IDVal.startswith(".intel_syntax")) {
|
||||
else if (IDVal.startswith(".att_syntax")) {
|
||||
getParser().setAssemblerDialect(0);
|
||||
return false;
|
||||
} else if (IDVal.startswith(".intel_syntax")) {
|
||||
getParser().setAssemblerDialect(1);
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement)) {
|
||||
if(Parser.getTok().getString() == "noprefix") {
|
||||
|
@ -1,7 +1,9 @@
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown %s | FileCheck %s
|
||||
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=att %s | FileCheck %s
|
||||
|
||||
.intel_syntax
|
||||
_test:
|
||||
// CHECK: movl $257, -4(%rsp)
|
||||
mov DWORD PTR [RSP - 4], 257
|
||||
|
||||
.att_syntax
|
||||
// CHECK: movl $257, -4(%rsp)
|
||||
movl $257, -4(%rsp)
|
Loading…
Reference in New Issue
Block a user