mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch
'origin/GP-3621_ghidorahrex_6x09_leftshift_flag_fix' into patch (Closes #5523)
This commit is contained in:
@@ -434,6 +434,15 @@ macro complement(op)
|
|||||||
setNZFlags(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)
|
macro logicalShiftRight(op)
|
||||||
{
|
{
|
||||||
$(C) = op & 1;
|
$(C) = op & 1;
|
||||||
@@ -450,31 +459,25 @@ macro rotateRightWithCarry(op)
|
|||||||
setNZFlags(op);
|
setNZFlags(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro logicalShiftLeft(op)
|
||||||
|
{
|
||||||
|
local tmp = (op >> 7);
|
||||||
|
$(C) = tmp;
|
||||||
|
op = op << 1;
|
||||||
|
$(V) = tmp ^ (op >> 7);
|
||||||
|
setNZFlags(op);
|
||||||
|
}
|
||||||
|
|
||||||
macro rotateLeftWithCarry(op)
|
macro rotateLeftWithCarry(op)
|
||||||
{
|
{
|
||||||
local carryIn = $(C);
|
local carryIn = $(C);
|
||||||
$(C) = op >> 7;
|
local tmp = (op >> 7);
|
||||||
|
$(C) = tmp;
|
||||||
op = (op << 1) | carryIn;
|
op = (op << 1) | carryIn;
|
||||||
|
$(V) = tmp ^ (op >> 7);
|
||||||
setNZFlags(op);
|
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)
|
macro increment(op)
|
||||||
{
|
{
|
||||||
$(V) = (op == 0x7F);
|
$(V) = (op == 0x7F);
|
||||||
@@ -1204,7 +1207,7 @@ macro PushEntireState()
|
|||||||
|
|
||||||
:ADDB OP1 is (op=0xCB | op=0xDB | op=0xEB | op=0xFB) ... & OP1
|
:ADDB OP1 is (op=0xCB | op=0xDB | op=0xEB | op=0xFB) ... & OP1
|
||||||
{
|
{
|
||||||
setHFlag(A, OP1);
|
setHFlag(B, OP1);
|
||||||
addition(B, OP1);
|
addition(B, OP1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user