[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [5208] Display TCGCond name in tcg dumper ( original patch
From: |
Blue Swirl |
Subject: |
[Qemu-devel] [5208] Display TCGCond name in tcg dumper ( original patch by Tristan Gingold) |
Date: |
Sun, 14 Sep 2008 07:45:17 +0000 |
Revision: 5208
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5208
Author: blueswir1
Date: 2008-09-14 07:45:17 +0000 (Sun, 14 Sep 2008)
Log Message:
-----------
Display TCGCond name in tcg dumper (original patch by Tristan Gingold)
Modified Paths:
--------------
trunk/tcg/tcg.c
Modified: trunk/tcg/tcg.c
===================================================================
--- trunk/tcg/tcg.c 2008-09-14 06:46:31 UTC (rev 5207)
+++ trunk/tcg/tcg.c 2008-09-14 07:45:17 UTC (rev 5208)
@@ -730,6 +730,20 @@
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 @@
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++];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [5208] Display TCGCond name in tcg dumper ( original patch by Tristan Gingold),
Blue Swirl <=