Make .align parse correctly on platforms where .align is measured in bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2010-07-19 04:17:25 +00:00
parent fc97aeb4e6
commit 5d68ec2229

View File

@ -802,11 +802,14 @@ bool AsmParser::ParseStatement() {
if (IDVal == ".quad") if (IDVal == ".quad")
return ParseDirectiveValue(8); return ParseDirectiveValue(8);
// FIXME: Target hooks for IsPow2. if (IDVal == ".align") {
if (IDVal == ".align") bool IsPow2 = !getContext().getAsmInfo().getAlignmentIsInBytes();
return ParseDirectiveAlign(/*IsPow2=*/true, /*ExprSize=*/1); return ParseDirectiveAlign(IsPow2, /*ExprSize=*/1);
if (IDVal == ".align32") }
return ParseDirectiveAlign(/*IsPow2=*/true, /*ExprSize=*/4); if (IDVal == ".align32") {
bool IsPow2 = !getContext().getAsmInfo().getAlignmentIsInBytes();
return ParseDirectiveAlign(IsPow2, /*ExprSize=*/4);
}
if (IDVal == ".balign") if (IDVal == ".balign")
return ParseDirectiveAlign(/*IsPow2=*/false, /*ExprSize=*/1); return ParseDirectiveAlign(/*IsPow2=*/false, /*ExprSize=*/1);
if (IDVal == ".balignw") if (IDVal == ".balignw")