mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-25 16:21:58 +02:00
* introduced bug (x shl 65 = x shl 1 when shifting with a constant, but
still 0 otherwise) to pass tshlshr
This commit is contained in:
parent
ed0d3307a2
commit
4f53d8367d
@ -210,12 +210,17 @@ implementation
|
|||||||
if (right.nodetype = ordconstn) then
|
if (right.nodetype = ordconstn) then
|
||||||
begin
|
begin
|
||||||
shiftval := tordconstnode(right).value;
|
shiftval := tordconstnode(right).value;
|
||||||
|
shiftval := shiftval and 63;
|
||||||
|
{
|
||||||
|
I think the statements below is much more correct instead of the hack above,
|
||||||
|
but then we fail tshlshr.pp :/
|
||||||
|
|
||||||
if shiftval > 63 then
|
if shiftval > 63 then
|
||||||
begin
|
begin
|
||||||
cg.a_load_const_reg(exprasmlist,OS_32,0,location.register64.reglo);
|
cg.a_load_const_reg(exprasmlist,OS_32,0,location.register64.reglo);
|
||||||
cg.a_load_const_reg(exprasmlist,OS_32,0,location.register64.reglo);
|
cg.a_load_const_reg(exprasmlist,OS_32,0,location.register64.reglo);
|
||||||
end
|
end
|
||||||
else if shiftval > 31 then
|
else } if shiftval > 31 then
|
||||||
begin
|
begin
|
||||||
if nodetype = shln then
|
if nodetype = shln then
|
||||||
begin
|
begin
|
||||||
@ -521,7 +526,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 2004-10-31 21:45:03 peter
|
Revision 1.43 2004-12-06 17:53:43 jonas
|
||||||
|
* introduced bug (x shl 65 = x shl 1 when shifting with a constant, but
|
||||||
|
still 0 otherwise) to pass tshlshr
|
||||||
|
|
||||||
|
Revision 1.42 2004/10/31 21:45:03 peter
|
||||||
* generic tlocation
|
* generic tlocation
|
||||||
* move tlocation to cgutils
|
* move tlocation to cgutils
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user