Open
Description
Even when the result of the muls instruction is 0, the CPSR's Z flag does not become 1.
When r0=r1=65536,
muls r0, r1, r0
is executed, the Z flag does not become 1.
The likely cause is within
ARMv7_CPU.prototype.mul = function(inst, addr){}
in arm-js/js/armv7-cpu.js, where the comparison (ret === 0) is made while ret includes the upper 32 bits, causing the issue.
When modified to something like
this.cpsr.z = (ret.low === 0) ? 1 : 0;
it behaves as expected.
Metadata
Metadata
Assignees
Labels
No labels
Activity