/* This file is autogenerated by tracetool, do not edit. */

#ifndef TRACE_HW_XBOX_MCPX_APU_DSP_GENERATED_TRACERS_H
#define TRACE_HW_XBOX_MCPX_APU_DSP_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_DSP_READ_PERIPHERAL_EVENT;
extern TraceEvent _TRACE_DSP_WRITE_PERIPHERAL_EVENT;
extern TraceEvent _TRACE_DSP56K_EXECUTE_INSTRUCTION_EVENT;
extern TraceEvent _TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM_EVENT;
extern uint16_t _TRACE_DSP_READ_PERIPHERAL_DSTATE;
extern uint16_t _TRACE_DSP_WRITE_PERIPHERAL_DSTATE;
extern uint16_t _TRACE_DSP56K_EXECUTE_INSTRUCTION_DSTATE;
extern uint16_t _TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM_DSTATE;
#define TRACE_DSP_READ_PERIPHERAL_ENABLED 1
#define TRACE_DSP_WRITE_PERIPHERAL_ENABLED 1
#define TRACE_DSP56K_EXECUTE_INSTRUCTION_ENABLED 1
#define TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM_ENABLED 1
#include "qemu/log-for-trace.h"
#include "qemu/error-report.h"


#define TRACE_DSP_READ_PERIPHERAL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DSP_READ_PERIPHERAL) || \
    false)

static inline void _nocheck__trace_dsp_read_peripheral(uint32_t addr, uint32_t val)
{
    if (trace_event_get_state(TRACE_DSP_READ_PERIPHERAL) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 4 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("%d@%zu.%06zu:dsp_read_peripheral " "addr 0x%"PRIx32" val 0x%"PRIx32 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , addr, val);
#line 40 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        } else {
#line 4 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("dsp_read_peripheral " "addr 0x%"PRIx32" val 0x%"PRIx32 "\n", addr, val);
#line 44 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        }
    }
}

static inline void trace_dsp_read_peripheral(uint32_t addr, uint32_t val)
{
    if (true) {
        _nocheck__trace_dsp_read_peripheral(addr, val);
    }
}

#define TRACE_DSP_WRITE_PERIPHERAL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DSP_WRITE_PERIPHERAL) || \
    false)

static inline void _nocheck__trace_dsp_write_peripheral(uint32_t addr, uint32_t val)
{
    if (trace_event_get_state(TRACE_DSP_WRITE_PERIPHERAL) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 5 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("%d@%zu.%06zu:dsp_write_peripheral " "addr 0x%"PRIx32" val 0x%"PRIx32 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , addr, val);
#line 71 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        } else {
#line 5 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("dsp_write_peripheral " "addr 0x%"PRIx32" val 0x%"PRIx32 "\n", addr, val);
#line 75 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        }
    }
}

static inline void trace_dsp_write_peripheral(uint32_t addr, uint32_t val)
{
    if (true) {
        _nocheck__trace_dsp_write_peripheral(addr, val);
    }
}

#define TRACE_DSP56K_EXECUTE_INSTRUCTION_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DSP56K_EXECUTE_INSTRUCTION) || \
    false)

static inline void _nocheck__trace_dsp56k_execute_instruction(uint32_t id, uint32_t pc)
{
    if (trace_event_get_state(TRACE_DSP56K_EXECUTE_INSTRUCTION) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 8 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("%d@%zu.%06zu:dsp56k_execute_instruction " "[gp=%d]: pc=0x%"PRIx32 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , id, pc);
#line 102 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        } else {
#line 8 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("dsp56k_execute_instruction " "[gp=%d]: pc=0x%"PRIx32 "\n", id, pc);
#line 106 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        }
    }
}

static inline void trace_dsp56k_execute_instruction(uint32_t id, uint32_t pc)
{
    if (true) {
        _nocheck__trace_dsp56k_execute_instruction(id, pc);
    }
}

#define TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM) || \
    false)

static inline void _nocheck__trace_dsp56k_execute_instruction_disasm(const char * disasm)
{
    if (trace_event_get_state(TRACE_DSP56K_EXECUTE_INSTRUCTION_DISASM) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 9 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("%d@%zu.%06zu:dsp56k_execute_instruction_disasm " "%s" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , disasm);
#line 133 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        } else {
#line 9 "../xemu/hw/xbox/mcpx/apu/dsp/trace-events"
            qemu_log("dsp56k_execute_instruction_disasm " "%s" "\n", disasm);
#line 137 "trace/trace-hw_xbox_mcpx_apu_dsp.h"
        }
    }
}

static inline void trace_dsp56k_execute_instruction_disasm(const char * disasm)
{
    if (true) {
        _nocheck__trace_dsp56k_execute_instruction_disasm(disasm);
    }
}
#endif /* TRACE_HW_XBOX_MCPX_APU_DSP_GENERATED_TRACERS_H */
