[llvm-commits] [llvm] r166526 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Chad Rosier
mcrosier at apple.com
Tue Oct 23 16:42:06 PDT 2012
Author: mcrosier
Date: Tue Oct 23 18:42:06 2012
New Revision: 166526
URL: http://llvm.org/viewvc/llvm-project?rev=166526&view=rev
Log:
[ms-inline asm] Offset operator - the size should be based on the size of a
pointer, not the size of the variable.
Part of rdar://12470317
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=166526&r1=166525&r2=166526&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Oct 23 18:42:06 2012
@@ -774,6 +774,10 @@
Tok.getString() == "OFFSET")) {
OffsetOf = true;
OffsetOfLoc = Parser.getTok().getLoc();
+
+ // Size is based on the size of a pointer, not the size of the variable.
+ assert (!Size && "Unexpected size!");
+ Size = is64BitMode() ? 64 : 32;
Parser.Lex(); // Eat offset.
}
More information about the llvm-commits
mailing list