mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
tcg: Improve tcg_out_label and fix its usage for w64
tcg_out_label is always called with a third argument of pointer type which was casted to tcg_target_long. These casts can be avoided by changing the prototype of tcg_out_label. There was also a cast to long. For most hosts with sizeof(long) == sizeof(tcg_target_long) == sizeof(void *) this did not matter, but for w64 it was wrong. This is fixed now. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
f7cf5d5b71
commit
9d6fca70c7
4 changed files with 14 additions and 14 deletions
|
@ -1052,7 +1052,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc)
|
|||
|
||||
/* TLB Miss. */
|
||||
/* label1: */
|
||||
tcg_out_label(s, lab1, (tcg_target_long)s->code_ptr);
|
||||
tcg_out_label(s, lab1, s->code_ptr);
|
||||
|
||||
argreg = TCG_REG_R26;
|
||||
tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrlo_reg);
|
||||
|
@ -1089,7 +1089,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc)
|
|||
}
|
||||
|
||||
/* label2: */
|
||||
tcg_out_label(s, lab2, (tcg_target_long)s->code_ptr);
|
||||
tcg_out_label(s, lab2, s->code_ptr);
|
||||
#else
|
||||
tcg_out_qemu_ld_direct(s, datalo_reg, datahi_reg, addrlo_reg,
|
||||
(GUEST_BASE ? TCG_GUEST_BASE_REG : TCG_REG_R0), opc);
|
||||
|
@ -1171,7 +1171,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
|
|||
|
||||
/* TLB Miss. */
|
||||
/* label1: */
|
||||
tcg_out_label(s, lab1, (tcg_target_long)s->code_ptr);
|
||||
tcg_out_label(s, lab1, s->code_ptr);
|
||||
|
||||
argreg = TCG_REG_R26;
|
||||
tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrlo_reg);
|
||||
|
@ -1215,7 +1215,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
|
|||
tcg_out_call(s, qemu_st_helpers[opc]);
|
||||
|
||||
/* label2: */
|
||||
tcg_out_label(s, lab2, (tcg_target_long)s->code_ptr);
|
||||
tcg_out_label(s, lab2, s->code_ptr);
|
||||
#else
|
||||
/* There are no indexed stores, so if GUEST_BASE is set we must do the add
|
||||
explicitly. Careful to avoid R20, which is used for the bswaps to follow. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue