yep, the CR Field numbering has already been fixed so does not need
inverting with a 7-i
e.intregs[1] = 0xc523e996a8ff6215
e.intregs[2] = 0xe1e5b9cc9864c4a8
e.intregs[3] = 0xa709a363416426bd
- # XXX unexpected value, investigating
- # e.crregs[0] = 0x8
- e.crregs[0] = 0x0
+ e.crregs[0] = 0x8
self.add_case(Program(lst, bigendian), initial_regs, expected=e)
lst = [f"add 3, 1, 2"]
initial_regs = [0] * 32
if(reg != 0):
msg = "%se.intregs[%d] = 0x%x\n"
sout.write( msg % (lindent, i, reg))
- # cr
+ # CR fields
for i in range(8):
- cri = state.crregs[7 - i]
+ cri = state.crregs[i] # Power ISA numbering already sorted
if(cri != 0):
msg = "%se.crregs[%d] = 0x%x\n"
sout.write( msg % (lindent, i, cri))