|
@@ -28,6 +28,8 @@
|
|
#include "exec/exec-all.h"
|
|
#include "exec/exec-all.h"
|
|
#include "tcg.h"
|
|
#include "tcg.h"
|
|
#include "tcg-op.h"
|
|
#include "tcg-op.h"
|
|
|
|
+#include "trace-tcg.h"
|
|
|
|
+#include "trace/mem.h"
|
|
|
|
|
|
/* Reduce the number of ifdefs below. This assumes that all uses of
|
|
/* Reduce the number of ifdefs below. This assumes that all uses of
|
|
TCGV_HIGH and TCGV_LOW are properly protected by a conditional that
|
|
TCGV_HIGH and TCGV_LOW are properly protected by a conditional that
|
|
@@ -1910,12 +1912,16 @@ static void gen_ldst_i64(TCGOpcode opc, TCGv_i64 val, TCGv addr,
|
|
void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
{
|
|
{
|
|
memop = tcg_canonicalize_memop(memop, 0, 0);
|
|
memop = tcg_canonicalize_memop(memop, 0, 0);
|
|
|
|
+ trace_guest_mem_before_tcg(tcg_ctx.cpu, tcg_ctx.tcg_env,
|
|
|
|
+ addr, trace_mem_get_info(memop, 0));
|
|
gen_ldst_i32(INDEX_op_qemu_ld_i32, val, addr, memop, idx);
|
|
gen_ldst_i32(INDEX_op_qemu_ld_i32, val, addr, memop, idx);
|
|
}
|
|
}
|
|
|
|
|
|
void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
{
|
|
{
|
|
memop = tcg_canonicalize_memop(memop, 0, 1);
|
|
memop = tcg_canonicalize_memop(memop, 0, 1);
|
|
|
|
+ trace_guest_mem_before_tcg(tcg_ctx.cpu, tcg_ctx.tcg_env,
|
|
|
|
+ addr, trace_mem_get_info(memop, 1));
|
|
gen_ldst_i32(INDEX_op_qemu_st_i32, val, addr, memop, idx);
|
|
gen_ldst_i32(INDEX_op_qemu_st_i32, val, addr, memop, idx);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1932,6 +1938,8 @@ void tcg_gen_qemu_ld_i64(TCGv_i64 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
}
|
|
}
|
|
|
|
|
|
memop = tcg_canonicalize_memop(memop, 1, 0);
|
|
memop = tcg_canonicalize_memop(memop, 1, 0);
|
|
|
|
+ trace_guest_mem_before_tcg(tcg_ctx.cpu, tcg_ctx.tcg_env,
|
|
|
|
+ addr, trace_mem_get_info(memop, 0));
|
|
gen_ldst_i64(INDEX_op_qemu_ld_i64, val, addr, memop, idx);
|
|
gen_ldst_i64(INDEX_op_qemu_ld_i64, val, addr, memop, idx);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1943,5 +1951,7 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, TCGArg idx, TCGMemOp memop)
|
|
}
|
|
}
|
|
|
|
|
|
memop = tcg_canonicalize_memop(memop, 1, 1);
|
|
memop = tcg_canonicalize_memop(memop, 1, 1);
|
|
|
|
+ trace_guest_mem_before_tcg(tcg_ctx.cpu, tcg_ctx.tcg_env,
|
|
|
|
+ addr, trace_mem_get_info(memop, 1));
|
|
gen_ldst_i64(INDEX_op_qemu_st_i64, val, addr, memop, idx);
|
|
gen_ldst_i64(INDEX_op_qemu_st_i64, val, addr, memop, idx);
|
|
}
|
|
}
|