int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_D0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_D0 + ((insn & 0x30000) >> 16)];
imm = ((insn & 0xffff) << 16) | extension;
value = reg1 - imm;
PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
| (c ? PSW_C : 0) | (v ? PSW_V : 0));
- State.regs[REG_D0 + ((insn & 0x300) >> 16)] = value;
+ State.regs[REG_D0 + ((insn & 0x30000) >> 16)] = value;
}
/* sub imm32, an */
int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_A0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_A0 + ((insn & 0x30000) >> 16)];
imm = ((insn & 0xffff) << 16) | extension;
value = reg1 - imm;
PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
| (c ? PSW_C : 0) | (v ? PSW_V : 0));
- State.regs[REG_A0 + ((insn & 0x300) >> 16)] = value;
+ State.regs[REG_A0 + ((insn & 0x30000) >> 16)] = value;
}
/* subc dm, dn */
temp |= State.regs[REG_D0 + (insn & 0x3)];
State.regs[REG_MDR] = temp % State.regs[REG_D0 + ((insn & 0xc) >> 2)];
temp /= State.regs[REG_D0 + ((insn & 0xc) >> 2)];
- temp = (State.regs[REG_D0 + (insn & 0x3)]
- * State.regs[REG_D0 + ((insn & 0xc) >> 2)]);
State.regs[REG_D0 + (insn & 0x3)] = temp & 0xffffffff;
State.regs[REG_MDR] = temp & 0xffffffff00000000LL;
z = (State.regs[REG_D0 + (insn & 0x3)] == 0);
temp |= State.regs[REG_D0 + (insn & 0x3)];
State.regs[REG_MDR] = temp % State.regs[REG_D0 + ((insn & 0xc) >> 2)];
temp /= State.regs[REG_D0 + ((insn & 0xc) >> 2)];
- temp = (State.regs[REG_D0 + (insn & 0x3)]
- * State.regs[REG_D0 + ((insn & 0xc) >> 2)]);
State.regs[REG_D0 + (insn & 0x3)] = temp & 0xffffffff;
State.regs[REG_MDR] = temp & 0xffffffff00000000LL;
z = (State.regs[REG_D0 + (insn & 0x3)] == 0);
int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_D0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_D0 + ((insn & 0x30000) >> 16)];
imm = SEXT16 (insn & 0xffff);
value = reg1 - imm;
int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_D0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_D0 + ((insn & 0x30000) >> 16)];
imm = ((insn & 0xffff) << 16) | extension;
value = reg1 - imm;
int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_A0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_A0 + ((insn & 0x30000) >> 16)];
imm = insn & 0xffff;
value = reg1 - imm;
int z, c, n, v;
unsigned long reg1, imm, value;
- reg1 = State.regs[REG_A0 + ((insn & 0x300) >> 16)];
+ reg1 = State.regs[REG_A0 + ((insn & 0x30000) >> 16)];
imm = ((insn & 0xffff) << 16) | extension;
value = reg1 - imm;