fix(cpu): properly decode multiply instructions
This commit is contained in:
14
src/cpu.zig
14
src/cpu.zig
@@ -449,13 +449,6 @@ fn armPopulate() [0x1000]ArmInstrFn {
|
||||
lut[i] = psrTransfer(I, R, kind);
|
||||
}
|
||||
|
||||
if (i >> 6 & 0x3F == 0b000000 and i & 0xF == 0b1001) {
|
||||
const A = i >> 5 & 1 == 1;
|
||||
const S = i >> 4 & 1 == 1;
|
||||
|
||||
lut[i] = multiply(A, S);
|
||||
}
|
||||
|
||||
if (i == 0x121) {
|
||||
lut[i] = branchAndExchange;
|
||||
}
|
||||
@@ -470,6 +463,13 @@ fn armPopulate() [0x1000]ArmInstrFn {
|
||||
lut[i] = halfAndSignedDataTransfer(P, U, I, W, L);
|
||||
}
|
||||
|
||||
if (i >> 6 & 0x3F == 0b000000 and i & 0xF == 0b1001) {
|
||||
const A = i >> 5 & 1 == 1;
|
||||
const S = i >> 4 & 1 == 1;
|
||||
|
||||
lut[i] = multiply(A, S);
|
||||
}
|
||||
|
||||
if (i >> 10 & 0x3 == 0b01) {
|
||||
const I = i >> 9 & 1 == 1;
|
||||
const P = i >> 8 & 1 == 1;
|
||||
|
Reference in New Issue
Block a user