mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:28:14 +02:00

override the ES segment in an x86 string instruction (because it cannot be overriden) git-svn-id: trunk@37454 -
19 lines
354 B
ObjectPascal
19 lines
354 B
ObjectPascal
{ %CPU=i8086,i386,x86_64 }
|
|
{ %fail }
|
|
|
|
{ Tests the 'Cannot override ES segment' error message }
|
|
|
|
{$asmmode intel}
|
|
|
|
begin
|
|
asm
|
|
{$if defined(cpui8086)}
|
|
cmps byte ptr [si], byte ptr ds:[di]
|
|
{$elseif defined(cpui386)}
|
|
cmps byte ptr [esi], byte ptr ds:[edi]
|
|
{$elseif defined(cpux86_64)}
|
|
cmps byte ptr [esi], byte ptr fs:[rdi]
|
|
{$endif}
|
|
end;
|
|
end.
|