aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2012-09-10 16:47:31 -0700
committerStephen Hines <srhines@google.com>2012-09-10 16:47:31 -0700
commit1c4ad5ef4fab105f0c8af7edd026e00502fb6279 (patch)
treecb5bdfd58f776d00be450d0a5585f8f0186585da /lib/AsmParser
parentd62cdbe700ab288e9ad447824066edb7d17167d9 (diff)
parent1dc2591e9ef0730612902f94976ce85bed6859de (diff)
downloadexternal_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.zip
external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.gz
external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.bz2
Merge branch 'upstream' into merge-2012_09_10
Conflicts: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp lib/Support/DynamicLibrary.cpp lib/Support/LockFileManager.cpp Change-Id: I91e94c3a7a76e19c688307c5a480a640a3bd2b7e
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLLexer.cpp2
-rw-r--r--lib/AsmParser/LLParser.cpp10
-rw-r--r--lib/AsmParser/LLToken.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp
index e045804..6e61665 100644
--- a/lib/AsmParser/LLLexer.cpp
+++ b/lib/AsmParser/LLLexer.cpp
@@ -510,6 +510,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(asm);
KEYWORD(sideeffect);
KEYWORD(alignstack);
+ KEYWORD(inteldialect);
KEYWORD(gc);
KEYWORD(ccc);
@@ -554,7 +555,6 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(naked);
KEYWORD(nonlazybind);
KEYWORD(address_safety);
- KEYWORD(ia_nsdialect);
KEYWORD(type);
KEYWORD(opaque);
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index a9c7e98..b0b64d8 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -962,7 +962,6 @@ bool LLParser::ParseOptionalAttrs(Attributes &Attrs, unsigned AttrKind) {
case lltok::kw_naked: Attrs |= Attribute::Naked; break;
case lltok::kw_nonlazybind: Attrs |= Attribute::NonLazyBind; break;
case lltok::kw_address_safety: Attrs |= Attribute::AddressSafety; break;
- case lltok::kw_ia_nsdialect: Attrs |= Attribute::IANSDialect; break;
case lltok::kw_alignstack: {
unsigned Alignment;
@@ -2070,16 +2069,18 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
case lltok::kw_asm: {
// ValID ::= 'asm' SideEffect? AlignStack? STRINGCONSTANT ',' STRINGCONSTANT
- bool HasSideEffect, AlignStack;
+ bool HasSideEffect, AlignStack, AsmDialect;
Lex.Lex();
if (ParseOptionalToken(lltok::kw_sideeffect, HasSideEffect) ||
ParseOptionalToken(lltok::kw_alignstack, AlignStack) ||
+ ParseOptionalToken(lltok::kw_inteldialect, AsmDialect) ||
ParseStringConstant(ID.StrVal) ||
ParseToken(lltok::comma, "expected comma in inline asm expression") ||
ParseToken(lltok::StringConstant, "expected constraint string"))
return true;
ID.StrVal2 = Lex.getStrVal();
- ID.UIntVal = unsigned(HasSideEffect) | (unsigned(AlignStack)<<1);
+ ID.UIntVal = unsigned(HasSideEffect) | (unsigned(AlignStack)<<1) |
+ (unsigned(AsmDialect)<<2);
ID.Kind = ValID::t_InlineAsm;
return false;
}
@@ -2496,7 +2497,8 @@ bool LLParser::ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
PTy ? dyn_cast<FunctionType>(PTy->getElementType()) : 0;
if (!FTy || !InlineAsm::Verify(FTy, ID.StrVal2))
return Error(ID.Loc, "invalid type for inline asm constraint string");
- V = InlineAsm::get(FTy, ID.StrVal, ID.StrVal2, ID.UIntVal&1, ID.UIntVal>>1);
+ V = InlineAsm::get(FTy, ID.StrVal, ID.StrVal2, ID.UIntVal&1,
+ (ID.UIntVal>>1)&1, (InlineAsm::AsmDialect(ID.UIntVal>>2)));
return false;
}
case ValID::t_MDNode:
diff --git a/lib/AsmParser/LLToken.h b/lib/AsmParser/LLToken.h
index 9fd63f2..37cbf30 100644
--- a/lib/AsmParser/LLToken.h
+++ b/lib/AsmParser/LLToken.h
@@ -72,6 +72,7 @@ namespace lltok {
kw_asm,
kw_sideeffect,
kw_alignstack,
+ kw_inteldialect,
kw_gc,
kw_c,
@@ -107,7 +108,6 @@ namespace lltok {
kw_naked,
kw_nonlazybind,
kw_address_safety,
- kw_ia_nsdialect,
kw_type,
kw_opaque,