fpc/tests/webtbs/tw22326.pp
masta 504a0ce0ca Fix for Mantis #22326
This fixes 64bit shifts on arm with a constant shift value of 0.

The old code would have emitted something like this
mov r0, r0, lsl #32
as 32 is an invalid shift value (and would be wrong anyway) the
assembler declined to assemble the produced source.

The new code will just not emit any code for a shift value of 0.

tests/test/tint642.pp now tests shl/shr 0 on 64 bit values.
tests/webtbs/tw22326.pp is also added as an additional test.

git-svn-id: trunk@21746 -
2012-07-01 08:09:00 +00:00

10 lines
133 B
ObjectPascal

var
q1: QWord;
begin
q1:=$1020304050607080;
if (q1 shl 0) <> q1 then
halt(1);
if (q1 shr 0) <> q1 then
halt(2);
end.