summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 07:45:17 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 07:45:17 +0000
commitf48f3ede71a43520e0eb71756dc33052aab41837 (patch)
tree9d3f38414f2e98008a387f73066fa850f3cc79cb /tcg
parentac41a6206fe9e1506010cd0aa9cf56ed3b37ae19 (diff)
downloadqemu-f48f3ede71a43520e0eb71756dc33052aab41837.tar.gz
qemu-f48f3ede71a43520e0eb71756dc33052aab41837.tar.bz2
qemu-f48f3ede71a43520e0eb71756dc33052aab41837.zip
Display TCGCond name in tcg dumper (original patch by Tristan Gingold)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5208 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8c1408c4da..1b7bf5ca3b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -730,6 +730,20 @@ static TCGHelperInfo *tcg_find_helper(TCGContext *s, tcg_target_ulong val)
return NULL;
}
+static const char * const cond_name[] =
+{
+ [TCG_COND_EQ] = "eq",
+ [TCG_COND_NE] = "ne",
+ [TCG_COND_LT] = "lt",
+ [TCG_COND_GE] = "ge",
+ [TCG_COND_LE] = "le",
+ [TCG_COND_GT] = "gt",
+ [TCG_COND_LTU] = "ltu",
+ [TCG_COND_GEU] = "geu",
+ [TCG_COND_LEU] = "leu",
+ [TCG_COND_GTU] = "gtu"
+};
+
void tcg_dump_ops(TCGContext *s, FILE *outfile)
{
const uint16_t *opc_ptr;
@@ -841,7 +855,22 @@ void tcg_dump_ops(TCGContext *s, FILE *outfile)
fprintf(outfile, "%s",
tcg_get_arg_str_idx(s, buf, sizeof(buf), args[k++]));
}
- for(i = 0; i < nb_cargs; i++) {
+ if (c == INDEX_op_brcond_i32
+#if TCG_TARGET_REG_BITS == 32
+ || c == INDEX_op_brcond2_i32
+#elif TCG_TARGET_REG_BITS == 64
+ || c == INDEX_op_brcond_i64
+#endif
+ ) {
+ if (args[k] < ARRAY_SIZE(cond_name) && cond_name[args[k]])
+ fprintf(outfile, ",%s", cond_name[args[k++]]);
+ else
+ fprintf(outfile, ",$0x%" TCG_PRIlx, args[k++]);
+ i = 1;
+ }
+ else
+ i = 0;
+ for(; i < nb_cargs; i++) {
if (k != 0)
fprintf(outfile, ",");
arg = args[k++];