Преглед изворни кода

m68k/powerpc: improved version of int_to_bool casting. now both also passes the improved version of tb0625

git-svn-id: trunk@35108 -
Károly Balogh пре 8 година
родитељ
комит
df38fd18e0
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      compiler/m68k/n68kcnv.pas

+ 8 - 1
compiler/m68k/n68kcnv.pas

@@ -182,7 +182,14 @@ implementation
                  ((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
                 hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,true)
               else
-                location.size:=newsize;
+                begin
+                  location.size:=newsize;
+                  if (location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
+                    begin
+                      inc(location.reference.offset,TCGSize2Size[left.location.size]-TCGSize2Size[location.size]);
+                      l.reference.alignment:=newalignment(l.reference.alignment,TCGSize2Size[left.location.size]-TCGSize2Size[location.size]);
+                    end;
+                end;
               exit;
            end;