mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-27 14:40:28 +00:00
GP-0_sparc_fix_retry
This commit is contained in:
parent
f235e46adc
commit
b2d9b3c95a
@ -407,24 +407,26 @@ macro addflags32(op1,op2) {
|
||||
macro addCarryFlags ( op1, op2 ) {
|
||||
local op1_low_32:4 = op1:4;
|
||||
local op2_low_32:4 = op2:4;
|
||||
local CFcopy_4:4 = zext(i_cf);
|
||||
local CFcopy:$(SIZE) = zext(i_cf);
|
||||
local result:$(SIZE) = op1 + op2;
|
||||
local result_low_32:4 = op1_low_32 + op2_low_32;
|
||||
i_cf = carry( op1_low_32, op2_low_32) || carry( result_low_32, CFcopy:4 );
|
||||
i_cf = carry( op1_low_32, op2_low_32) || carry( result_low_32, CFcopy_4 );
|
||||
x_cf = carry(op1,op2) || carry(result,CFcopy);
|
||||
i_vf = scarry( op1_low_32, op2_low_32) ^^ scarry( result_low_32, CFcopy:4 );
|
||||
i_vf = scarry( op1_low_32, op2_low_32) ^^ scarry( result_low_32, CFcopy_4 );
|
||||
x_vf = scarry(op1, op2) ^^ scarry(result,CFcopy);
|
||||
}
|
||||
|
||||
macro subCarryFlags ( op1, op2 ) {
|
||||
local op1_low_32:4 = op1:4;
|
||||
local op2_low_32:4 = op2:4;
|
||||
local CFcopy_4:4 = zext(i_cf);
|
||||
local CFcopy:$(SIZE) = zext(i_cf);
|
||||
local result:$(SIZE) = op1 - op2;
|
||||
local result_low_32:4 = op1_low_32 - op2_low_32;
|
||||
i_cf = (op1_low_32 < op2_low_32) || (result_low_32 < CFcopy:4);
|
||||
i_cf = (op1_low_32 < op2_low_32) || (result_low_32 < CFcopy_4);
|
||||
x_cf = (op1 < op2) || (result < CFcopy);
|
||||
i_vf = sborrow( op1_low_32, op2_low_32) ^^ sborrow( result_low_32, CFcopy:4);
|
||||
i_vf = sborrow( op1_low_32, op2_low_32) ^^ sborrow( result_low_32, CFcopy_4);
|
||||
x_vf = sborrow(op1, op2) ^^ sborrow(result,CFcopy);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user