From d7c8a081a1b60a331ed47896044b1ae8e0ec003a Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 18 Apr 2017 14:36:41 +0000 Subject: [PATCH] + 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 - --- compiler/fpcdefs.inc | 1 + compiler/ninl.pas | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index c69a1916ec..df59b8398e 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -75,6 +75,7 @@ {$define SUPPORT_SAFECALL} {$define SUPPORT_GET_FRAME} {$define cpucapabilities} + {$define cpucg64shiftsupport} {$endif i386} {$ifdef x86_64} diff --git a/compiler/ninl.pas b/compiler/ninl.pas index 27c33dc86e..42222c961e 100644 --- a/compiler/ninl.pas +++ b/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'