blob: 8978b1f4709451af27c32a819f8701556178cb77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{ %version=1.1 }
{ %cpu=i386 }
{$mode objfpc}
{ Source provided for Free Pascal Bug Report 1122 }
{ Submitted by "Thomas Schatzl" on 2000-08-31 }
{ e-mail: tom_at_work@yline.com }
uses
sysutils;
var
error : boolean;
begin
error:=true;
try
asm
// 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
error:=false;
end;
if error then
begin
writeln('Invalid opcode exception doesn'' work');
halt(1);
end;
end.
|