aboutsummaryrefslogtreecommitdiff
path: root/target-s390x
AgeCommit message (Collapse)Author
2013-01-05target-s390: Convert ADD LOGICAL CARRY and SUBTRACT LOGICAL BORROWRichard Henderson
I'm resonably certain that the carry/borrow-out condition for both helpers was incorrect, failing to take into account the carry-in. Adding the new CC_OP codes also allows removing the awkward interface we used for the slb helpers. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert STORERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert AND, OR, XOR, INSERT IMMEDIATERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD COMPLIMENT, POSITIVE, NEGATIVERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD LOGICAL IMMEDIATERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD AND TESTRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD (LOGICAL) BYTE, CHARACTER, HALFWORDRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD ADDRESSRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert LOAD, LOAD LOGICALRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert COMPARE, COMPARE LOGICALRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert AND, OR, XORRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert 64-bit MULTIPLY LOGICALRichard Henderson
Use a new "retxl" member of CPUS290XState to return the "eXtra Low" part of a 128-bit value. That said, this will get used when two independent values need returning (e.g. quotient+remainder) as well. At the same time, shuffle the elements of CPUS390XState to get this new space from existing padding in the structure. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert 32-bit MULTIPLY, MULTIPLY LOGICALRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert MULTIPLY HALFWORD, SINGLERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Implement ADD LOGICAL WITH SIGNED IMMEDIATERichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Implement SUBTRACT HALFWORDRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert ADD HALFWORDRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Reorg exception handlingRichard Henderson
Make the user path more like the system path. Prepare for more kinds of runtime exceptions. Rename ILC to ILEN to make it clear that we want to pass around a full instruction length, rather than a "code" that happens to be stored one bit left in a larger field. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Split out disas_jccRichard Henderson
Lots of duplicated code replaced with a couple of tables. We no longer attempt to manually invert the logic operation: the comments now match the code. In the fully general test, constant propagate (1 << (3 - cc)) into (8 >> cc). The new function will be usable by non-branch insns as well. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Add format based disassassmbly infrastructureRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Fix PSW_MASK handlingRichard Henderson
We were treating psw.mask as the 32-bit quantity it is in ESA mode. In particular, the CC field was at the wrong place. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Tidy unconditional BRCLRichard Henderson
Yes, we're about to rewrite all of this, but having this unconditional jump recompute cc_op is a large source of "false diff errors" when trying to examine before and after dumps. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Fix BCRRichard Henderson
There were are two exit paths for which we forgot to copy s->cc_op back to the tcg register. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Fix SACF exitRichard Henderson
DISAS_EXCP is exit via exception; we wanted DISAS_JUMP. This matters when we start cleaning up the TB exit paths. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Register helpersRichard Henderson
Which highlights a lot of cc helpers that no longer exist. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Use TCG registers for FPRRichard Henderson
At the same time, tidy other usages of tcg_gen_deposit_i64. In some cases we can "type cast" rather than extend, and in others we can allow tcg_gen_deposit_i64 itself to optimize the HOST_LONG_BITS==32 case. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Add missing temp_free in gen_op_calc_ccRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Fix gdbstubRichard Henderson
The real gdb protocol doesn't split out pc or cc as real registers. Those are pseudos that are extracted as needed from the PSW. Don't modify env->cc_op during read -- that way lies heisenbugs. Fill in the XXX for the fp registers. Remove duplicated defines in cpu.h. Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-12-23Merge branch 'master' of git://git.qemu.org/qemu into qom-cpuAndreas Färber
Adapt header include paths. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19cpu: Move kvm_run into CPUStateAndreas Färber
Pass CPUState / {X86,S390}CPU to helper functions. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19cpu: Move kvm_state field into CPUStateAndreas Färber
Adapt some functions to take CPUState / {PowerPC,S390}CPU argument. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19kvm: Pass CPUState to kvm_vcpu_ioctl()Andreas Färber
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19kvm: Pass CPUState to kvm_arch_*Andreas Färber
Move kvm_vcpu_dirty field into CPUState to simplify things and change its type to bool while at it. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19fpu: move public header file to include/fpuPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qom: move include files to include/qom/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19build: kill libdis, move disassemblers to disas/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-16exec: refactor cpu_restore_stateBlue Swirl
Refactor common code around calls to cpu_restore_state(). tb_find_pc() has now no external users, make it static. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08TCG: Use gen_opc_instr_start from context instead of global variable.Evgeny Voevodin
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08TCG: Use gen_opc_icount from context instead of global variable.Evgeny Voevodin
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08TCG: Use gen_opc_pc from context instead of global variable.Evgeny Voevodin
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-17TCG: Use gen_opc_buf from context instead of global variable.Evgeny Voevodin
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-17TCG: Use gen_opc_ptr from context instead of global variable.Evgeny Voevodin
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10disas: avoid using cpu_single_envBlue Swirl
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-31cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber
For target-mips also change the return type to bool. Make include paths for cpu-qom.h consistent for alpha and unicore32. Signed-off-by: Andreas Färber <afaerber@suse.de> [AF: Updated new target-openrisc function accordingly] Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
2012-10-31cpus: Pass CPUState to qemu_cpu_kick()Andreas Färber
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-29s390: sclp base supportHeinz Graalfs
This adds a more generic infrastructure for handling Service-Call requests on s390. Currently we only support a small subset of Read SCP Info directly in target-s390x. This patch provides the base infrastructure for supporting more commands and moves Read SCP Info. In the future we could add additional commands for hotplug, call home and event handling. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-10-29s390: use sync regs for register transferChristian Borntraeger
Newer kernels provide the guest registers in kvm_run. Lets use those if available (i.e. the capability is set). This avoids ioctls on cpu_synchronize_state making intercepts faster. In addition, we have now the prefix register, the access registers the control registers up to date. This helps in certain cases, e.g. for resolving kernel module addresses with gdb on a guest. On return, we update the registers according to the level statement, i.e. we put all registers for KVM_PUT_FULL_STATE and _RESET_STATE. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>