int err;
unsigned long size = l1_dcache_bytes();
- if (!(regs->msr & MSR_64BIT))
- ea &= 0xffffffffUL;
+ ea = truncate_if_32bit(regs->msr, ea);
ea &= ~(size - 1);
if (!address_ok(regs, ea, size))
return -EFAULT;
op->type = COMPUTE + SETREG + SETXER;
op->reg = rd;
op->val = val;
- if (!(regs->msr & MSR_64BIT)) {
- val = (unsigned int) val;
- val1 = (unsigned int) val1;
- }
+ val = truncate_if_32bit(regs->msr, val);
+ val1 = truncate_if_32bit(regs->msr, val1);
op->xerval = regs->xer;
if (val < val1 || (carry_in && val == val1))
op->xerval |= XER_CA;