rsms / sol

A sunny little virtual machine
http://rsms.me/2012/10/14/sol-a-sunny-little-virtual-machine.html
521 stars 39 forks source link

Multiply opcode is dividing instead of multiplying? #3

Closed jorgenhorstink closed 11 years ago

jorgenhorstink commented 11 years ago

Just had a very quick look at sched_exec.h, but it seems to me the multiply opcode is dividing instead of multiplying now...

case S_OP_MUL: { // R(A) = RK(B) * RK(C)
  SVMDLogOpABC();
  R_A(*pc).value.n = RK_B(*pc).value.n / RK_C(*pc).value.n;
  break;
}
rsms commented 11 years ago

That's a feature! Who needs multiply anyways?!