* in the case of (uint8 div/mod small_positive_const), convert the const to unsigned, so that we don't do a 16-bit division on 8-bit CPUs

git-svn-id: branches/i8086@24209 -
This commit is contained in:
nickysn 2013-04-08 18:08:10 +00:00
parent 3558766390
commit 7a15fd0444

View File

@ -243,7 +243,7 @@ implementation
{ Additionally, do the same for cardinal/qwords and other positive types, but }
{ always in a way that a smaller type is converted to a bigger type }
{ (webtbs/tw8870) }
if (rd.ordtype in [u16bit,u32bit,u64bit]) and
if (rd.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
((is_constintnode(left) and
(tordconstnode(left).value >= 0)) or
(not is_signed(ld) and
@ -252,7 +252,7 @@ implementation
inserttypeconv(left,right.resultdef);
ld:=torddef(left.resultdef);
end;
if (ld.ordtype in [u16bit,u32bit,u64bit]) and
if (ld.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
((is_constintnode(right) and
(tordconstnode(right).value >= 0)) or
(not is_signed(rd) and