mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +02:00
* more overflow checking for abs(...)
This commit is contained in:
parent
daf2dd869b
commit
c3b8b51cb5
@ -1088,6 +1088,13 @@ implementation
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SAR,opsize,tcgsize2size[opsize]*8-1,left.location.register);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,opsize,left.location.register,location.register);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_SUB,opsize,left.location.register,location.register);
|
||||
if cs_check_overflow in current_settings.localswitches then
|
||||
begin
|
||||
current_asmdata.getjumplabel(hl);
|
||||
cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NO,hl);
|
||||
cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
|
||||
cg.a_label(current_asmdata.CurrAsmList,hl);
|
||||
end;
|
||||
end
|
||||
else
|
||||
{$endif i8086 or i386}
|
||||
|
Loading…
Reference in New Issue
Block a user