[llvm] [SystemZ][z/OS] Emit alignment in HLASM syntax (PR #222121)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 07:08:20 PDT 2026
================
@@ -310,30 +281,77 @@ void SystemZHLASMAsmStreamer::EmitComment() {
CommentToEmit.clear();
}
+void SystemZHLASMAsmStreamer::flushPendingAlignment() {
+ if (!PendingAlignSuffix)
+ return;
+ OS << " DS 0" << *PendingAlignSuffix;
+ EmitEOL();
+ PendingAlignSuffix.reset();
+}
+
void SystemZHLASMAsmStreamer::emitValueToAlignment(Align Alignment,
int64_t Fill,
uint8_t FillLen,
unsigned MaxBytesToEmit) {
- emitAlignmentDS(Alignment.value(), Fill, FillLen, MaxBytesToEmit);
+ unsigned int A = Log2(Alignment);
----------------
redstar wrote:
The difference is in the type. `Align` is "is a compact representation of a valid (non-zero power of two) alignment", so I can just call `Log2`. The old code used `value()`, which returns an integer, which is then passed on.
https://github.com/llvm/llvm-project/pull/222121
More information about the llvm-commits
mailing list