Commit a810a2de170565529464072edf2102443aaa9fab
1 parent
e8fc4fa7
Some fixes for TCG debugging
This fixes a few things after Paul's improvements for TCG debugging:
- change TCGv_i64 field name to something different from
TCGv_i32
- fix things in tcg that the above change made visible.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5919 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
7 additions
and
7 deletions
tcg/tcg-op.h
| ... | ... | @@ -132,7 +132,7 @@ static inline void tcg_gen_ldst_op_i64(int opc, TCGv_i64 val, TCGv_ptr base, |
| 132 | 132 | TCGArg offset) |
| 133 | 133 | { |
| 134 | 134 | *gen_opc_ptr++ = opc; |
| 135 | - *gen_opparam_ptr++ = GET_TCGV_I32(val); | |
| 135 | + *gen_opparam_ptr++ = GET_TCGV_I64(val); | |
| 136 | 136 | *gen_opparam_ptr++ = GET_TCGV_PTR(base); |
| 137 | 137 | *gen_opparam_ptr++ = offset; |
| 138 | 138 | } |
| ... | ... | @@ -166,7 +166,7 @@ static inline void tcg_gen_op4_i32(int opc, TCGv_i32 arg1, TCGv_i32 arg2, |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | static inline void tcg_gen_op4_i64(int opc, TCGv_i64 arg1, TCGv_i64 arg2, |
| 169 | - TCGv_i64 arg3, TCGv_i32 arg4) | |
| 169 | + TCGv_i64 arg3, TCGv_i64 arg4) | |
| 170 | 170 | { |
| 171 | 171 | *gen_opc_ptr++ = opc; |
| 172 | 172 | *gen_opparam_ptr++ = GET_TCGV_I64(arg1); | ... | ... |
tcg/tcg.c
| ... | ... | @@ -747,7 +747,7 @@ char *tcg_get_arg_str_i32(TCGContext *s, char *buf, int buf_size, TCGv_i32 arg) |
| 747 | 747 | |
| 748 | 748 | char *tcg_get_arg_str_i64(TCGContext *s, char *buf, int buf_size, TCGv_i64 arg) |
| 749 | 749 | { |
| 750 | - return tcg_get_arg_str_idx(s, buf, buf_size, GET_TCGV_I32(arg)); | |
| 750 | + return tcg_get_arg_str_idx(s, buf, buf_size, GET_TCGV_I64(arg)); | |
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | static int helper_cmp(const void *p1, const void *p2) | ... | ... |
tcg/tcg.h
| ... | ... | @@ -126,20 +126,20 @@ typedef tcg_target_ulong TCGArg; |
| 126 | 126 | |
| 127 | 127 | typedef struct |
| 128 | 128 | { |
| 129 | - int n; | |
| 129 | + int i32; | |
| 130 | 130 | } TCGv_i32; |
| 131 | 131 | |
| 132 | 132 | typedef struct |
| 133 | 133 | { |
| 134 | - int n; | |
| 134 | + int i64; | |
| 135 | 135 | } TCGv_i64; |
| 136 | 136 | |
| 137 | 137 | #define MAKE_TCGV_I32(i) __extension__ \ |
| 138 | 138 | ({ TCGv_i32 make_tcgv_tmp = {i}; make_tcgv_tmp;}) |
| 139 | 139 | #define MAKE_TCGV_I64(i) __extension__ \ |
| 140 | 140 | ({ TCGv_i64 make_tcgv_tmp = {i}; make_tcgv_tmp;}) |
| 141 | -#define GET_TCGV_I32(t) ((t).n) | |
| 142 | -#define GET_TCGV_I64(t) ((t).n) | |
| 141 | +#define GET_TCGV_I32(t) ((t).i32) | |
| 142 | +#define GET_TCGV_I64(t) ((t).i64) | |
| 143 | 143 | #if TCG_TARGET_REG_BITS == 32 |
| 144 | 144 | #define TCGV_LOW(t) MAKE_TCGV_I32(GET_TCGV_I64(t)) |
| 145 | 145 | #define TCGV_HIGH(t) MAKE_TCGV_I32(GET_TCGV_I64(t) + 1) | ... | ... |