summaryrefslogtreecommitdiff
path: root/target-s390x/mem_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-08-21 13:13:09 -0700
committerRichard Henderson <rth@twiddle.net>2013-01-05 12:18:38 -0800
commit58a9e35bcc23d44142a2a58ddf3fae51749f3f01 (patch)
treeff22a2046b2ed83ad8a4f6422fc09d36b0c1272b /target-s390x/mem_helper.c
parent443aaeb8991022f3eadd2b65e14e805093e2a0e6 (diff)
downloadqemu-58a9e35bcc23d44142a2a58ddf3fae51749f3f01.tar.gz
qemu-58a9e35bcc23d44142a2a58ddf3fae51749f3f01.tar.bz2
qemu-58a9e35bcc23d44142a2a58ddf3fae51749f3f01.zip
target-s390: Convert INSERT CHARACTERS UNDER MASK
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>
Diffstat (limited to 'target-s390x/mem_helper.c')
-rw-r--r--target-s390x/mem_helper.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c
index 7eb3790b40..1b63259351 100644
--- a/target-s390x/mem_helper.c
+++ b/target-s390x/mem_helper.c
@@ -629,39 +629,6 @@ void HELPER(stcmh)(CPUS390XState *env, uint32_t r1, uint64_t address,
}
}
-/* insert character under mask high; same as icm, but operates on the
- upper half of r1 */
-uint32_t HELPER(icmh)(CPUS390XState *env, uint32_t r1, uint64_t address,
- uint32_t mask)
-{
- int pos = 56; /* top of the upper half of r1 */
- uint64_t rmask = 0xff00000000000000ULL;
- uint8_t val = 0;
- int ccd = 0;
- uint32_t cc = 0;
-
- while (mask) {
- if (mask & 8) {
- env->regs[r1] &= ~rmask;
- val = cpu_ldub_data(env, address);
- if ((val & 0x80) && !ccd) {
- cc = 1;
- }
- ccd = 1;
- if (val && cc == 0) {
- cc = 2;
- }
- env->regs[r1] |= (uint64_t)val << pos;
- address++;
- }
- mask = (mask << 1) & 0xf;
- pos -= 8;
- rmask >>= 8;
- }
-
- return cc;
-}
-
/* load access registers r1 to r3 from memory at a2 */
void HELPER(lam)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
{