[PPC/Debug] use the optimized string formatting methods

This commit is contained in:
Herman S.
2025-10-20 17:15:03 +09:00
parent 0d7cca7d2f
commit 16d68c8166
2 changed files with 12 additions and 4 deletions
+4 -1
View File
@@ -141,7 +141,10 @@ bool PPCHIRBuilder::Emit(GuestFunction* function, uint32_t flags) {
AnnotateLabel(address, label);
}
comment_buffer_.Reset();
comment_buffer_.AppendFormat("{:08X} {:08X} ", address, code);
comment_buffer_.AppendHexUInt32(address);
comment_buffer_.Append(' ');
comment_buffer_.AppendHexUInt32(code);
comment_buffer_.Append(' ');
DisasmPPC(address, code, &comment_buffer_);
Comment(comment_buffer_);
first_instr = last_instr();
+8 -3
View File
@@ -289,12 +289,17 @@ void PPCTranslator::DumpSource(GuestFunction* function,
// Check labels.
if (block_it != blocks.end() && block_it->start_address == address) {
string_buffer->AppendFormat("{:08X} loc_{:08X}:\n", address,
address);
string_buffer->AppendHexUInt32(address);
string_buffer->Append(" loc_");
string_buffer->AppendHexUInt32(address);
string_buffer->Append(":\n");
++block_it;
}
string_buffer->AppendFormat("{:08X} {:08X} ", address, code);
string_buffer->AppendHexUInt32(address);
string_buffer->Append(' ');
string_buffer->AppendHexUInt32(code);
string_buffer->Append(" ");
DisasmPPC(address, code, string_buffer);
string_buffer->Append('\n');
}