Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: lib/Target/X86/AsmParser/X86AsmParser.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/TargetMachine.cpp ('k') | lib/Target/X86/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/X86/AsmParser/X86AsmParser.cpp
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 8ef2a5558da321e0e60f34676af6c1045089c3d9..a6c91329c2287b4670cdb0b5fc0f99770320b1b1 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2753,7 +2753,18 @@ bool X86AsmParser::ParseDirective(AsmToken DirectiveID) {
"a '%' prefix in .intel_syntax");
}
return false;
+ // @LOCALMOD-START
+ } else if (IDVal.startswith(".dwarf_addr_size")) {
+ // For compatibility with NaCl gas, which needs to override the size of
+ // DWARF address values on x86-64 (normally it assumes that the address size
+ // matches the ELF class, which is not currently true for x86-64 NaCl).
+ // Require the size to be 4, since that matches the module address size.
+ if (Parser.getTok().getString() != "4")
+ return Error(DirectiveID.getLoc(), ".dwarf_addr_size must be 4");
+ Parser.Lex();
+ return false;
}
+ // @LOCALMOD-END
return true;
}
« no previous file with comments | « lib/Target/TargetMachine.cpp ('k') | lib/Target/X86/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698