aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2009-10-04 15:30:44 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-10-04 15:30:44 +0200
commit94f4af02a1705974fceb90b47e884f44184b1f22 (patch)
tree62849585b8d4196b1b86e7d8815fbcc0d498c0e1 /tcg/tcg.c
parent8389c67b82a12f9d1ac3c03e41a5d16f44eb82f9 (diff)
downloadqemu-94f4af02a1705974fceb90b47e884f44184b1f22.zip
qemu-94f4af02a1705974fceb90b47e884f44184b1f22.tar.gz
qemu-94f4af02a1705974fceb90b47e884f44184b1f22.tar.bz2
tcg: allocate s->op_dead_iargs dynamically
Similarly to what is already done in tcg_liveness_analysis() when USE_LIVENESS_ANALYSIS is not set. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 3d74809..9f57b6a 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1086,8 +1086,7 @@ static void tcg_liveness_analysis(TCGContext *s)
nb_ops = gen_opc_ptr - gen_opc_buf;
- /* XXX: make it really dynamic */
- s->op_dead_iargs = tcg_malloc(OPC_BUF_SIZE * sizeof(uint16_t));
+ s->op_dead_iargs = tcg_malloc(nb_ops * sizeof(uint16_t));
dead_temps = tcg_malloc(s->nb_temps);
memset(dead_temps, 1, s->nb_temps);