Skip to content

Commit 61e493b

Browse files
committed
Correct alignment directive
1 parent 2b19d7a commit 61e493b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/lib/Target/Z80/MCTargetDesc/Z80TargetStreamer.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ void Z80TargetAsmStreamer::emitLabel(MCSymbol *Symbol) {
3434
}
3535

3636
void Z80TargetAsmStreamer::emitAlign(Align Alignment) {
37-
if (auto Mask = Alignment.value() - 1)
38-
Z80GasStyle ? OS << "\t.skip\t($$ - $) and " << Mask << '\n' : OS << "\trb\t($$ - $) and " << Mask << '\n';
37+
if (auto Mask = Alignment.value() - 1) {
38+
if (Z80GasStyle) {
39+
OS << "\t.balign\t" << Alignment.value() << '\n';
40+
} else {
41+
OS << "\trb\t($$ - $) and " << Mask << '\n';
42+
}
43+
}
3944
}
4045

4146
void Z80TargetAsmStreamer::emitBlock(uint64_t NumBytes) {

0 commit comments

Comments
 (0)