2
0
Эх сурвалжийг харах

+ extended test tasm17.pp with 'DW @jumptarget'

git-svn-id: trunk@38165 -
nickysn 7 жил өмнө
parent
commit
dd04114af9
1 өөрчлөгдсөн 23 нэмэгдсэн , 0 устгасан
  1. 23 0
      tests/test/tasm17.pp

+ 23 - 0
tests/test/tasm17.pp

@@ -18,6 +18,7 @@ const
 var
   expect2: array [0..6] of word;
   expect3: array [0..6] of word;
+  expect4: array [0..4] of word;
 
 procedure test1; assembler; {$IFDEF FPC_MM_HUGE}nostackframe;{$ENDIF}
 asm
@@ -46,6 +47,20 @@ asm
   db 55h, 0aah
 end;
 
+procedure test4; assembler; {$IFDEF FPC_MM_HUGE}nostackframe;{$ENDIF}
+asm
+  nop
+  nop
+@jumptab:
+  nop
+  nop
+  dw @jumptarget
+  nop
+  nop
+@jumptarget:
+  db 55h, 0aah
+end;
+
 procedure Error;
 begin
   Writeln('Error!');
@@ -90,5 +105,13 @@ begin
   if not CompareCode(CodePointer(@test3), @expect3, SizeOf(expect3)) then
     Error;
 
+  expect4[0] := $9090;
+  expect4[1] := $9090;
+  expect4[2] := Ofs(test4) + 8;
+  expect4[3] := $9090;
+  expect4[4] := $aa55;
+  if not CompareCode(CodePointer(@test4), @expect4, SizeOf(expect4)) then
+    Error;
+
   Writeln('Ok!');
 end.