Просмотр исходного кода

* don't force setelementn's into a 32 bit modifiable register if they were
already in a register, as this changes the result location into a size
different from what resultdef says (and only in that specific case)
o modified the ppc code so that it always forces a setelementn to uinttype,
as that is the size that is expected by the operations later on

git-svn-id: trunk@32296 -

Jonas Maebe 9 лет назад
Родитель
Сommit
a32605bd38
2 измененных файлов с 1 добавлено и 2 удалено
  1. 0 2
      compiler/ncgset.pas
  2. 1 0
      compiler/ppcgen/ngppcadd.pas

+ 0 - 2
compiler/ncgset.pas

@@ -103,8 +103,6 @@ implementation
       begin
         { load first value in 32bit register }
           secondpass(left);
-          if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
-            hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,u32inttype,false);
 
         { also a second value ? }
         if assigned(right) then

+ 1 - 0
compiler/ppcgen/ngppcadd.pas

@@ -448,6 +448,7 @@ implementation
                       left.location.register,location.register)
                   else
                     begin
+                      hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,u32inttype,true);
                       tmpreg := cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
                       cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,aint((aword(1) shl (resultdef.size*8-1))),tmpreg);
                       register_maybe_adjust_setbase(current_asmdata.CurrAsmList,right.location,setbase);