Text for merge request #226

This commit is contained in:
Jonas Maebe 2022-05-15 10:56:59 +02:00
parent 1923c8a611
commit 9b11509dd0

34
tests/webtbs/twm0226.pp Normal file
View File

@ -0,0 +1,34 @@
{ %cpu=x86-64 }
program test;
type
rec1 = record
onlyfield: Single;
end;
rec2 = record
onlyfield: Double;
end;
function fn(a1: rec1; a2: rec2): boolean; ms_abi_cdecl; assembler; nostackframe;
asm
xorl %eax, %eax
cmpl $0x3f800000, %ecx
jne .Lend
movq $0x4000000000000000, %rcx
cmpq %rcx,%rdx
jne .Lend
movl $1, %eax
.Lend:
end;
var
myrec1: rec1;
myrec2: rec2;
begin
myrec1.onlyfield := 1.0;
myrec2.onlyfield := 2.0;
if not fn(myrec1, myrec2) then
halt(1);
end.