mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
tcg/i386: Remove TARGET_LONG_BITS, TCG_TYPE_TL
All uses can be infered from the INDEX_op_qemu_*_a{32,64}_* opcode being used. Add a field into TCGLabelQemuLdst to record the usage. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
c60ad6e3b9
commit
63f4da91f9
1 changed files with 3 additions and 5 deletions
|
@ -1929,10 +1929,8 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h,
|
||||||
ldst->addrhi_reg = addrhi;
|
ldst->addrhi_reg = addrhi;
|
||||||
|
|
||||||
if (TCG_TARGET_REG_BITS == 64) {
|
if (TCG_TARGET_REG_BITS == 64) {
|
||||||
if (TARGET_LONG_BITS == 64) {
|
ttype = s->addr_type;
|
||||||
ttype = TCG_TYPE_I64;
|
trexw = (ttype == TCG_TYPE_I32 ? 0 : P_REXW);
|
||||||
trexw = P_REXW;
|
|
||||||
}
|
|
||||||
if (TCG_TYPE_PTR == TCG_TYPE_I64) {
|
if (TCG_TYPE_PTR == TCG_TYPE_I64) {
|
||||||
hrexw = P_REXW;
|
hrexw = P_REXW;
|
||||||
if (TARGET_PAGE_BITS + CPU_TLB_DYN_MAX_BITS > 32) {
|
if (TARGET_PAGE_BITS + CPU_TLB_DYN_MAX_BITS > 32) {
|
||||||
|
@ -1977,7 +1975,7 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h,
|
||||||
ldst->label_ptr[0] = s->code_ptr;
|
ldst->label_ptr[0] = s->code_ptr;
|
||||||
s->code_ptr += 4;
|
s->code_ptr += 4;
|
||||||
|
|
||||||
if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) {
|
if (TCG_TARGET_REG_BITS == 32 && s->addr_type == TCG_TYPE_I64) {
|
||||||
/* cmp 4(TCG_REG_L0), addrhi */
|
/* cmp 4(TCG_REG_L0), addrhi */
|
||||||
tcg_out_modrm_offset(s, OPC_CMP_GvEv, addrhi, TCG_REG_L0, cmp_ofs + 4);
|
tcg_out_modrm_offset(s, OPC_CMP_GvEv, addrhi, TCG_REG_L0, cmp_ofs + 4);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue