Преглед на файлове

* arm thumb: handle constants in second_cmpsmallset correctly

git-svn-id: trunk@24432 -
florian преди 12 години
родител
ревизия
ed2825fbb0
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      compiler/arm/narmadd.pas

+ 2 - 1
compiler/arm/narmadd.pas

@@ -343,7 +343,8 @@ interface
 
         (* Try to keep right as a constant *)
         if (right.location.loc <> LOC_CONSTANT) or
-          not(is_shifter_const(right.location.value, b)) then
+          not(is_shifter_const(right.location.value, b)) or
+          ((current_settings.cputype in cpu_thumb) and not(is_thumb_imm(right.location.value))) then
           hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,right.resultdef,true);
         hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,true);