mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 15:49:26 +02:00
+ enabled returning int64 in ax:bx:cx:dx for the i8086
git-svn-id: trunk@24502 -
This commit is contained in:
parent
d433408a7d
commit
3665ed4b03
@ -105,9 +105,7 @@ unit cpupara;
|
||||
if handle_common_ret_in_param(def,pd,result) then
|
||||
exit;
|
||||
|
||||
{ 64-bit types are returned as a parameter pointer, since putting them
|
||||
in registers would require 4 registers on the i8086 }
|
||||
if (def.size > 4) and (def.typ <> floatdef) then
|
||||
if (def.size > 8) and (def.typ <> floatdef) then
|
||||
begin
|
||||
result:=true;
|
||||
exit;
|
||||
|
@ -327,13 +327,7 @@ implementation
|
||||
begin
|
||||
if (current_settings.fputype>=fpu_sse3) then
|
||||
begin
|
||||
{$ifdef i8086}
|
||||
if left.nodetype <> callparan then
|
||||
internalerror(2013031501);
|
||||
load_fpu_location(tcallparanode(left).left);
|
||||
{$else i8086}
|
||||
load_fpu_location(left);
|
||||
{$endif i8086}
|
||||
location_reset_ref(location,LOC_REFERENCE,OS_S64,0);
|
||||
tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference);
|
||||
emit_ref(A_FISTTP,S_IQ,location.reference);
|
||||
@ -346,11 +340,7 @@ implementation
|
||||
emit_ref(A_FNSTCW,S_NO,newcw);
|
||||
emit_ref(A_FNSTCW,S_NO,oldcw);
|
||||
emit_const_ref(A_OR,S_W,$0f00,newcw);
|
||||
{$ifdef i8086}
|
||||
load_fpu_location(tcallparanode(left).left);
|
||||
{$else i8086}
|
||||
load_fpu_location(left);
|
||||
{$endif i8086}
|
||||
emit_ref(A_FLDCW,S_NO,newcw);
|
||||
location_reset_ref(location,LOC_REFERENCE,OS_S64,0);
|
||||
tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference);
|
||||
|
Loading…
Reference in New Issue
Block a user