mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 00:21:34 +02:00

usage in case PIC generation is on (some by adding PIC-versions of the assembler code, most by adding -Cg- to the options to be used). Note: the Intel assembler reader does not yet support the Delphi PIC construct, so tests with that (like test/tasmread and test/tcg1) do not work with -Cg on non-Darwin (Darwin needs a different PIC construct) git-svn-id: trunk@9370 -
27 lines
744 B
ObjectPascal
27 lines
744 B
ObjectPascal
{ %cpu=i386 }
|
|
{ %opt=-Cg- }
|
|
|
|
{ Source provided for Free Pascal Bug Report 3863 }
|
|
{ Submitted by "Jernej" on 2005-04-01 }
|
|
{ e-mail: jernejcoder@gmail.com }
|
|
|
|
{$mode delphi}
|
|
|
|
function FormatBuf(var Buffer; BufLen: Cardinal; const Format;
|
|
FmtLen: Cardinal; const Args: array of const): Cardinal;
|
|
asm
|
|
CMP EAX,Args.Integer[-4] // -> "error building record offset"
|
|
CMP [EBX+EAX*8].Byte[4],vtInteger // -> error: assembler error in operand
|
|
CMP EBX,Args.Integer[-4] // -> "error building record offset"
|
|
MOVZX EBX,[ESI].Byte[4] // -> error: assembler error in operand
|
|
JMP @CvtVector.Pointer[EBX*4] // "error: assembler syntax error"
|
|
@CvtVector:
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
end;
|
|
|
|
begin
|
|
end.
|