mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
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:
parent
fc97aeb4e6
commit
5d68ec2229
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user