提交 19b0516f 编写于 作者: B Blue Swirl 提交者: Alexander Graf

target-s390x: switch to AREG0 free mode

Add an explicit CPUState parameter instead of relying on AREG0.

Remove temporary wrappers and switch to AREG0 free mode.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
[agraf: fix conflicts]
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 089f5c06
...@@ -3829,7 +3829,7 @@ symlink "$source_path/Makefile.target" "$target_dir/Makefile" ...@@ -3829,7 +3829,7 @@ symlink "$source_path/Makefile.target" "$target_dir/Makefile"
case "$target_arch2" in case "$target_arch2" in
alpha | i386 | or32 | sparc* | x86_64 | xtensa* | ppc*) alpha | i386 | or32 | s390x | sparc* | x86_64 | xtensa* | ppc*)
echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
;; ;;
esac esac
......
...@@ -2,5 +2,3 @@ obj-y += translate.o helper.o cpu.o interrupt.o ...@@ -2,5 +2,3 @@ obj-y += translate.o helper.o cpu.o interrupt.o
obj-y += int_helper.o fpu_helper.o cc_helper.o mem_helper.o misc_helper.o obj-y += int_helper.o fpu_helper.o cc_helper.o mem_helper.o misc_helper.o
obj-$(CONFIG_SOFTMMU) += machine.o obj-$(CONFIG_SOFTMMU) += machine.o
obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM) += kvm.o
$(obj)/mem_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
...@@ -1008,14 +1008,4 @@ uint32_t set_cc_nz_f64(float64 v); ...@@ -1008,14 +1008,4 @@ uint32_t set_cc_nz_f64(float64 v);
/* misc_helper.c */ /* misc_helper.c */
void program_interrupt(CPUS390XState *env, uint32_t code, int ilc); void program_interrupt(CPUS390XState *env, uint32_t code, int ilc);
/* temporary wrappers */
uint32_t cpu_ldub_data(CPUS390XState *env, target_ulong ptr);
uint32_t cpu_lduw_data(CPUS390XState *env, target_ulong ptr);
uint32_t cpu_ldl_data(CPUS390XState *env, target_ulong ptr);
uint64_t cpu_ldq_data(CPUS390XState *env, target_ulong ptr);
void cpu_stb_data(CPUS390XState *env, target_ulong ptr, uint32_t data);
void cpu_stw_data(CPUS390XState *env, target_ulong ptr, uint32_t data);
void cpu_stl_data(CPUS390XState *env, target_ulong ptr, uint32_t data);
void cpu_stq_data(CPUS390XState *env, target_ulong ptr, uint64_t data);
#endif #endif
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "cpu.h" #include "cpu.h"
#include "helper.h" #include "helper.h"
/* temporarily disabled due to wrapper use */ #if !defined(CONFIG_USER_ONLY)
#if 0 && !defined(CONFIG_USER_ONLY)
#include "softmmu_exec.h" #include "softmmu_exec.h"
#endif #endif
......
...@@ -499,14 +499,14 @@ static void do_program_interrupt(CPUS390XState *env) ...@@ -499,14 +499,14 @@ static void do_program_interrupt(CPUS390XState *env)
switch (ilc) { switch (ilc) {
case ILC_LATER: case ILC_LATER:
ilc = get_ilc(ldub_code(env->psw.addr)); ilc = get_ilc(cpu_ldub_code(env, env->psw.addr));
break; break;
case ILC_LATER_INC: case ILC_LATER_INC:
ilc = get_ilc(ldub_code(env->psw.addr)); ilc = get_ilc(cpu_ldub_code(env, env->psw.addr));
env->psw.addr += ilc * 2; env->psw.addr += ilc * 2;
break; break;
case ILC_LATER_INC_2: case ILC_LATER_INC_2:
ilc = get_ilc(ldub_code(env->psw.addr)) * 2; ilc = get_ilc(cpu_ldub_code(env, env->psw.addr)) * 2;
env->psw.addr += ilc; env->psw.addr += ilc;
break; break;
} }
......
#include "def-helper.h" #include "def-helper.h"
DEF_HELPER_2(exception, void, env, i32) DEF_HELPER_2(exception, void, env, i32)
DEF_HELPER_3(nc, i32, i32, i64, i64) DEF_HELPER_4(nc, i32, env, i32, i64, i64)
DEF_HELPER_3(oc, i32, i32, i64, i64) DEF_HELPER_4(oc, i32, env, i32, i64, i64)
DEF_HELPER_3(xc, i32, i32, i64, i64) DEF_HELPER_4(xc, i32, env, i32, i64, i64)
DEF_HELPER_3(mvc, void, i32, i64, i64) DEF_HELPER_4(mvc, void, env, i32, i64, i64)
DEF_HELPER_3(clc, i32, i32, i64, i64) DEF_HELPER_4(clc, i32, env, i32, i64, i64)
DEF_HELPER_2(mvcl, i32, i32, i32) DEF_HELPER_3(mvcl, i32, env, i32, i32)
DEF_HELPER_FLAGS_1(set_cc_comp_s32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32) DEF_HELPER_FLAGS_1(set_cc_comp_s32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32)
DEF_HELPER_FLAGS_1(set_cc_comp_s64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64) DEF_HELPER_FLAGS_1(set_cc_comp_s64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64)
DEF_HELPER_FLAGS_2(set_cc_icm, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32) DEF_HELPER_FLAGS_2(set_cc_icm, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32)
DEF_HELPER_3(clm, i32, i32, i32, i64) DEF_HELPER_4(clm, i32, env, i32, i32, i64)
DEF_HELPER_3(stcm, void, i32, i32, i64) DEF_HELPER_4(stcm, void, env, i32, i32, i64)
DEF_HELPER_3(mlg, void, env, i32, i64) DEF_HELPER_3(mlg, void, env, i32, i64)
DEF_HELPER_3(dlg, void, env, i32, i64) DEF_HELPER_3(dlg, void, env, i32, i64)
DEF_HELPER_FLAGS_3(set_cc_add64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64, s64, s64) DEF_HELPER_FLAGS_3(set_cc_add64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64, s64, s64)
...@@ -22,27 +22,27 @@ DEF_HELPER_FLAGS_3(set_cc_sub64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64, s64, s6 ...@@ -22,27 +22,27 @@ DEF_HELPER_FLAGS_3(set_cc_sub64, TCG_CALL_PURE|TCG_CALL_CONST, i32, s64, s64, s6
DEF_HELPER_FLAGS_3(set_cc_subu64, TCG_CALL_PURE|TCG_CALL_CONST, i32, i64, i64, i64) DEF_HELPER_FLAGS_3(set_cc_subu64, TCG_CALL_PURE|TCG_CALL_CONST, i32, i64, i64, i64)
DEF_HELPER_FLAGS_3(set_cc_sub32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32, s32, s32) DEF_HELPER_FLAGS_3(set_cc_sub32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32, s32, s32)
DEF_HELPER_FLAGS_3(set_cc_subu32, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32, i32) DEF_HELPER_FLAGS_3(set_cc_subu32, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32, i32)
DEF_HELPER_3(srst, i32, i32, i32, i32) DEF_HELPER_4(srst, i32, env, i32, i32, i32)
DEF_HELPER_3(clst, i32, i32, i32, i32) DEF_HELPER_4(clst, i32, env, i32, i32, i32)
DEF_HELPER_3(mvpg, void, i64, i64, i64) DEF_HELPER_4(mvpg, void, env, i64, i64, i64)
DEF_HELPER_3(mvst, void, i32, i32, i32) DEF_HELPER_4(mvst, void, env, i32, i32, i32)
DEF_HELPER_3(csg, i32, i32, i64, i32) DEF_HELPER_4(csg, i32, env, i32, i64, i32)
DEF_HELPER_3(cdsg, i32, i32, i64, i32) DEF_HELPER_4(cdsg, i32, env, i32, i64, i32)
DEF_HELPER_3(cs, i32, i32, i64, i32) DEF_HELPER_4(cs, i32, env, i32, i64, i32)
DEF_HELPER_4(ex, i32, i32, i64, i64, i64) DEF_HELPER_5(ex, i32, env, i32, i64, i64, i64)
DEF_HELPER_FLAGS_1(abs_i32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32) DEF_HELPER_FLAGS_1(abs_i32, TCG_CALL_PURE|TCG_CALL_CONST, i32, s32)
DEF_HELPER_FLAGS_1(nabs_i32, TCG_CALL_PURE|TCG_CALL_CONST, s32, s32) DEF_HELPER_FLAGS_1(nabs_i32, TCG_CALL_PURE|TCG_CALL_CONST, s32, s32)
DEF_HELPER_FLAGS_1(abs_i64, TCG_CALL_PURE|TCG_CALL_CONST, i64, s64) DEF_HELPER_FLAGS_1(abs_i64, TCG_CALL_PURE|TCG_CALL_CONST, i64, s64)
DEF_HELPER_FLAGS_1(nabs_i64, TCG_CALL_PURE|TCG_CALL_CONST, s64, s64) DEF_HELPER_FLAGS_1(nabs_i64, TCG_CALL_PURE|TCG_CALL_CONST, s64, s64)
DEF_HELPER_3(stcmh, void, i32, i64, i32) DEF_HELPER_4(stcmh, void, env, i32, i64, i32)
DEF_HELPER_3(icmh, i32, i32, i64, i32) DEF_HELPER_4(icmh, i32, env, i32, i64, i32)
DEF_HELPER_3(ipm, void, env, i32, i32) DEF_HELPER_3(ipm, void, env, i32, i32)
DEF_HELPER_FLAGS_3(addc_u32, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32, i32) DEF_HELPER_FLAGS_3(addc_u32, TCG_CALL_PURE|TCG_CALL_CONST, i32, i32, i32, i32)
DEF_HELPER_FLAGS_3(set_cc_addc_u64, TCG_CALL_PURE|TCG_CALL_CONST, i32, i64, i64, i64) DEF_HELPER_FLAGS_3(set_cc_addc_u64, TCG_CALL_PURE|TCG_CALL_CONST, i32, i64, i64, i64)
DEF_HELPER_3(stam, void, i32, i64, i32) DEF_HELPER_4(stam, void, env, i32, i64, i32)
DEF_HELPER_3(lam, void, i32, i64, i32) DEF_HELPER_4(lam, void, env, i32, i64, i32)
DEF_HELPER_3(mvcle, i32, i32, i64, i32) DEF_HELPER_4(mvcle, i32, env, i32, i64, i32)
DEF_HELPER_3(clcle, i32, i32, i64, i32) DEF_HELPER_4(clcle, i32, env, i32, i64, i32)
DEF_HELPER_4(slb, i32, env, i32, i32, i32) DEF_HELPER_4(slb, i32, env, i32, i32, i32)
DEF_HELPER_5(slbg, i32, env, i32, i32, i64, i64) DEF_HELPER_5(slbg, i32, env, i32, i32, i64, i64)
DEF_HELPER_3(cefbr, void, env, i32, s32) DEF_HELPER_3(cefbr, void, env, i32, s32)
...@@ -110,8 +110,8 @@ DEF_HELPER_FLAGS_3(tcxb, TCG_CALL_PURE, i32, env, i32, i64) ...@@ -110,8 +110,8 @@ DEF_HELPER_FLAGS_3(tcxb, TCG_CALL_PURE, i32, env, i32, i64)
DEF_HELPER_3(flogr, i32, env, i32, i64) DEF_HELPER_3(flogr, i32, env, i32, i64)
DEF_HELPER_3(sqdbr, void, env, i32, i32) DEF_HELPER_3(sqdbr, void, env, i32, i32)
DEF_HELPER_FLAGS_1(cvd, TCG_CALL_PURE|TCG_CALL_CONST, i64, s32) DEF_HELPER_FLAGS_1(cvd, TCG_CALL_PURE|TCG_CALL_CONST, i64, s32)
DEF_HELPER_3(unpk, void, i32, i64, i64) DEF_HELPER_4(unpk, void, env, i32, i64, i64)
DEF_HELPER_3(tr, void, i32, i64, i64) DEF_HELPER_4(tr, void, env, i32, i64, i64)
DEF_HELPER_3(servc, i32, env, i32, i64) DEF_HELPER_3(servc, i32, env, i32, i64)
DEF_HELPER_4(diag, i64, env, i32, i64, i64) DEF_HELPER_4(diag, i64, env, i32, i64, i64)
...@@ -127,24 +127,24 @@ DEF_HELPER_FLAGS_2(stckc, TCG_CALL_CONST, void, env, i64) ...@@ -127,24 +127,24 @@ DEF_HELPER_FLAGS_2(stckc, TCG_CALL_CONST, void, env, i64)
DEF_HELPER_FLAGS_2(spt, TCG_CALL_CONST, void, env, i64) DEF_HELPER_FLAGS_2(spt, TCG_CALL_CONST, void, env, i64)
DEF_HELPER_FLAGS_2(stpt, TCG_CALL_CONST, void, env, i64) DEF_HELPER_FLAGS_2(stpt, TCG_CALL_CONST, void, env, i64)
DEF_HELPER_4(stsi, i32, env, i64, i32, i32) DEF_HELPER_4(stsi, i32, env, i64, i32, i32)
DEF_HELPER_3(lctl, void, i32, i64, i32) DEF_HELPER_4(lctl, void, env, i32, i64, i32)
DEF_HELPER_3(lctlg, void, i32, i64, i32) DEF_HELPER_4(lctlg, void, env, i32, i64, i32)
DEF_HELPER_3(stctl, void, i32, i64, i32) DEF_HELPER_4(stctl, void, env, i32, i64, i32)
DEF_HELPER_3(stctg, void, i32, i64, i32) DEF_HELPER_4(stctg, void, env, i32, i64, i32)
DEF_HELPER_FLAGS_2(tprot, TCG_CALL_CONST, i32, i64, i64) DEF_HELPER_FLAGS_2(tprot, TCG_CALL_CONST, i32, i64, i64)
DEF_HELPER_FLAGS_1(iske, TCG_CALL_PURE|TCG_CALL_CONST, i64, i64) DEF_HELPER_FLAGS_2(iske, TCG_CALL_PURE|TCG_CALL_CONST, i64, env, i64)
DEF_HELPER_FLAGS_2(sske, TCG_CALL_CONST, void, i32, i64) DEF_HELPER_FLAGS_3(sske, TCG_CALL_CONST, void, env, i32, i64)
DEF_HELPER_FLAGS_2(rrbe, TCG_CALL_CONST, i32, i32, i64) DEF_HELPER_FLAGS_3(rrbe, TCG_CALL_CONST, i32, env, i32, i64)
DEF_HELPER_2(csp, i32, i32, i32) DEF_HELPER_3(csp, i32, env, i32, i32)
DEF_HELPER_3(mvcs, i32, i64, i64, i64) DEF_HELPER_4(mvcs, i32, env, i64, i64, i64)
DEF_HELPER_3(mvcp, i32, i64, i64, i64) DEF_HELPER_4(mvcp, i32, env, i64, i64, i64)
DEF_HELPER_4(sigp, i32, env, i64, i32, i64) DEF_HELPER_4(sigp, i32, env, i64, i32, i64)
DEF_HELPER_2(sacf, void, env, i64) DEF_HELPER_2(sacf, void, env, i64)
DEF_HELPER_FLAGS_2(ipte, TCG_CALL_CONST, void, i64, i64) DEF_HELPER_FLAGS_3(ipte, TCG_CALL_CONST, void, env, i64, i64)
DEF_HELPER_FLAGS_0(ptlb, TCG_CALL_CONST, void) DEF_HELPER_FLAGS_1(ptlb, TCG_CALL_CONST, void, env)
DEF_HELPER_2(lra, i32, i64, i32) DEF_HELPER_3(lra, i32, env, i64, i32)
DEF_HELPER_2(stura, void, i64, i32) DEF_HELPER_3(stura, void, env, i64, i32)
DEF_HELPER_2(cksm, void, i32, i32) DEF_HELPER_3(cksm, void, env, i32, i32)
DEF_HELPER_FLAGS_5(calc_cc, TCG_CALL_PURE|TCG_CALL_CONST, DEF_HELPER_FLAGS_5(calc_cc, TCG_CALL_PURE|TCG_CALL_CONST,
i32, env, i32, i64, i64, i64) i32, env, i32, i64, i64, i64)
......
此差异已折叠。
...@@ -31,10 +31,7 @@ ...@@ -31,10 +31,7 @@
#endif #endif
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
/* temporarily disabled due to wrapper use */
#if 0
#include "softmmu_exec.h" #include "softmmu_exec.h"
#endif
#include "sysemu.h" #include "sysemu.h"
#endif #endif
......
...@@ -276,19 +276,19 @@ static inline void potential_page_fault(DisasContext *s) ...@@ -276,19 +276,19 @@ static inline void potential_page_fault(DisasContext *s)
static inline uint64_t ld_code2(uint64_t pc) static inline uint64_t ld_code2(uint64_t pc)
{ {
return (uint64_t)lduw_code(pc); return (uint64_t)cpu_lduw_code(cpu_single_env, pc);
} }
static inline uint64_t ld_code4(uint64_t pc) static inline uint64_t ld_code4(uint64_t pc)
{ {
return (uint64_t)ldl_code(pc); return (uint64_t)cpu_ldl_code(cpu_single_env, pc);
} }
static inline uint64_t ld_code6(uint64_t pc) static inline uint64_t ld_code6(uint64_t pc)
{ {
uint64_t opc; uint64_t opc;
opc = (uint64_t)lduw_code(pc) << 32; opc = (uint64_t)cpu_lduw_code(cpu_single_env, pc) << 32;
opc |= (uint64_t)(uint32_t)ldl_code(pc+2); opc |= (uint64_t)(uint32_t)cpu_ldl_code(cpu_single_env, pc + 2);
return opc; return opc;
} }
...@@ -1263,7 +1263,7 @@ static void gen_op_mvc(DisasContext *s, int l, TCGv_i64 s1, TCGv_i64 s2) ...@@ -1263,7 +1263,7 @@ static void gen_op_mvc(DisasContext *s, int l, TCGv_i64 s1, TCGv_i64 s2)
/* Fall back to helper */ /* Fall back to helper */
vl = tcg_const_i32(l); vl = tcg_const_i32(l);
potential_page_fault(s); potential_page_fault(s);
gen_helper_mvc(vl, s1, s2); gen_helper_mvc(cpu_env, vl, s1, s2);
tcg_temp_free_i32(vl); tcg_temp_free_i32(vl);
return; return;
} }
...@@ -1455,7 +1455,7 @@ static void gen_op_clc(DisasContext *s, int l, TCGv_i64 s1, TCGv_i64 s2) ...@@ -1455,7 +1455,7 @@ static void gen_op_clc(DisasContext *s, int l, TCGv_i64 s1, TCGv_i64 s2)
potential_page_fault(s); potential_page_fault(s);
vl = tcg_const_i32(l); vl = tcg_const_i32(l);
gen_helper_clc(cc_op, vl, s1, s2); gen_helper_clc(cc_op, cpu_env, vl, s1, s2);
tcg_temp_free_i32(vl); tcg_temp_free_i32(vl);
set_cc_static(s); set_cc_static(s);
} }
...@@ -2094,7 +2094,7 @@ do_mh: ...@@ -2094,7 +2094,7 @@ do_mh:
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stcmh(tmp32_1, tmp, tmp32_2); gen_helper_stcmh(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -2107,7 +2107,7 @@ do_mh: ...@@ -2107,7 +2107,7 @@ do_mh:
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_lctlg(tmp32_1, tmp, tmp32_2); gen_helper_lctlg(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -2119,7 +2119,7 @@ do_mh: ...@@ -2119,7 +2119,7 @@ do_mh:
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stctg(tmp32_1, tmp, tmp32_2); gen_helper_stctg(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -2131,7 +2131,7 @@ do_mh: ...@@ -2131,7 +2131,7 @@ do_mh:
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
/* XXX rewrite in tcg */ /* XXX rewrite in tcg */
gen_helper_csg(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_csg(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -2143,7 +2143,7 @@ do_mh: ...@@ -2143,7 +2143,7 @@ do_mh:
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
/* XXX rewrite in tcg */ /* XXX rewrite in tcg */
gen_helper_cdsg(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_cdsg(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -2183,7 +2183,7 @@ do_mh: ...@@ -2183,7 +2183,7 @@ do_mh:
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
/* XXX split CC calculation out */ /* XXX split CC calculation out */
gen_helper_icmh(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_icmh(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -2635,7 +2635,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2635,7 +2635,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r2); tmp32_2 = tcg_const_i32(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_cksm(tmp32_1, tmp32_2); gen_helper_cksm(cpu_env, tmp32_1, tmp32_2);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
gen_op_movi_cc(s, 0); gen_op_movi_cc(s, 0);
...@@ -2664,7 +2664,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2664,7 +2664,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp2 = load_reg(r1); tmp2 = load_reg(r1);
tmp3 = load_reg(r2); tmp3 = load_reg(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_mvpg(tmp, tmp2, tmp3); gen_helper_mvpg(cpu_env, tmp, tmp2, tmp3);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i64(tmp2); tcg_temp_free_i64(tmp2);
tcg_temp_free_i64(tmp3); tcg_temp_free_i64(tmp3);
...@@ -2676,7 +2676,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2676,7 +2676,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp32_2 = tcg_const_i32(r1); tmp32_2 = tcg_const_i32(r1);
tmp32_3 = tcg_const_i32(r2); tmp32_3 = tcg_const_i32(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_mvst(tmp32_1, tmp32_2, tmp32_3); gen_helper_mvst(cpu_env, tmp32_1, tmp32_2, tmp32_3);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
tcg_temp_free_i32(tmp32_3); tcg_temp_free_i32(tmp32_3);
...@@ -2687,7 +2687,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2687,7 +2687,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp32_2 = tcg_const_i32(r1); tmp32_2 = tcg_const_i32(r1);
tmp32_3 = tcg_const_i32(r2); tmp32_3 = tcg_const_i32(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_clst(cc_op, tmp32_1, tmp32_2, tmp32_3); gen_helper_clst(cc_op, cpu_env, tmp32_1, tmp32_2, tmp32_3);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -2698,7 +2698,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2698,7 +2698,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp32_2 = tcg_const_i32(r1); tmp32_2 = tcg_const_i32(r1);
tmp32_3 = tcg_const_i32(r2); tmp32_3 = tcg_const_i32(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_srst(cc_op, tmp32_1, tmp32_2, tmp32_3); gen_helper_srst(cc_op, cpu_env, tmp32_1, tmp32_2, tmp32_3);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -2785,7 +2785,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2785,7 +2785,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
case 0x0d: /* PTLB [S] */ case 0x0d: /* PTLB [S] */
/* Purge TLB */ /* Purge TLB */
check_privileged(s, ilc); check_privileged(s, ilc);
gen_helper_ptlb(); gen_helper_ptlb(cpu_env);
break; break;
case 0x10: /* SPX D2(B2) [S] */ case 0x10: /* SPX D2(B2) [S] */
/* Set Prefix Register */ /* Set Prefix Register */
...@@ -2828,7 +2828,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2828,7 +2828,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
r2 = insn & 0xf; r2 = insn & 0xf;
tmp = load_reg(r1); tmp = load_reg(r1);
tmp2 = load_reg(r2); tmp2 = load_reg(r2);
gen_helper_ipte(tmp, tmp2); gen_helper_ipte(cpu_env, tmp, tmp2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i64(tmp2); tcg_temp_free_i64(tmp2);
break; break;
...@@ -2839,7 +2839,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2839,7 +2839,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
r2 = insn & 0xf; r2 = insn & 0xf;
tmp = load_reg(r2); tmp = load_reg(r2);
tmp2 = tcg_temp_new_i64(); tmp2 = tcg_temp_new_i64();
gen_helper_iske(tmp2, tmp); gen_helper_iske(tmp2, cpu_env, tmp);
store_reg(r1, tmp2); store_reg(r1, tmp2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i64(tmp2); tcg_temp_free_i64(tmp2);
...@@ -2851,7 +2851,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2851,7 +2851,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
r2 = insn & 0xf; r2 = insn & 0xf;
tmp32_1 = load_reg32(r1); tmp32_1 = load_reg32(r1);
tmp = load_reg(r2); tmp = load_reg(r2);
gen_helper_rrbe(cc_op, tmp32_1, tmp); gen_helper_rrbe(cc_op, cpu_env, tmp32_1, tmp);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
...@@ -2863,7 +2863,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2863,7 +2863,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
r2 = insn & 0xf; r2 = insn & 0xf;
tmp32_1 = load_reg32(r1); tmp32_1 = load_reg32(r1);
tmp = load_reg(r2); tmp = load_reg(r2);
gen_helper_sske(tmp32_1, tmp); gen_helper_sske(cpu_env, tmp32_1, tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
break; break;
...@@ -2880,7 +2880,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2880,7 +2880,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
tmp32_1 = load_reg32(r1); tmp32_1 = load_reg32(r1);
tmp = load_reg(r2); tmp = load_reg(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stura(tmp, tmp32_1); gen_helper_stura(cpu_env, tmp, tmp32_1);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
break; break;
...@@ -2891,7 +2891,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) ...@@ -2891,7 +2891,7 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn)
r2 = insn & 0xf; r2 = insn & 0xf;
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r2); tmp32_2 = tcg_const_i32(r2);
gen_helper_csp(cc_op, tmp32_1, tmp32_2); gen_helper_csp(cc_op, cpu_env, tmp32_1, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -3865,7 +3865,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -3865,7 +3865,7 @@ static void disas_s390_insn(DisasContext *s)
int ilc; int ilc;
int l1; int l1;
opc = ldub_code(s->pc); opc = cpu_ldub_code(cpu_single_env, s->pc);
LOG_DISAS("opc 0x%x\n", opc); LOG_DISAS("opc 0x%x\n", opc);
ilc = get_ilc(opc); ilc = get_ilc(opc);
...@@ -3951,7 +3951,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -3951,7 +3951,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r2); tmp32_2 = tcg_const_i32(r2);
potential_page_fault(s); potential_page_fault(s);
gen_helper_mvcl(cc_op, tmp32_1, tmp32_2); gen_helper_mvcl(cc_op, cpu_env, tmp32_1, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4165,7 +4165,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4165,7 +4165,7 @@ static void disas_s390_insn(DisasContext *s)
tmp3 = tcg_const_i64(s->pc + 4); tmp3 = tcg_const_i64(s->pc + 4);
update_psw_addr(s); update_psw_addr(s);
gen_op_calc_cc(s); gen_op_calc_cc(s);
gen_helper_ex(cc_op, cc_op, tmp2, tmp, tmp3); gen_helper_ex(cc_op, cpu_env, cc_op, tmp2, tmp, tmp3);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i64(tmp2); tcg_temp_free_i64(tmp2);
...@@ -4694,7 +4694,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4694,7 +4694,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_lam(tmp32_1, tmp, tmp32_2); gen_helper_lam(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4706,7 +4706,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4706,7 +4706,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stam(tmp32_1, tmp, tmp32_2); gen_helper_stam(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4732,7 +4732,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4732,7 +4732,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_mvcle(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_mvcle(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -4745,7 +4745,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4745,7 +4745,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_clcle(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_clcle(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -4789,7 +4789,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4789,7 +4789,7 @@ static void disas_s390_insn(DisasContext *s)
tmp = decode_rx(s, insn, &r1, &x2, &b2, &d2); tmp = decode_rx(s, insn, &r1, &x2, &b2, &d2);
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
potential_page_fault(s); potential_page_fault(s);
gen_helper_lra(cc_op, tmp, tmp32_1); gen_helper_lra(cc_op, cpu_env, tmp, tmp32_1);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -4835,7 +4835,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4835,7 +4835,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stctl(tmp32_1, tmp, tmp32_2); gen_helper_stctl(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4849,7 +4849,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4849,7 +4849,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_lctl(tmp32_1, tmp, tmp32_2); gen_helper_lctl(cpu_env, tmp32_1, tmp, tmp32_2);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4869,7 +4869,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4869,7 +4869,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = tcg_const_i32(r1); tmp32_1 = tcg_const_i32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_cs(cc_op, tmp32_1, tmp, tmp32_2); gen_helper_cs(cc_op, cpu_env, tmp32_1, tmp, tmp32_2);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -4882,7 +4882,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4882,7 +4882,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = load_reg32(r1); tmp32_1 = load_reg32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_clm(cc_op, tmp32_1, tmp32_2, tmp); gen_helper_clm(cc_op, cpu_env, tmp32_1, tmp32_2, tmp);
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
...@@ -4895,7 +4895,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4895,7 +4895,7 @@ static void disas_s390_insn(DisasContext *s)
tmp32_1 = load_reg32(r1); tmp32_1 = load_reg32(r1);
tmp32_2 = tcg_const_i32(r3); tmp32_2 = tcg_const_i32(r3);
potential_page_fault(s); potential_page_fault(s);
gen_helper_stcm(tmp32_1, tmp32_2, tmp); gen_helper_stcm(cpu_env, tmp32_1, tmp32_2, tmp);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_1);
tcg_temp_free_i32(tmp32_2); tcg_temp_free_i32(tmp32_2);
...@@ -4992,7 +4992,7 @@ static void disas_s390_insn(DisasContext *s) ...@@ -4992,7 +4992,7 @@ static void disas_s390_insn(DisasContext *s)
break; break;
case 0xd4: case 0xd4:
potential_page_fault(s); potential_page_fault(s);
gen_helper_nc(cc_op, vl, tmp, tmp2); gen_helper_nc(cc_op, cpu_env, vl, tmp, tmp2);
set_cc_static(s); set_cc_static(s);
break; break;
case 0xd5: case 0xd5:
...@@ -5000,22 +5000,22 @@ static void disas_s390_insn(DisasContext *s) ...@@ -5000,22 +5000,22 @@ static void disas_s390_insn(DisasContext *s)
break; break;
case 0xd6: case 0xd6:
potential_page_fault(s); potential_page_fault(s);
gen_helper_oc(cc_op, vl, tmp, tmp2); gen_helper_oc(cc_op, cpu_env, vl, tmp, tmp2);
set_cc_static(s); set_cc_static(s);
break; break;
case 0xd7: case 0xd7:
potential_page_fault(s); potential_page_fault(s);
gen_helper_xc(cc_op, vl, tmp, tmp2); gen_helper_xc(cc_op, cpu_env, vl, tmp, tmp2);
set_cc_static(s); set_cc_static(s);
break; break;
case 0xdc: case 0xdc:
potential_page_fault(s); potential_page_fault(s);
gen_helper_tr(vl, tmp, tmp2); gen_helper_tr(cpu_env, vl, tmp, tmp2);
set_cc_static(s); set_cc_static(s);
break; break;
case 0xf3: case 0xf3:
potential_page_fault(s); potential_page_fault(s);
gen_helper_unpk(vl, tmp, tmp2); gen_helper_unpk(cpu_env, vl, tmp, tmp2);
break; break;
default: default:
tcg_abort(); tcg_abort();
...@@ -5040,9 +5040,9 @@ static void disas_s390_insn(DisasContext *s) ...@@ -5040,9 +5040,9 @@ static void disas_s390_insn(DisasContext *s)
tmp2 = get_address(s, 0, b1, d1); tmp2 = get_address(s, 0, b1, d1);
tmp3 = get_address(s, 0, b2, d2); tmp3 = get_address(s, 0, b2, d2);
if (opc == 0xda) { if (opc == 0xda) {
gen_helper_mvcp(cc_op, tmp, tmp2, tmp3); gen_helper_mvcp(cc_op, cpu_env, tmp, tmp2, tmp3);
} else { } else {
gen_helper_mvcs(cc_op, tmp, tmp2, tmp3); gen_helper_mvcs(cc_op, cpu_env, tmp, tmp2, tmp3);
} }
set_cc_static(s); set_cc_static(s);
tcg_temp_free_i64(tmp); tcg_temp_free_i64(tmp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册