mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 10:38:14 +02:00
23 lines
332 B
ObjectPascal
23 lines
332 B
ObjectPascal
{ %skiptarget=win64 }
|
|
{ %cpu=x86_64 }
|
|
{ %opt=-vw -Sew -Cg }
|
|
{ %fail }
|
|
|
|
{$asmmode intel}
|
|
|
|
var
|
|
val: qword; public;
|
|
|
|
Function Test: QWord; Assembler; NoStackFrame;
|
|
Asm
|
|
{ global symbols must be accessed via the GOT on non-win64 }
|
|
mov RAX, [RIP+val]
|
|
End;
|
|
|
|
BEGIN
|
|
Val := $12345678901;
|
|
if test<>$12345678901 then
|
|
halt(1);
|
|
END.
|
|
|