tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)
Debian busybox-static for alpha has a load address of 0x0000000120000000 which is mapped to 0x0000000020000000 for 32 bit hosts. qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and qemu_st64 which all raise the assertion (taddr == host_addr). Remove all assertions of this type because they are either wrong or unnecessary (when sizeof(tcg_target_ulong) >= sizeof(target_ulong)). Cc: qemu-stable <qemu-stable@nongnu.org> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
6f20f55bcc
commit
07ac4dc5db
12
tci.c
12
tci.c
@ -1085,7 +1085,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp8 = *(uint8_t *)(host_addr + GUEST_BASE);
|
||||
#endif
|
||||
tci_write_reg8(t0, tmp8);
|
||||
@ -1097,7 +1096,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp8 = *(uint8_t *)(host_addr + GUEST_BASE);
|
||||
#endif
|
||||
tci_write_reg8s(t0, tmp8);
|
||||
@ -1109,7 +1107,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp16 = tswap16(*(uint16_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg16(t0, tmp16);
|
||||
@ -1121,7 +1118,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp16 = tswap16(*(uint16_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg16s(t0, tmp16);
|
||||
@ -1134,7 +1130,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg32(t0, tmp32);
|
||||
@ -1146,7 +1141,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg32s(t0, tmp32);
|
||||
@ -1159,7 +1153,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp32 = tswap32(*(uint32_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg32(t0, tmp32);
|
||||
@ -1174,7 +1167,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
tmp64 = helper_ldq_mmu(env, taddr, tci_read_i(&tb_ptr));
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
tmp64 = tswap64(*(uint64_t *)(host_addr + GUEST_BASE));
|
||||
#endif
|
||||
tci_write_reg(t0, tmp64);
|
||||
@ -1190,7 +1182,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
helper_stb_mmu(env, taddr, t0, t2);
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
*(uint8_t *)(host_addr + GUEST_BASE) = t0;
|
||||
#endif
|
||||
break;
|
||||
@ -1202,7 +1193,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
helper_stw_mmu(env, taddr, t0, t2);
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
*(uint16_t *)(host_addr + GUEST_BASE) = tswap16(t0);
|
||||
#endif
|
||||
break;
|
||||
@ -1214,7 +1204,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
helper_stl_mmu(env, taddr, t0, t2);
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
*(uint32_t *)(host_addr + GUEST_BASE) = tswap32(t0);
|
||||
#endif
|
||||
break;
|
||||
@ -1226,7 +1215,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
|
||||
helper_stq_mmu(env, taddr, tmp64, t2);
|
||||
#else
|
||||
host_addr = (tcg_target_ulong)taddr;
|
||||
assert(taddr == host_addr);
|
||||
*(uint64_t *)(host_addr + GUEST_BASE) = tswap64(tmp64);
|
||||
#endif
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user