mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 15:30:26 +02:00
* 16-bit ALU fixes in tshlshrnode.pass_typecheck
git-svn-id: branches/i8086@23817 -
This commit is contained in:
parent
f048e3fd3b
commit
edc382aa76
@ -604,18 +604,34 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ keep singness of orignal type }
|
{ keep singness of orignal type }
|
||||||
if is_signed(left.resultdef) then
|
if is_signed(left.resultdef) then
|
||||||
{$ifdef cpunodefaultint}
|
begin
|
||||||
|
{$if defined(cpunodefaultint)}
|
||||||
inserttypeconv(left,nd)
|
inserttypeconv(left,nd)
|
||||||
{$else cpunodefaultint}
|
{$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
|
||||||
inserttypeconv(left,s32inttype)
|
inserttypeconv(left,s32inttype)
|
||||||
{$endif cpunodefaultint}
|
{$elseif defined(cpu16bitalu)}
|
||||||
|
if left.resultdef.size > 2 then
|
||||||
|
inserttypeconv(left,s32inttype)
|
||||||
|
else
|
||||||
|
inserttypeconv(left,sinttype);
|
||||||
|
{$else}
|
||||||
|
internalerror(2013031301);
|
||||||
|
{$endif}
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{$ifdef cpunodefaultint}
|
{$if defined(cpunodefaultint)}
|
||||||
inserttypeconv(left,nd)
|
inserttypeconv(left,nd)
|
||||||
{$else cpunodefaultint}
|
{$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
|
||||||
inserttypeconv(left,u32inttype);
|
inserttypeconv(left,u32inttype);
|
||||||
{$endif cpunodefaultint}
|
{$elseif defined(cpu16bitalu)}
|
||||||
|
if left.resultdef.size > 2 then
|
||||||
|
inserttypeconv(left,u32inttype)
|
||||||
|
else
|
||||||
|
inserttypeconv(left,uinttype);
|
||||||
|
{$else}
|
||||||
|
internalerror(2013031301);
|
||||||
|
{$endif}
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user