瀏覽代碼

+ enable using the cg64 ops OP_SHR/OP_SHL/OP_SAR on i386 for implementing the
64-bit in_sar/shl/shr_assign_x_y inline nodes

git-svn-id: trunk@35835 -

nickysn 8 年之前
父節點
當前提交
d7c8a081a1
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 1 0
      compiler/fpcdefs.inc
  2. 8 0
      compiler/ninl.pas

+ 1 - 0
compiler/fpcdefs.inc

@@ -75,6 +75,7 @@
   {$define SUPPORT_SAFECALL}
   {$define SUPPORT_GET_FRAME}
   {$define cpucapabilities}
+  {$define cpucg64shiftsupport}
 {$endif i386}
 
 {$ifdef x86_64}

+ 8 - 0
compiler/ninl.pas

@@ -4676,6 +4676,14 @@ implementation
        var
          procname: string[31];
        begin
+{$ifdef cpucg64shiftsupport}
+         if inlinenumber in [in_sar_assign_x_y,in_shl_assign_x_y,in_shr_assign_x_y] then
+           begin
+             result:=nil;
+             expectloc:=tcallparanode(tcallparanode(left).right).left.expectloc;
+             exit;
+           end;
+{$endif cpucg64shiftsupport}
          result := nil;
          if is_signed(tcallparanode(left).right.resultdef) then
            procname:='int64'