mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 07:19:35 +02:00

operand size in the intel asm syntax mode. In other words, this is not valid: test [di + a3byterecordtype], 1 git-svn-id: trunk@38190 -
36 lines
573 B
ObjectPascal
36 lines
573 B
ObjectPascal
{ %FAIL }
|
|
{ %CPU=i8086,i386,x86_64 }
|
|
program tasm18a;
|
|
|
|
{$ifdef FPC}
|
|
{$asmmode intel}
|
|
{$else}
|
|
{$define CPUI8086}
|
|
{$endif FPC}
|
|
|
|
const
|
|
cval = 1;
|
|
|
|
type
|
|
foo3 = packed record
|
|
b1: byte;
|
|
b2: byte;
|
|
b3: byte;
|
|
end;
|
|
|
|
begin
|
|
asm
|
|
{ this should produce an error, because foo3 is a 3-byte record and there's
|
|
no explicit operand size specified (i.e. no 'byte ptr' or 'word ptr') }
|
|
{$ifdef CPUI8086}
|
|
test [di + foo3], cval
|
|
{$endif}
|
|
{$ifdef CPUI386}
|
|
test [edi + foo3], cval
|
|
{$endif}
|
|
{$ifdef CPUX86_64}
|
|
test [rdi + foo3], cval
|
|
{$endif}
|
|
end;
|
|
end.
|