Esempio n. 1
0
 public Branch execute(Processor cpu) {
   cpu.flagOp1 = op1.get32(cpu);
   cpu.flagResult = (-cpu.flagOp1);
   op1.set32(cpu, cpu.flagResult);
   cpu.flagIns = UCodes.NEG32;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
Esempio n. 2
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   cpu.flagOp1 = op1.get32();
   cpu.flagOp2 = op2.get32(cpu);
   cpu.flagResult = (cpu.flagOp1 - cpu.flagOp2);
   op1.set32(cpu.flagResult);
   cpu.flagIns = UCodes.SUB32;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
Esempio n. 3
0
 public Branch execute(Processor cpu) {
   int shift = immb & (32 - 1);
   int reg0 = op1.get32(cpu);
   int res = (reg0 >>> shift) | (reg0 << (32 - shift));
   op1.set32(cpu, res);
   boolean bit30 = (res & (1 << (32 - 2))) != 0;
   boolean bit31 = (res & (1 << (32 - 1))) != 0;
   if (shift > 0) {
     cpu.cf = bit31;
     cpu.of = bit30 ^ bit31;
     cpu.flagStatus &= NOFCF;
   }
   return Branch.None;
 }
Esempio n. 4
0
 public Branch execute(Processor cpu) {
   int shift = cpu.r_cl.get8() & 0x1f;
   if (shift != 0) {
     if (shift <= 16) {
       cpu.flagStatus = OSZPC;
     } else {
       cpu.flagStatus = SZP;
       cpu.of = false;
       cpu.cf = false;
     }
     cpu.af = false;
     cpu.flagOp1 = op1.get32(cpu);
     cpu.flagOp2 = shift;
     cpu.flagResult = (cpu.flagOp1 << cpu.flagOp2);
     op1.set32(cpu, cpu.flagResult);
     cpu.flagIns = UCodes.SHL32;
   }
   return Branch.None;
 }
Esempio n. 5
0
 public Branch execute(Processor cpu) {
   cpu.of = cpu.af = cpu.cf = false;
   cpu.flagResult = (op1.get32(cpu) & immd);
   cpu.flagStatus = SZP;
   return Branch.None;
 }
Esempio n. 6
0
 public Branch execute(Processor cpu) {
   cpu.push32(op1.get32(cpu));
   return Branch.None;
 }
Esempio n. 7
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   int tmp = op2.get32(cpu);
   if (!cpu.sf()) op1.set32(tmp);
   return Branch.None;
 }