Fix tw22326 test compilation failure

git-svn-id: trunk@22408 -
This commit is contained in:
pierre 2012-09-16 21:34:32 +00:00
parent 5d24a23e66
commit c3549aa67b

View File

@ -222,6 +222,10 @@ implementation
location.register64.reghi:=hreg64lo; location.register64.reghi:=hreg64lo;
end end
else else
begin
{ shr 0 or shl 0 are noops, but generate wrong code below,
so only add code if shift val is non-zero }
if (shiftval <> 0) then
begin begin
hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32); hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
if nodetype = shln then if nodetype = shln then
@ -238,6 +242,7 @@ implementation
cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,hregister,hreg64lo,hreg64lo); cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,hregister,hreg64lo,hreg64lo);
cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_32,shiftval,hreg64hi,hreg64hi); cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_32,shiftval,hreg64hi,hreg64hi);
end; end;
end;
location.register64.reghi:=hreg64hi; location.register64.reghi:=hreg64hi;
location.register64.reglo:=hreg64lo; location.register64.reglo:=hreg64lo;
end; end;