Browse Source

* Call fpc_shl/r_qword for qword types for first_shlshr64bitint method

git-svn-id: trunk@17620 -
tom_at_work 14 years ago
parent
commit
e5fc169e57
1 changed files with 9 additions and 2 deletions
  1. 9 2
      compiler/nmat.pas

+ 9 - 2
compiler/nmat.pas

@@ -558,11 +558,18 @@ implementation
         procname: string[31];
         procname: string[31];
       begin
       begin
         result := nil;
         result := nil;
+        { Normally already done below, but called again,
+          just in case it is called directly }
+        firstpass(left);
         { otherwise create a call to a helper }
         { otherwise create a call to a helper }
+        if is_signed(left.resultdef) then
+          procname:='int64'
+        else
+          procname:='qword';
         if nodetype = shln then
         if nodetype = shln then
-          procname := 'fpc_shl_int64'
+          procname := 'fpc_shl_'+procname
         else
         else
-          procname := 'fpc_shr_int64';
+          procname := 'fpc_shr_'+procname;
         { this order of parameters works at least for the arm,
         { this order of parameters works at least for the arm,
           however it should work for any calling conventions (FK) }
           however it should work for any calling conventions (FK) }
         result := ccallnode.createintern(procname,ccallparanode.create(right,
         result := ccallnode.createintern(procname,ccallparanode.create(right,