[llvm] [SystemZ][HLASM] Emit END instruction (PR #146110)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 10:00:57 PDT 2025
================
@@ -33,10 +34,16 @@ void SystemZTargetStreamer::emitConstantPools() {
EXRLTargets2Sym.clear();
}
+SystemZHLASMAsmStreamer &SystemZTargetHLASMStreamer::getHLASMStreamer() {
+ return static_cast<SystemZHLASMAsmStreamer &>(getStreamer());
+}
+
void SystemZTargetHLASMStreamer::emitExtern(StringRef Sym) {
getStreamer().emitRawText(Twine(" EXTRN ") + Twine(Sym));
}
+void SystemZTargetHLASMStreamer::emitEnd() { getHLASMStreamer().emitEnd(); }
----------------
redstar wrote:
`emitExtern()` hard codes the space at the begin. In case we want to change this (e.g. make the output more like the XL output), then we have to bring the formatting into the TargetStreamer. I think it also makes code sharing easier. I expect `emitExtern()` to become more complicated. For functions, it needs to emit a `XATTR` instruction, and for variables it needs to emit `CATTR`. The same code is needed when emitting a label. IMHO it becomes easier when the implementation is just in 1 class.
It's a design choice, other variants are surely possible.
https://github.com/llvm/llvm-project/pull/146110
More information about the llvm-commits
mailing list