Skip to content

Commit 593e730

Browse files
committed
moved fpmul labels into jr range
1 parent 3f76e39 commit 593e730

1 file changed

Lines changed: 55 additions & 54 deletions

File tree

src/crt/fpmul.src

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,58 @@
55
.global __fpmul
66
.type __fpmul, @function
77

8+
.L.underflow:
9+
pop af
10+
pop af
11+
pop hl
12+
pop de
13+
and a, 080h
14+
ld bc, 0
15+
ret
16+
.L.nonfinite:
17+
sbc hl, bc
18+
jr z, .L.return.2
19+
add hl, bc
20+
pop bc
21+
jr .L.return.1
22+
.L.nonfinite.1:
23+
inc d
24+
jr z, .L.nonfinite
25+
ex de, hl
26+
pop hl
27+
add hl, bc
28+
or a, a
29+
sbc hl, bc
30+
ex de, hl
31+
jr nz, .L.return.1
32+
ld h, a
33+
.L.return.1:
34+
pop af
35+
ex (sp), hl
36+
pop bc
37+
jr .L.return
38+
.L.nonfinite.2:
39+
add hl, bc
40+
or a, a
41+
sbc hl, bc
42+
jr z, .L.return.nan
43+
.L.return.2:
44+
pop bc
45+
pop af
46+
pop bc
47+
push bc
48+
.L.return.pop:
49+
pop hl
50+
.L.return:
51+
pop de
52+
or a, 07Fh
53+
ret
54+
.L.return.nan:
55+
pop bc
56+
set 7, b
57+
pop af
58+
jr .L.return.pop
59+
860
; IEEE single precision multiplication
961
; aubc = aubc * euhl
1062
__fpmul: ; CHECK: same(bitcast(float, pair8_24_t, { out.BC, out.A }), bitcast(float, pair8_24_t, { in.BC, in.A }) * bitcast(float, pair8_24_t, { in.HL, in.E })) && out.DE == in.DE && out.HL == in.HL && out.IX == in.IX && out.IY == in.IY
@@ -20,9 +72,9 @@ __fpmul: ; CHECK: same(bitcast(float, pair8_24_t, { out.BC, out.A }), bitcast(fl
2072
ld e, a
2173
call __fppop2
2274
inc e
23-
jp z, .L.nonfinite.1
75+
jr z, .L.nonfinite.1
2476
inc d
25-
jp z, .L.nonfinite.2
77+
jr z, .L.nonfinite.2
2678
ld a, d
2779
ld d, b; 0
2880
rlc e
@@ -43,7 +95,7 @@ __fpmul: ; CHECK: same(bitcast(float, pair8_24_t, { out.BC, out.A }), bitcast(fl
4395
jr z, .L.subnormal
4496
jr c, .L.continue
4597
cp a, -23
46-
jp c, .L.underflow
98+
jr c, .L.underflow
4799
.L.subnormal:
48100
dec a
49101
ld d, a
@@ -138,57 +190,6 @@ __fpmul: ; CHECK: same(bitcast(float, pair8_24_t, { out.BC, out.A }), bitcast(fl
138190
pop bc
139191
pop de
140192
ret
141-
.L.underflow:
142-
pop af
143-
pop af
144-
pop hl
145-
pop de
146-
and a, 080h
147-
ld bc, 0
148-
ret
149-
.L.nonfinite:
150-
sbc hl, bc
151-
jr z, .L.return.2
152-
add hl, bc
153-
pop bc
154-
jr .L.return.1
155-
.L.nonfinite.1:
156-
inc d
157-
jr z, .L.nonfinite
158-
ex de, hl
159-
pop hl
160-
add hl, bc
161-
or a, a
162-
sbc hl, bc
163-
ex de, hl
164-
jr nz, .L.return.1
165-
ld h, a
166-
.L.return.1:
167-
pop af
168-
ex (sp), hl
169-
pop bc
170-
jr .L.return
171-
.L.nonfinite.2:
172-
add hl, bc
173-
or a, a
174-
sbc hl, bc
175-
jr z, .L.return.nan
176-
.L.return.2:
177-
pop bc
178-
pop af
179-
pop bc
180-
push bc
181-
.L.return.pop:
182-
pop hl
183-
.L.return:
184-
pop de
185-
or a, 07Fh
186-
ret
187-
.L.return.nan:
188-
pop bc
189-
set 7, b
190-
pop af
191-
jr .L.return.pop
192193

193194
.extern __fppop1
194195
.extern __fppop2

0 commit comments

Comments
 (0)