Skip to contentSkip to conversation

target-s390x: fix MOVE LONG instruction

PATCH Applied Aurelien Jarno 3 participants 3 messages Jun 16, 2015 – Jun 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-s390x: fix MOVE LONG instruction

The MOVE LONG instruction should pad the destination operand with the byte from bit positions 32-39 of the source length (r2 + 1), not with the same byte in the source address.

Cc Alexander Graf <[email protected]>
Cc Richard Henderson <[email protected]>
---
 target-s390x/mem_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-s390x/mem_helper.c +1 -1
index 3ccbeb9..9f0eb1e 100644
@@ -550,7 +550,7 @@ uint32_t HELPER(mvcl)(CPUS390XState *env, uint32_t r1, uint32_t r2)
     uint64_t dest = get_address_31fix(env, r1);
     uint64_t srclen = env->regs[r2 + 1] & 0xffffff;
     uint64_t src = get_address_31fix(env, r2);
-    uint8_t pad = src >> 24;
+    uint8_t pad = env->regs[r2 + 1] >> 24;
     uint8_t v;
     uint32_t cc;
 
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Aurelien Jarno

The MOVE LONG instruction should pad the destination operand with the byte from bit positions 32-39 of the source length (r2 + 1), not with the same byte in the source address.

Cc Alexander Graf<[email protected]>
Cc Richard Henderson<[email protected]>
---
  target-s390x/mem_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

#2 lore raw
Quoted 5 lines · Richard Henderson
Quoted 4 lines · Aurelien Jarno

The MOVE LONG instruction should pad the destination operand with the byte from bit positions 32-39 of the source length (r2 + 1), not with the same byte in the source address.

Quoted 8 lines
Quoted 6 lines
Cc Alexander Graf<[email protected]>
Cc Richard Henderson<[email protected]>
---
  target-s390x/mem_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to s390-next.

Alex