Przeglądaj źródła

--- Merging r44380 into '.':
U compiler/cgobj.pas
--- Recording mergeinfo for merge of r44380 into '.':
U .

git-svn-id: tags/release_3_2_0@45643 -

Jonas Maebe 5 lat temu
rodzic
commit
792ea2b250
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6 2
      compiler/cgobj.pas

+ 6 - 2
compiler/cgobj.pas

@@ -1223,8 +1223,12 @@ implementation
                 shifted to the top of the to 4 resp. 8 byte register on the
                 shifted to the top of the to 4 resp. 8 byte register on the
                 caller side and needs to be stored with those bytes at the
                 caller side and needs to be stored with those bytes at the
                 start of the reference -> don't shift right }
                 start of the reference -> don't shift right }
-              else if (paraloc.shiftval<0) and
-                      ((-paraloc.shiftval) in [8,16,32]) then
+              else if (paraloc.shiftval<0)
+{$ifdef CPU64BITALU}
+                      and ((-paraloc.shiftval) in [56{for byte},48{for two bytes},32{for four bytes}])
+{$else}
+                      and ((-paraloc.shiftval) in [24{for byte},16{for two bytes}])
+{$endif} then
                 begin
                 begin
                   a_op_const_reg_reg(list,OP_SHR,OS_INT,-paraloc.shiftval,paraloc.register,paraloc.register);
                   a_op_const_reg_reg(list,OP_SHR,OS_INT,-paraloc.shiftval,paraloc.register,paraloc.register);
                   { convert to a register of 1/2/4 bytes in size, since the
                   { convert to a register of 1/2/4 bytes in size, since the