Skip to content

Commit 97722a6

Browse files
[libc] optimize __isnanf and __isinff
1 parent 2d97960 commit 97722a6

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

src/libc/isinff.src

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
section .text
44
public __isinff
55
__isinff:
6-
call __frameset0
7-
ld hl,(ix+6)
6+
ld iy,0
7+
add iy,sp
8+
ld hl,(iy+3)
89
adc hl,hl
9-
jr nz,.nxt
10-
ld hl,(ix+8)
10+
jr nz,.l
11+
ld hl,(iy+5)
1112
add hl,hl
1213
inc h
13-
.nxt:
14+
.l:
1415
ld hl,0
15-
jr nz,.ret
16+
ret nz
1617
inc hl
17-
.ret:
18-
ld sp,ix
19-
pop ix
2018
ret
21-
22-
extern __frameset0

src/libc/isnanf.src

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,16 @@
33
section .text
44
public __isnanf
55
__isnanf:
6-
call __frameset0
7-
ld hl,(ix+6)
6+
ld iy,0
7+
add iy,sp
8+
ld hl,(iy+3)
89
adc hl,hl
9-
jr z,.nxt
10-
ld hl,(ix+8)
10+
jr z,.l
11+
ld hl,(iy+5)
1112
add hl,hl
12-
.nxt:
13+
.l:
1314
inc h
1415
ld hl,0
15-
jr nz,.ret
16+
ret nz
1617
inc hl
17-
.ret:
18-
ld sp,ix
19-
pop ix
2018
ret
21-
22-
extern __frameset0
23-

0 commit comments

Comments
 (0)