فهرست منبع

* 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);