mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 08:29:29 +02:00
test mov eax,static_var result
This commit is contained in:
parent
7520cf9b6a
commit
61b61fd36d
35
tests/test/testintl.pp
Normal file
35
tests/test/testintl.pp
Normal file
@ -0,0 +1,35 @@
|
||||
program test_intel_syntax;
|
||||
|
||||
{$ifdef CPU86}
|
||||
var
|
||||
sti : longint;
|
||||
|
||||
{$asmmode intel}
|
||||
function get_sti_value : longint;assembler;
|
||||
asm
|
||||
mov eax,dword ptr [sti]
|
||||
end;
|
||||
|
||||
function get_sti_addr : pointer;assembler;
|
||||
asm
|
||||
mov eax,sti
|
||||
end;
|
||||
|
||||
|
||||
{$endif CPU86}
|
||||
|
||||
begin
|
||||
{$ifdef CPU86}
|
||||
sti:=56;
|
||||
if get_sti_value<>sti then
|
||||
begin
|
||||
Writeln(' "mov eax,sti" does not get the address of sti var');
|
||||
Halt(1);
|
||||
end;
|
||||
if get_sti_addr<>@sti then
|
||||
begin
|
||||
Writeln(' "mov eax,sti" does not get the address of sti var');
|
||||
Halt(1);
|
||||
end;
|
||||
{$endif CPU86}
|
||||
end.
|
Loading…
Reference in New Issue
Block a user