Revision 2ae68059 target-s390x/mem_helper.c
b/target-s390x/mem_helper.c | ||
---|---|---|
304 | 304 |
return cc; |
305 | 305 |
} |
306 | 306 |
|
307 |
/* store character under mask */ |
|
308 |
void HELPER(stcm)(CPUS390XState *env, uint32_t r1, uint32_t mask, |
|
309 |
uint64_t addr) |
|
310 |
{ |
|
311 |
uint8_t r; |
|
312 |
|
|
313 |
HELPER_LOG("%s: r1 0x%x mask 0x%x addr 0x%lx\n", __func__, r1, mask, |
|
314 |
addr); |
|
315 |
while (mask) { |
|
316 |
if (mask & 8) { |
|
317 |
r = (r1 & 0xff000000UL) >> 24; |
|
318 |
cpu_stb_data(env, addr, r); |
|
319 |
HELPER_LOG("mask 0x%x %02x (0x%lx) ", mask, r, addr); |
|
320 |
addr++; |
|
321 |
} |
|
322 |
mask = (mask << 1) & 0xf; |
|
323 |
r1 <<= 8; |
|
324 |
} |
|
325 |
HELPER_LOG("\n"); |
|
326 |
} |
|
327 |
|
|
328 | 307 |
static inline uint64_t get_address(CPUS390XState *env, int x2, int b2, int d2) |
329 | 308 |
{ |
330 | 309 |
uint64_t r = d2; |
... | ... | |
608 | 587 |
return cc; |
609 | 588 |
} |
610 | 589 |
|
611 |
/* store character under mask high operates on the upper half of r1 */ |
|
612 |
void HELPER(stcmh)(CPUS390XState *env, uint32_t r1, uint64_t address, |
|
613 |
uint32_t mask) |
|
614 |
{ |
|
615 |
int pos = 56; /* top of the upper half of r1 */ |
|
616 |
|
|
617 |
while (mask) { |
|
618 |
if (mask & 8) { |
|
619 |
cpu_stb_data(env, address, (env->regs[r1] >> pos) & 0xff); |
|
620 |
address++; |
|
621 |
} |
|
622 |
mask = (mask << 1) & 0xf; |
|
623 |
pos -= 8; |
|
624 |
} |
|
625 |
} |
|
626 |
|
|
627 | 590 |
/* load access registers r1 to r3 from memory at a2 */ |
628 | 591 |
void HELPER(lam)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3) |
629 | 592 |
{ |
Also available in: Unified diff