2
0
Эх сурвалжийг харах

Merged revisions 8429,10694,10696 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r8429 | florian | 2007-09-11 22:28:48 +0300 (Вт, 11 сен 2007) | 2 lines

* improved constant loading for arm
........
r10694 | yury | 2008-04-18 16:47:29 +0300 (Пт, 18 апр 2008) | 1 line

* Fixed test by changing float value from 1E+100 to 1E+10, since 1E+100 value can not be reliably used for comparison on ARM due to precision loss.
........
r10696 | yury | 2008-04-18 17:11:04 +0300 (Пт, 18 апр 2008) | 1 line

* This test is not for wince.
........

git-svn-id: branches/fixes_2_2@10716 -

yury 17 жил өмнө
parent
commit
4d2f325dde

+ 6 - 7
compiler/arm/cgcpu.pas

@@ -587,10 +587,9 @@ unit cgcpu;
           else if is_shifter_const(not(a),imm_shift) then
             list.concat(taicpu.op_reg_const(A_MVN,reg,not(a)))
           { loading of constants with mov and orr }
-          {else [if (is_shifter_const(a-byte(a),imm_shift)) then
+          else if (is_shifter_const(a-byte(a),imm_shift)) then
             begin
-              }{ roozbeh:why using tmpreg later causes error in compiling of system.pp,and also those other similars}
-              {list.concat(taicpu.op_reg_const(A_MOV,reg,a-byte(a)));
+              list.concat(taicpu.op_reg_const(A_MOV,reg,a-byte(a)));
               list.concat(taicpu.op_reg_reg_const(A_ORR,reg,reg,byte(a)));
             end
           else if (is_shifter_const(a-word(a),imm_shift)) and (is_shifter_const(word(a),imm_shift)) then
@@ -598,11 +597,11 @@ unit cgcpu;
               list.concat(taicpu.op_reg_const(A_MOV,reg,a-word(a)));
               list.concat(taicpu.op_reg_reg_const(A_ORR,reg,reg,word(a)));
             end
-          else if (is_shifter_const(a-(longint(a) shl 8) shr 8,imm_shift)) and (is_shifter_const((longint(a) shl 8) shr 8,imm_shift)) then
+          else if (is_shifter_const(a-(dword(a) shl 8) shr 8,imm_shift)) and (is_shifter_const((dword(a) shl 8) shr 8,imm_shift)) then
             begin
-              list.concat(taicpu.op_reg_const(A_MOV,reg,a-(longint(a) shl 8)shr 8));
-              list.concat(taicpu.op_reg_reg_const(A_ORR,reg,reg,(longint(a) shl 8)shr 8));
-            end}
+              list.concat(taicpu.op_reg_const(A_MOV,reg,a-(dword(a) shl 8) shr 8));
+              list.concat(taicpu.op_reg_reg_const(A_ORR,reg,reg,(dword(a) shl 8) shr 8));
+            end
           else
             begin
                reference_reset(hr);

+ 1 - 0
tests/test/twide6.pp

@@ -1,3 +1,4 @@
+{%skiptarget=wince}
 {$codepage utf-8}
 uses
  {$ifdef unix}

+ 1 - 1
tests/webtbs/tw10519.pp

@@ -4,6 +4,6 @@ var
   cs:String;
 begin
   cs:=FormatFloat('0.00000E+0000',52247.9532745);
-  if (cs<>'5.22480E+0004') then
+  if (cs<>'5'+DecimalSeparator+'22480E+0004') then
     halt(1);
 end.

+ 1 - 1
tests/webtbs/tw10791.pp

@@ -18,7 +18,7 @@ begin
  stream1:= tmemorystream.create;
  stream2:= tmemorystream.create;
  try
-  instance1.realprop:= 1e100;
+  instance1.realprop:= 1e10;
   stream1.writecomponent(instance1);
   stream1.position:= 0;
   objectbinarytotext(stream1,stream2);