+ enabled returning int64 in ax:bx:cx:dx for the i8086

git-svn-id: trunk@24502 -
This commit is contained in:
nickysn 2013-05-14 22:45:57 +00:00
parent d433408a7d
commit 3665ed4b03
2 changed files with 1 additions and 13 deletions

View File

@ -105,9 +105,7 @@ unit cpupara;
if handle_common_ret_in_param(def,pd,result) then if handle_common_ret_in_param(def,pd,result) then
exit; exit;
{ 64-bit types are returned as a parameter pointer, since putting them if (def.size > 8) and (def.typ <> floatdef) then
in registers would require 4 registers on the i8086 }
if (def.size > 4) and (def.typ <> floatdef) then
begin begin
result:=true; result:=true;
exit; exit;

View File

@ -327,13 +327,7 @@ implementation
begin begin
if (current_settings.fputype>=fpu_sse3) then if (current_settings.fputype>=fpu_sse3) then
begin begin
{$ifdef i8086}
if left.nodetype <> callparan then
internalerror(2013031501);
load_fpu_location(tcallparanode(left).left);
{$else i8086}
load_fpu_location(left); load_fpu_location(left);
{$endif i8086}
location_reset_ref(location,LOC_REFERENCE,OS_S64,0); location_reset_ref(location,LOC_REFERENCE,OS_S64,0);
tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference); tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference);
emit_ref(A_FISTTP,S_IQ,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,newcw);
emit_ref(A_FNSTCW,S_NO,oldcw); emit_ref(A_FNSTCW,S_NO,oldcw);
emit_const_ref(A_OR,S_W,$0f00,newcw); emit_const_ref(A_OR,S_W,$0f00,newcw);
{$ifdef i8086}
load_fpu_location(tcallparanode(left).left);
{$else i8086}
load_fpu_location(left); load_fpu_location(left);
{$endif i8086}
emit_ref(A_FLDCW,S_NO,newcw); emit_ref(A_FLDCW,S_NO,newcw);
location_reset_ref(location,LOC_REFERENCE,OS_S64,0); location_reset_ref(location,LOC_REFERENCE,OS_S64,0);
tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference); tg.GetTemp(current_asmdata.CurrAsmList,resultdef.size,resultdef.alignment,tt_normal,location.reference);