aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/cc_helper.c
AgeCommit message (Collapse)Author
2016-05-19cpu: move exec-all.h inclusion out of cpu.hPaolo Bonzini
exec-all.h contains TCG-specific definitions. It is not needed outside TCG-specific files such as translate.c, exec.c or *helper.c. One generic function had snuck into include/exec/exec-all.h; move it to include/qom/cpu.h. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-01-29s390: Clean up includesPeter Maydell
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1453832250-766-8-git-send-email-peter.maydell@linaro.org
2015-12-17s390x: avoid "naked" qemu_logPaolo Bonzini
Convert to debug-only qemu_log. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-06-05target-s390x: fix CC computation for LOAD POSITIVE instructionsAurelien Jarno
LOAD POSITIVE instructions (LPR, LPGR and LPGFR) set the following condition code: 0: Result zero; no overflow 1: -- 2: Result greater than zero; no overflow 3: Overflow The current code wrongly returns 1 instead of 2 in case of a result greater than 0. This patches fixes that. This fixes the marshalling of the value '0L' in Python. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-02-03target-s390x: fix and optimize slb* and slbg* computation of carry/borrow flagTorbjorn Granlund
This patch fixes the bug with borrow_in being set incorrectly, but it also simplifies the logic to be much more plain, improving speed. It fixes both the 32-bit SLB* and 64-bit SLBG*. The SLBG* change has been well-tested. I haven't tested the SLB* change explicitly, but the code was copy-pasted from the tested code. The error of these functions' current implementations would not likely be triggered by compiler-generated code, since the only error was in the state of the carry/borrow flag. Compilers rarely generate an instruction sequence such as carry-set -> carry-set-and-use -> carry-use. (With Paolo's fix and mine, there are still a couple of failures from GMP's testsuite, but they are almost surely due to incorrect code generation from gcc 4.9. But since this gcc is running under qemu, it might be qemu bugs. I intend to investigate this.) Signed-off-by: Torbjorn Granlund <torbjorng@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28tcg: Invert the inclusion of helper.hRichard Henderson
Rather than include helper.h with N values of GEN_HELPER, include a secondary file that sets up the macros to include helper.h. This minimizes the files that must be rebuilt when changing the macros for file N. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-03-13exec: Change cpu_abort() argument to CPUStateAndreas Färber
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13cpu-exec: Change cpu_loop_exit() argument to CPUStateAndreas Färber
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-01-05target-s390: Convert IPMRichard Henderson
Note that the previous placement of the PM field was incorrect. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert FLOGRRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert FP ADD, COMPARE, LOAD TEST/ROUND/LENGTHENEDRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert SHIFT, ROTATE SINGLERichard Henderson
Note that we were missing the 32-bit SLA. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert INSERT CHARACTERS UNDER MASKRichard Henderson
Change the CC handling to be more like TEST UNDER MASK, with val & mask. This lets us handle ICMH much more like ICM. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Cleanup cc computation helpersRichard Henderson
The inline markers hid the fact that {n}abs_32 were unused because of typos in the main do_calc_cc function. Let the compiler handle auto-inlining here. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05target-s390: Convert TEST UNDER MASKRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net>
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>
2012-09-10target-s390x: avoid AREG0 for condition code helpersBlue Swirl
Make condition code helpers take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: avoid AREG0 for FPU helpersBlue Swirl
Make FPU helpers take a parameter for CPUState instead of relying on global env. Introduce temporary wrappers for FPU load and store ops. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: split condition code helpersBlue Swirl
Move condition code helpers to cc_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>