blob: 6336c3ce5944f61f6f419cdfa74d3d4382435ee0 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{ %CPU=i386 }
{ %TARGET=go32v2,win32,linux }
{ %NOTE=This test requires an installed Nasm }
{ Old file: tbs0043.pp }
{ shows assembler nasm output fpu opcodes problem OK 0.99.6 (PFV) }
{$ifdef Unix}
{$output_format nasmelf}
{$endif}
{$ifdef go32v2}
{$output_format nasmcoff}
{$endif}
{$ifdef win32}
{$output_format nasmwin32}
{$endif}
{$asmmode att}
{ THE OUTPUT is incorrect but the }
{ parsing is correct. }
{ under nasm output only. }
{ works correctly under tasm/gas }
{ other problems occur with other }
{ things in math.inc }
{ pp -TDOS -Ratt -Anasm bug0043.pp }
procedure frac;
begin
asm
subl $16,%esp
fnstcw -4(%ebp)
fwait { unknown instruction }
movw -4(%ebp),%cx
orw $0x0c3f,%cx
movw %cx,-8(%ebp)
fldcw -8(%ebp)
fwait { unknown instruction }
fldl 8(%ebp)
frndint
fsubl 8(%ebp)
fabsl
fclex
fldcw -4(%ebp)
leave
ret $8
end ['ECX'];
end;
Begin
end.
|