Bugfix: COM instructions opcode

COM OP3 decoding was erroneus, with the OP_0_3 nibble being decoded as 2 instead of 3. My test firmware didn't use the COM instruction at all so this was undetected.
This commit is contained in:
Vesa-Pekka Palmu 2025-03-20 09:50:02 +02:00
parent 7bf18dbb97
commit 22c44b889b

View file

@ -273,7 +273,7 @@ macro Pull2(op) {
# Misc math
:MUL is (op=0x3D) { D = zext(A) * zext(B); C_flag = D[15,1]; }
:CLR OP3 is (op0_3=0xF) ... & OP3 { clear(OP3); }
:COM OP3 is (op0_3=0x2) ... & OP3 { complement(OP3); }
:COM OP3 is (op0_3=0x3) ... & OP3 { complement(OP3); }
:NEG OP3 is (op0_3=0x00) ... & OP3 { negate(OP3); }
:DAA is op=0x19 {
local highA:1 = A >> 4;