diff options
| author | Kai Nacke <kai.peter.nacke@ibm.com> | 2026-02-17 15:55:09 -0500 |
|---|---|---|
| committer | Kai Nacke <kai.peter.nacke@ibm.com> | 2026-02-17 15:55:09 -0500 |
| commit | b9b0a7e615477cd120d8d984b4d8d358623416ae (patch) | |
| tree | 8e22b4b6e3f44c4593d94cd7193b565c26ad1fd6 | |
| parent | 072c0f1f1371b8efc61789fa6033a2be9fba460d (diff) | |
| download | llvm-users/redstar/showencoding.zip llvm-users/redstar/showencoding.tar.gz llvm-users/redstar/showencoding.tar.bz2 | |
Fix formattingusers/redstar/showencoding
| -rw-r--r-- | llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp index 32c9eafd2..d9d5990 100644 --- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp @@ -117,7 +117,7 @@ void SystemZHLASMAsmStreamer::emitAlignmentDS(uint64_t ByteAlignment, raw_ostream &SystemZHLASMAsmStreamer::getCommentOS() { if (!IsVerboseAsm) - return nulls(); // Discard comments unless in verbose asm mode. + return nulls(); // Discard comments unless in verbose asm mode. return CommentStream; } @@ -254,7 +254,7 @@ void SystemZHLASMAsmStreamer::addEncodingComment(const MCInst &Inst, OS << "0b"; for (unsigned J = 8; J--;) { unsigned Bit = (Code[I] >> J) & 1; - unsigned FixupBit = I * 8 + (7-J); + unsigned FixupBit = I * 8 + (7 - J); if (uint8_t MapEntry = FixupMap[FixupBit]) { assert(Bit == 0 && "Encoder wrote into fixed up bit!"); OS << char('A' + MapEntry - 1); @@ -263,8 +263,7 @@ void SystemZHLASMAsmStreamer::addEncodingComment(const MCInst &Inst, } } } - OS << "]"; - EmitEOL(); + OS << "]\n"; for (unsigned I = 0, E = Fixups.size(); I != E; ++I) { MCFixup &F = Fixups[I]; @@ -282,7 +281,7 @@ void SystemZHLASMAsmStreamer::addEncodingComment(const MCInst &Inst, else OS << Info.Name; } - EmitEOL(); + OS << "\n"; } } @@ -290,6 +289,7 @@ void SystemZHLASMAsmStreamer::emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) { // Show the encoding in a comment if we have a code emitter. addEncodingComment(Inst, STI); + EmitEOL(); InstPrinter->printInst(&Inst, 0, "", STI, OS); EmitEOL(); diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h index 34bf5f1..7f018ad 100644 --- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h @@ -84,7 +84,7 @@ public: void AddComment(const Twine &T, bool EOL = true) override; raw_ostream &getCommentOS() override; - + void emitBytes(StringRef Data) override; void emitAlignmentDS(uint64_t ByteAlignment, std::optional<int64_t> Value, |
