[PATCH] D14120: instruction 'align' in asm blocks works incorrectly with some cases of parameters clean revision
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 10:35:22 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251418: [ms-inline-asm] Leave alignment in bytes if the native assembler uses bytes (authored by rnk).
Changed prior to commit:
http://reviews.llvm.org/D14120?vs=38546&id=38559#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14120
Files:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Index: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
===================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp
@@ -4792,10 +4792,16 @@
OS << ".byte";
break;
case AOK_Align: {
- unsigned Val = AR.Val;
- OS << ".align " << Val;
+ // MS alignment directives are measured in bytes. If the native assembler
+ // measures alignment in bytes, we can pass it straight through.
+ OS << ".align";
+ if (getContext().getAsmInfo()->getAlignmentIsInBytes())
+ break;
- // Skip the original immediate.
+ // Alignment is in log2 form, so print that instead and skip the original
+ // immediate.
+ unsigned Val = AR.Val;
+ OS << ' ' << Val;
assert(Val < 10 && "Expected alignment less then 2^10.");
AdditionalSkip = (Val < 4) ? 2 : Val < 7 ? 3 : 4;
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14120.38559.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151027/16b9ab2c/attachment.bin>
More information about the llvm-commits
mailing list