summaryrefslogtreecommitdiff
path: root/target-s390x/mem_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-09-20 17:09:35 -0700
committerRichard Henderson <rth@twiddle.net>2013-01-05 12:18:46 -0800
commitb7886de3f36111b71ee0664a0b992f6c5b55de7d (patch)
tree8d445904a774b7a8f69aff3e3d693448f61d6ec0 /target-s390x/mem_helper.c
parentbacf43c62e54ee21494c4bf0c39d96d2bcc0e260 (diff)
downloadqemu-b7886de3f36111b71ee0664a0b992f6c5b55de7d.tar.gz
target-s390: Perform COMPARE AND SWAP inline
Still no proper solution for CONFIG_USER_ONLY, but the system version is significantly better. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-s390x/mem_helper.c')
-rw-r--r--target-s390x/mem_helper.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c
index 0e9bbd4035..372334b3c8 100644
--- a/target-s390x/mem_helper.c
+++ b/target-s390x/mem_helper.c
@@ -442,59 +442,6 @@ uint64_t HELPER(mvst)(CPUS390XState *env, uint64_t c, uint64_t d, uint64_t s)
return d + len;
}
-/* compare and swap 64-bit */
-uint64_t HELPER(csg)(CPUS390XState *env, uint64_t r1, uint64_t a2, uint64_t r3)
-{
- /* FIXME: locking? */
- uint64_t v2 = cpu_ldq_data(env, a2);
- if (r1 == v2) {
- cpu_stq_data(env, a2, r3);
- env->cc_op = 0;
- return r1;
- } else {
- env->cc_op = 1;
- return v2;
- }
-}
-
-/* compare double and swap 64-bit */
-uint32_t HELPER(cdsg)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
-{
- /* FIXME: locking? */
- uint32_t cc;
- uint64_t v2_hi = cpu_ldq_data(env, a2);
- uint64_t v2_lo = cpu_ldq_data(env, a2 + 8);
- uint64_t v1_hi = env->regs[r1];
- uint64_t v1_lo = env->regs[r1 + 1];
-
- if ((v1_hi == v2_hi) && (v1_lo == v2_lo)) {
- cc = 0;
- cpu_stq_data(env, a2, env->regs[r3]);
- cpu_stq_data(env, a2 + 8, env->regs[r3 + 1]);
- } else {
- cc = 1;
- env->regs[r1] = v2_hi;
- env->regs[r1 + 1] = v2_lo;
- }
-
- return cc;
-}
-
-/* compare and swap 32-bit */
-uint64_t HELPER(cs)(CPUS390XState *env, uint64_t r1, uint64_t a2, uint64_t r3)
-{
- /* FIXME: locking? */
- uint32_t v2 = cpu_ldl_data(env, a2);
- if ((uint32_t)r1 == v2) {
- cpu_stl_data(env, a2, (uint32_t)r3);
- env->cc_op = 0;
- return r1;
- } else {
- env->cc_op = 1;
- return v2;
- }
-}
-
static uint32_t helper_icm(CPUS390XState *env, uint32_t r1, uint64_t address,
uint32_t mask)
{