From 7e4597d7aea6a085f5ebfcfe56654d4c46a2ede7 Mon Sep 17 00:00:00 2001 From: bellard Date: Thu, 22 May 2008 16:56:05 +0000 Subject: added debug_insn_start debug instruction git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4531 c046a42c-6fe2-441c-8c8c-71466251a162 --- tcg/tcg-op.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tcg/tcg-op.h') diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index b354100e65..b92b7bd162 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -1291,6 +1291,18 @@ static inline void tcg_gen_macro_2(TCGv ret0, TCGv ret1, int macro_id) #error must include QEMU headers #endif +/* debug info: write the PC of the corresponding QEMU CPU instruction */ +static inline void tcg_gen_debug_insn_start(uint64_t pc) +{ + /* XXX: must really use a 32 bit size for TCGArg in all cases */ +#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS + tcg_gen_op2i(INDEX_op_debug_insn_start, + (uint32_t)(pc), (uint32_t)(pc >> 32)); +#else + tcg_gen_op1i(INDEX_op_debug_insn_start, pc); +#endif +} + static inline void tcg_gen_exit_tb(tcg_target_long val) { tcg_gen_op1i(INDEX_op_exit_tb, val); -- cgit v1.2.3