mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 09:39:12 +02:00
* 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:
parent
3558766390
commit
7a15fd0444
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user