Advertisement
Guest User

Untitled

a guest
Jul 25th, 2011
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Multiply Long (MULL / MLAL)
  2.                     //UMULL S=0
  3.                     case 0x00C00000:
  4.                         var value = (this.registers[this.instruction & 0x00000F00] >>> 0) * (this.registers[this.instruction & 0x0000000F] >>> 0);
  5.                         this.registers[this.instruction & 0x0000F000] = value & 0xFFFFFFFF;
  6.                         this.registers[this.instruction & 0x000F0000] = (value / 0x100000000) | 0;
  7.                         break;
  8.                     //UMULL S=1
  9.                     case 0x00D00000:
  10.                         var value = (this.registers[this.instruction & 0x00000F00] >>> 0) * (this.registers[this.instruction & 0x0000000F] >>> 0);
  11.                         this.registers[this.instruction & 0x0000F000] = value & 0xFFFFFFFF;
  12.                         this.CPSRZero = (value == 0);
  13.                         value = (value / 0x100000000) | 0;
  14.                         this.CPSRNegative = (value < 0);
  15.                         this.registers[this.instruction & 0x000F0000] = value;
  16.                         break;
  17.                     //UMLAL S=0
  18.                     case 0x00E00000:
  19.                         var value = (this.registers[this.instruction & 0x00000F00] >>> 0) * (this.registers[this.instruction & 0x0000000F] >>> 0);
  20.                         value += ((this.registers[this.instruction & 0x000F0000] >>> 0) * 0x100000000) + (this.registers[this.instruction & 0x0000F000] >>> 0);
  21.                         this.registers[this.instruction & 0x0000F000] = value & 0xFFFFFFFF;
  22.                         this.registers[this.instruction & 0x000F0000] = (value / 0x100000000) | 0;
  23.                         break;
  24.                     //UMLAL S=1
  25.                     case 0x00F00000:
  26.                         var value = (this.registers[this.instruction & 0x00000F00] >>> 0) * (this.registers[this.instruction & 0x0000000F] >>> 0);
  27.                         value += ((this.registers[this.instruction & 0x000F0000] >>> 0) * 0x100000000) + (this.registers[this.instruction & 0x0000F000] >>> 0);
  28.                         this.registers[this.instruction & 0x0000F000] = value & 0xFFFFFFFF;
  29.                         this.CPSRZero = (value == 0);
  30.                         value = (value / 0x100000000) | 0;
  31.                         this.CPSRNegative = (value < 0);
  32.                         this.registers[this.instruction & 0x000F0000] = value;
  33.                         break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement