mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 21:49:43 +02:00

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 -
10 lines
133 B
ObjectPascal
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.
|