mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:49:09 +02:00
* fixed shr/shl 32
This commit is contained in:
parent
4275383b15
commit
f3f33a5fea
@ -210,19 +210,18 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if nodetype = shln then
|
if nodetype = shln then
|
||||||
begin
|
begin
|
||||||
|
cg.a_load_const_reg(exprasmlist,OS_32,0,hregisterhigh);
|
||||||
if (shiftval and 31) <> 0 then
|
if (shiftval and 31) <> 0 then
|
||||||
cg.a_op_const_reg_reg(exprasmlist,OP_SHL,OS_32,shiftval and 31,hregisterlow,hregisterhigh);
|
cg.a_op_const_reg_reg(exprasmlist,OP_SHL,OS_32,shiftval and 31,hregisterlow,hregisterlow);
|
||||||
cg.a_load_const_reg(exprasmlist,OS_32,0,hregisterlow);
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
cg.a_load_const_reg(exprasmlist,OS_32,0,hregisterlow);
|
||||||
if (shiftval and 31) <> 0 then
|
if (shiftval and 31) <> 0 then
|
||||||
cg.a_op_const_reg_reg(exprasmlist,OP_SHR,OS_32,shiftval and 31,hregisterhigh,hregisterlow);
|
cg.a_op_const_reg_reg(exprasmlist,OP_SHR,OS_32,shiftval and 31,hregisterhigh,hregisterhigh);
|
||||||
cg.a_load_const_reg(exprasmlist,OS_32,0,hregisterhigh);
|
|
||||||
end;
|
end;
|
||||||
{ registers are already swapped }
|
location.registerlow:=hregisterhigh;
|
||||||
location.registerlow:=hregisterlow;
|
location.registerhigh:=hregisterlow;
|
||||||
location.registerhigh:=hregisterhigh;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -333,7 +332,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.19 2004-08-01 08:46:31 florian
|
Revision 1.20 2004-08-16 21:00:30 peter
|
||||||
|
* fixed shr/shl 32
|
||||||
|
|
||||||
|
Revision 1.19 2004/08/01 08:46:31 florian
|
||||||
* qword/int64 shifting fixed
|
* qword/int64 shifting fixed
|
||||||
|
|
||||||
Revision 1.18 2004/06/20 08:55:32 florian
|
Revision 1.18 2004/06/20 08:55:32 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user