瀏覽代碼

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

git-svn-id: trunk@24502 -
nickysn 12 年之前
父節點
當前提交
3665ed4b03
共有 2 個文件被更改,包括 1 次插入13 次删除
  1. 1 3
      compiler/i8086/cpupara.pas
  2. 0 10
      compiler/x86/nx86inl.pas

+ 1 - 3
compiler/i8086/cpupara.pas

@@ -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;

+ 0 - 10
compiler/x86/nx86inl.pas

@@ -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);