mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 13:50:20 +02:00
* fixed wrong location.size (sign) for x86's in_abs_long + test
git-svn-id: trunk@10850 -
This commit is contained in:
parent
ba9e709878
commit
3d2630c661
@ -423,7 +423,7 @@ implementation
|
||||
{$ifdef i386}
|
||||
if current_settings.cputype<cpu_Pentium2 then
|
||||
begin
|
||||
opsize:=int_cgsize(left.resultdef.size);
|
||||
opsize:=def_cgsize(left.resultdef);
|
||||
secondpass(left);
|
||||
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,false);
|
||||
location:=left.location;
|
||||
@ -436,7 +436,7 @@ implementation
|
||||
else
|
||||
{$endif i386}
|
||||
begin
|
||||
opsize:=int_cgsize(left.resultdef.size);
|
||||
opsize:=def_cgsize(left.resultdef);
|
||||
secondpass(left);
|
||||
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,true);
|
||||
hregister:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
|
||||
|
@ -167,6 +167,9 @@ procedure fail;
|
||||
_result : boolean;
|
||||
value : longint;
|
||||
value1: longint;
|
||||
vsingle : single;
|
||||
vdouble : double;
|
||||
vextended : extended;
|
||||
begin
|
||||
Write('Abs() test with longint type...');
|
||||
_result := true;
|
||||
@ -208,6 +211,21 @@ procedure fail;
|
||||
if value1 <> (RESULT_FOUR_INT) then
|
||||
_result := false;
|
||||
|
||||
value := VALUE_ONE_INT;
|
||||
vsingle := abs(value);
|
||||
if (round(vsingle) <> RESULT_ONE_INT) then
|
||||
_result := false;
|
||||
|
||||
value := VALUE_ONE_INT;
|
||||
vdouble := abs(value);
|
||||
if (round(vdouble) <> RESULT_ONE_INT) then
|
||||
_result := false;
|
||||
|
||||
value := VALUE_ONE_INT;
|
||||
vextended := abs(value);
|
||||
if (round(vextended) <> RESULT_ONE_INT) then
|
||||
_result := false;
|
||||
|
||||
if not _result then
|
||||
fail
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user