From 15938b667ba2523904a2b6ba132367b6f28526e3 Mon Sep 17 00:00:00 2001 From: ramenrrami Date: Tue, 14 Oct 2025 20:15:52 +0200 Subject: [PATCH] jit: add detailed logging for ARM32 instruction registration --- src/jit/decoder/arm32.cpp | 16 ++++++++++++++++ src/jit/decoder/arm32.h | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/jit/decoder/arm32.cpp b/src/jit/decoder/arm32.cpp index 2434a59..1cf9c0d 100644 --- a/src/jit/decoder/arm32.cpp +++ b/src/jit/decoder/arm32.cpp @@ -85,6 +85,7 @@ void arm32_add_instruction(arm32_decoder_t* decoder, const char* name, const cha } ++decoder->instruction_count; + arm32_log_instruction_info(info); /* TODO(GloriousTacoo:jit): Add instruction to lookup table. */ } @@ -131,4 +132,19 @@ void arm32_parse_bitstring(const char* bitstring, uint32_t* mask, uint32_t* expe } } } +void arm32_log_instruction_info(const arm32_instruction_info_t* info) +{ + if (info == nullptr) + { + LOG_TRACE("Attempted to log a null instruction info pointer!"); + return; + } + + LOG_TRACE("========================================"); + LOG_TRACE("Instruction Registered: %s", info->name); + LOG_TRACE("Mask: 0x%08X", info->mask); + LOG_TRACE("Expected: 0x%08X", info->expected); + LOG_TRACE("Priority: %d", info->priority); + LOG_TRACE("========================================"); +} } // namespace pound::jit::decoder diff --git a/src/jit/decoder/arm32.h b/src/jit/decoder/arm32.h index 7b2f79d..6308899 100644 --- a/src/jit/decoder/arm32.h +++ b/src/jit/decoder/arm32.h @@ -48,5 +48,7 @@ void arm32_add_instruction(arm32_decoder_t* decoder, const char* name, arm32_opc arm32_handler_fn handler); void arm32_ADD_imm_handler(arm32_decoder_t* decoder, arm32_instruction_t instruction); +void arm32_log_instruction_info(const arm32_instruction_info_t* info); + } // namespace pound::jit::decoder -#endif // POUND_JIT_DECODER_ARM32_H +#endif // POUND_JIT_DECODER_ARM32_H \ No newline at end of file