fix ambiguity in "-d op_opt"
PATCH 1/1 fix ambiguity in "-d op_opt"
In Ful-system emulation, when we use "-d op_opt",we can not find the pc of guestinstruction in logfile.However,we can get this in log by using command "-d op". It is funny that when we use "-d op,op_opt",we get pc in both op's log and op_opt's log.It makes the command "-d op_opt" ambiguous.
wanghuang:ustc
------------
translate_v10.c (工作副本) renamed from translate_v10.c (版本 2) +2 -1
@@ -1150,7 +1150,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); /* Load a halfword onto the instruction register. */ dc->ir = lduw_code(dc->pc);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -1
@@ -3082,7 +3082,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); /* Load a halfword onto the instruction register. */ dc->ir = cris_fetch(dc, dc->pc, 2, 0);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -0
@@ -3207,6 +3207,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { tcg_gen_debug_insn_start(ctx.pc); } + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx.pc); ctx.pc += 4; ret = translate_one(ctxp, insn);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -0
@@ -1873,6 +1873,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); insn = ldl_code(dc->pc); opc = GET_FIELD(insn, 0, 1);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -0
@@ -9036,6 +9036,8 @@ opc3(ctx.opcode), little_endian ? "little" : "big"); if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(ctx.nip); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx.nip); ctx.nip += 4; table = env->opcodes; num_insns++;
translate.c (工作副本) renamed from translate.c (版本 2) +2 -1
@@ -11631,7 +11631,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(ctx->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx->pc); op = MASK_OP_MAJOR(ctx->opcode); rs = (ctx->opcode >> 21) & 0x1f; rt = (ctx->opcode >> 16) & 0x1f;
translate.c (工作副本) renamed from translate.c (版本 2) +2 -0
@@ -9204,6 +9204,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { tcg_gen_debug_insn_start(dc->pc); } + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); if (dc->thumb) { disas_thumb_insn(env, dc);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -1
@@ -1510,7 +1510,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); dc->ir = ir = ldl_code(dc->pc); LOG_DIS("%8.8x\t", dc->ir);
translate.c (工作副本) renamed from translate.c (版本 2) +2 -0
@@ -4070,6 +4070,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(pc_start); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(pc_start); s->pc = pc_start; prefixes = 0; aflag = s->code32;
Quoted 1 line · qemu_wanghuang
In Ful-system emulation, when we use "-d op_opt",we can not find the pc of guestinstruction in logfile.However,we can get this in log by using command "-d op". It is funny that when we use "-d op,op_opt",we get pc in both op's log and op_opt's log.It makes the command "-d
op_opt" ambiguous.
Please add a Signed-off-by: line to your patch.
translate_v10.c (工作副本) line 1154
Quoted 13 lines
wanghuang:ustc
------------
Index:target-cris/translate_v10.c
===================================================================translate_v10.c (工作副本) renamed from translate_v10.c (版本 2) +2
-1@@ -1150,7 +1150,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc);
Instead of adding some more code doing the same, you should use something like:
qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT)
Quoted 111 lines
translate_v10.c (工作副本) renamed from translate_v10.c (版本 2) +0
-0/* Load a halfword onto the instruction register. */ dc->ir = lduw_code(dc->pc);Index:
target-cris/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-1@@ -3082,7 +3082,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); /* Load a halfword onto the instruction register. */ dc->ir = cris_fetch(dc, dc->pc, 2, 0);Index:
target-alpha/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-0@@ -3207,6 +3207,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { tcg_gen_debug_insn_start(ctx.pc); } + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx.pc); ctx.pc += 4; ret = translate_one(ctxp, insn);Index:
target-sparc/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-0@@ -1873,6 +1873,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); insn = ldl_code(dc->pc); opc = GET_FIELD(insn, 0, 1);Index:
target-ppc/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-0@@ -9036,6 +9036,8 @@ opc3(ctx.opcode), little_endian ? "little" : "big"); if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(ctx.nip); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx.nip); ctx.nip += 4; table = env->opcodes; num_insns++;Index:
target-mips/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-1@@ -11631,7 +11631,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(ctx->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(ctx->pc); op = MASK_OP_MAJOR(ctx->opcode); rs = (ctx->opcode >> 21) & 0x1f; rt = (ctx->opcode >> 16) & 0x1f;Index:
target-arm/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-0@@ -9204,6 +9204,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { tcg_gen_debug_insn_start(dc->pc); } + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); if (dc->thumb) { disas_thumb_insn(env, dc);Index:
target-microblaze/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-1@@ -1510,7 +1510,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(dc->pc); - + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(dc->pc); dc->ir = ir = ldl_code(dc->pc); LOG_DIS("%8.8x\t", dc->ir);Index:
target-i386/translate.c
===================================================================translate.c (工作副本) renamed from translate.c (版本 2) +2
-0@@ -4070,6 +4070,8 @@ if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) tcg_gen_debug_insn_start(pc_start); + else if(unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) + tcg_gen_debug_insn_start(pc_start); s->pc = pc_start; prefixes = 0; aflag = s->code32;
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Am Montag 25 April 2011, 11:41:24 schrieb qemu_wanghuang:
Quoted 4 lines
In Ful-system emulation, when we use "-d op_opt",we can not find the pc of guestinstruction in logfile.However,we can get this in log by using command "-d op". It is funny that when we use "-d op,op_opt",we get pc in both op's log and op_opt's log.It makes the command "-d
op_opt" ambiguous.
target-lm32 is missing in this patch.
Signature · 1 line
Michael