Browse Source

* 16-bit alu handling in tshlshrnode.pass_typecheck simplified via the use of
get_common_intdef

git-svn-id: trunk@27641 -

nickysn 11 năm trước cách đây
mục cha
commit
7d8fb1833f
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      compiler/nmat.pas

+ 2 - 8
compiler/nmat.pas

@@ -695,10 +695,7 @@ implementation
 {$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
                  inserttypeconv(left,s32inttype)
 {$elseif defined(cpu16bitalu)}
-                 if (left.resultdef.size > 2) or (right.resultdef.size > 2) then
-                   inserttypeconv(left,s32inttype)
-                 else
-                   inserttypeconv(left,sinttype);
+                 inserttypeconv(left,get_common_intdef(torddef(left.resultdef),torddef(sinttype),true));
 {$else}
                  internalerror(2013031301);
 {$endif}
@@ -710,10 +707,7 @@ implementation
 {$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
                  inserttypeconv(left,u32inttype);
 {$elseif defined(cpu16bitalu)}
-                 if (left.resultdef.size > 2) or (right.resultdef.size > 2) then
-                   inserttypeconv(left,u32inttype)
-                 else
-                   inserttypeconv(left,uinttype);
+                 inserttypeconv(left,get_common_intdef(torddef(left.resultdef),torddef(uinttype),true));
 {$else}
                  internalerror(2013031301);
 {$endif}