+ extended test tasm17.pp with 'dw offset @jumptarget', 'dd @jumptarget' and

'dd offset @jumptarget'

git-svn-id: trunk@38166 -
This commit is contained in:
nickysn 2018-02-08 16:13:27 +00:00
parent dd04114af9
commit 1709fa61a4

View File

@ -18,7 +18,7 @@ const
var
expect2: array [0..6] of word;
expect3: array [0..6] of word;
expect4: array [0..4] of word;
expect4: array [0..12] of word;
procedure test1; assembler; {$IFDEF FPC_MM_HUGE}nostackframe;{$ENDIF}
asm
@ -57,6 +57,15 @@ asm
dw @jumptarget
nop
nop
dw offset @jumptarget
nop
nop
dd @jumptarget
nop
nop
dd offset @jumptarget
nop
nop
@jumptarget:
db 55h, 0aah
end;
@ -107,9 +116,17 @@ begin
expect4[0] := $9090;
expect4[1] := $9090;
expect4[2] := Ofs(test4) + 8;
expect4[2] := Ofs(test4) + 24;
expect4[3] := $9090;
expect4[4] := $aa55;
expect4[4] := Ofs(test4) + 24;
expect4[5] := $9090;
expect4[6] := Ofs(test4) + 24;
expect4[7] := Seg(test4);
expect4[8] := $9090;
expect4[9] := Ofs(test4) + 24;
expect4[10] := 0;
expect4[11] := $9090;
expect4[12] := $aa55;
if not CompareCode(CodePointer(@test4), @expect4, SizeOf(expect4)) then
Error;