瀏覽代碼

m68k: in int to bool conversion, only try to zero/sign extend the value, if the destination is actually larger than the source

git-svn-id: trunk@35105 -
Károly Balogh 8 年之前
父節點
當前提交
15f67e6f5b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/m68k/n68kcnv.pas

+ 1 - 1
compiler/m68k/n68kcnv.pas

@@ -178,7 +178,7 @@ implementation
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
               { change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
-              if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
+              if (tcgsize2size[newsize]>tcgsize2size[left.location.size]) or
                  ((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