mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 11:24:14 +02:00
+ added WebAssembly inline asm tests for:
i32.shr_s i64.shr_s
This commit is contained in:
parent
536b85021d
commit
5043bdaf18
@ -230,6 +230,20 @@ asm
|
||||
i64.shl
|
||||
end;
|
||||
|
||||
function test_i32_shr_s(a, b: longint): longint; assembler; nostackframe;
|
||||
asm
|
||||
local.get 0
|
||||
local.get 1
|
||||
i32.shr_s
|
||||
end;
|
||||
|
||||
function test_i64_shr_s(a, b: int64): int64; assembler; nostackframe;
|
||||
asm
|
||||
local.get 0
|
||||
local.get 1
|
||||
i64.shr_s
|
||||
end;
|
||||
|
||||
function test_i32_shr_u(a, b: longword): longword; assembler; nostackframe;
|
||||
asm
|
||||
local.get 0
|
||||
@ -284,6 +298,8 @@ begin
|
||||
Check(test_i64_xor(5207479527901863356, 9908469343996027762) = 13962666639138668238);
|
||||
Check(test_i32_shl(3790383670, 17) = 1416364032);
|
||||
Check(test_i64_shl(10525455493106971507, 37) = 13431544297274998784);
|
||||
Check(test_i32_shr_s(-1925861932, 27) = -15);
|
||||
Check(test_i64_shr_s(-549750071149968174, 40) = -499995);
|
||||
Check(test_i32_shr_u(3128451123, 15) = 95472);
|
||||
Check(test_i64_shr_u(13472797416736092787, 61) = 5);
|
||||
Check(test_call = 27);
|
||||
|
Loading…
Reference in New Issue
Block a user