florian 23 yıl önce
ebeveyn
işleme
800abe7156
1 değiştirilmiş dosya ile 24 ekleme ve 6 silme
  1. 24 6
      tests/webtbs/tw1122.pp

+ 24 - 6
tests/webtbs/tw1122.pp

@@ -1,14 +1,32 @@
-{ %CPU=i386 }
+{ %version=1.1 }
+{ %cpu=i386 }
 {$mode objfpc}
-uses sysutils;
-{$asmmode intel}
+{ Source provided for Free Pascal Bug Report 1122 }
+{ Submitted by "Thomas Schatzl" on  2000-08-31 }
+{ e-mail: [email protected] }
+
+uses
+   sysutils;
+
+var
+   error : boolean;
+
 begin
+  error:=true;
   try
      asm
-        db 0fh,0fh,0fh,0fh
+        // invalid opcode, e.g. SSE instruction
+        // try several opcode to get the invalid instruction exception
+        movaps %xmm6, %xmm7
+        .byte 0x0f,0xc7,0xc8
+        .byte 1,2,3,4
      end;
   except
-     halt(0);
+     error:=false;
   end;
-  halt(1);
+  if error then
+    begin
+       writeln('Invalid opcode exception doesn'' work');
+       halt(1);
+    end;
 end.