Last change
on this file since 6099cac was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | .globl _addfpu
|
---|
2 | .text
|
---|
3 | _addfpu:
|
---|
4 | ~~addfpu:
|
---|
5 | ~t=8
|
---|
6 | ~k=10
|
---|
7 | link R14,#0
|
---|
8 | movem.l R4-R7,-(sp)
|
---|
9 | ~x=R7
|
---|
10 | ~z=R6
|
---|
11 | ~y=R5
|
---|
12 | *line 31
|
---|
13 | move 8(R14),(sp)
|
---|
14 | jsr _fromfpu
|
---|
15 | move R0,R7
|
---|
16 | *line 33
|
---|
17 | *line 34
|
---|
18 | cmp #32767,R7
|
---|
19 | bne L2
|
---|
20 | *line 34
|
---|
21 | clr R0
|
---|
22 | move 8(R14),R0
|
---|
23 | bra L1
|
---|
24 | *line 35
|
---|
25 | L2:
|
---|
26 | *line 36
|
---|
27 | move 8(R14),R5
|
---|
28 | *line 37
|
---|
29 | move R7,R6
|
---|
30 | add 10(R14),R6
|
---|
31 | *line 39
|
---|
32 | *line 40
|
---|
33 | cmp #32767,R6
|
---|
34 | blt L3
|
---|
35 | *line 40
|
---|
36 | move #32767,(sp)
|
---|
37 | jsr _tofpu
|
---|
38 | bra L1
|
---|
39 | *line 41
|
---|
40 | L3:
|
---|
41 | *line 42
|
---|
42 | bra L6
|
---|
43 | L5:
|
---|
44 | *line 43
|
---|
45 | add #1,R7
|
---|
46 | move R7,(sp)
|
---|
47 | jsr _tofpu
|
---|
48 | move R0,R5
|
---|
49 | L6:
|
---|
50 | *line 43
|
---|
51 | cmp 8(R14),R5
|
---|
52 | beq L5
|
---|
53 | cmp R7,R6
|
---|
54 | bgt L5
|
---|
55 | L4:
|
---|
56 | *line 45
|
---|
57 | clr R0
|
---|
58 | move R5,R0
|
---|
59 | bra L1
|
---|
60 | L1:tst.l (sp)+
|
---|
61 | movem.l (sp)+,R5-R7
|
---|
62 | unlk R14
|
---|
63 | rts
|
---|
64 | .globl _subfpu
|
---|
65 | .text
|
---|
66 | _subfpu:
|
---|
67 | ~~subfpu:
|
---|
68 | ~t=8
|
---|
69 | ~k=10
|
---|
70 | link R14,#0
|
---|
71 | movem.l R4-R7,-(sp)
|
---|
72 | ~x=R7
|
---|
73 | ~z=R6
|
---|
74 | ~y=R5
|
---|
75 | *line 65
|
---|
76 | move 8(R14),(sp)
|
---|
77 | jsr _fromfpu
|
---|
78 | move R0,R7
|
---|
79 | *line 67
|
---|
80 | *line 68
|
---|
81 | cmp #1,R7
|
---|
82 | bne L8
|
---|
83 | *line 68
|
---|
84 | clr R0
|
---|
85 | move 8(R14),R0
|
---|
86 | bra L7
|
---|
87 | *line 69
|
---|
88 | L8:
|
---|
89 | *line 70
|
---|
90 | move 8(R14),R5
|
---|
91 | *line 71
|
---|
92 | move R7,R6
|
---|
93 | sub 10(R14),R6
|
---|
94 | *line 73
|
---|
95 | *line 74
|
---|
96 | cmp #1,R6
|
---|
97 | bgt L9
|
---|
98 | *line 74
|
---|
99 | move #1,(sp)
|
---|
100 | jsr _tofpu
|
---|
101 | bra L7
|
---|
102 | *line 75
|
---|
103 | L9:
|
---|
104 | *line 76
|
---|
105 | bra L12
|
---|
106 | L11:
|
---|
107 | *line 77
|
---|
108 | sub #1,R7
|
---|
109 | move R7,(sp)
|
---|
110 | jsr _tofpu
|
---|
111 | move R0,R5
|
---|
112 | L12:
|
---|
113 | *line 77
|
---|
114 | cmp 8(R14),R5
|
---|
115 | beq L11
|
---|
116 | cmp R7,R6
|
---|
117 | blt L11
|
---|
118 | L10:
|
---|
119 | *line 79
|
---|
120 | clr R0
|
---|
121 | move R5,R0
|
---|
122 | bra L7
|
---|
123 | L7:tst.l (sp)+
|
---|
124 | movem.l (sp)+,R5-R7
|
---|
125 | unlk R14
|
---|
126 | rts
|
---|
127 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.