Merge remote-tracking branch

'origin/GP-3621_ghidorahrex_6x09_leftshift_flag_fix' into patch (Closes
#5523)
This commit is contained in:
ghidra1 2023-07-10 19:35:05 -04:00
commit 9b5f8599dc

View File

@ -434,6 +434,15 @@ macro complement(op)
setNZFlags(op);
}
# Signed shift right.
# P-code INT_SRIGHT.
macro arithmeticShiftRight(op)
{
$(C) = op & 1;
op = (op s>> 1);
setNZFlags(op);
}
macro logicalShiftRight(op)
{
$(C) = op & 1;
@ -450,31 +459,25 @@ macro rotateRightWithCarry(op)
setNZFlags(op);
}
macro logicalShiftLeft(op)
{
local tmp = (op >> 7);
$(C) = tmp;
op = op << 1;
$(V) = tmp ^ (op >> 7);
setNZFlags(op);
}
macro rotateLeftWithCarry(op)
{
local carryIn = $(C);
$(C) = op >> 7;
local tmp = (op >> 7);
$(C) = tmp;
op = (op << 1) | carryIn;
$(V) = tmp ^ (op >> 7);
setNZFlags(op);
}
# Signed shift right.
# P-code INT_SRIGHT.
macro arithmeticShiftRight(op)
{
$(C) = op & 1;
op = (op s>> 1);
setNZFlags(op);
}
macro logicalShiftLeft(op)
{
$(C) = (op >> 7);
op = op << 1;
$(Z) = (op == 0);
$(N) = (op >> 7);
}
macro increment(op)
{
$(V) = (op == 0x7F);
@ -1204,7 +1207,7 @@ macro PushEntireState()
:ADDB OP1 is (op=0xCB | op=0xDB | op=0xEB | op=0xFB) ... & OP1
{
setHFlag(A, OP1);
setHFlag(B, OP1);
addition(B, OP1);
}