We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff258f4 commit a61b237Copy full SHA for a61b237
src/libc/ilogbf.src
@@ -36,11 +36,11 @@ _ilogbf:
36
sbc hl, de
37
jr z, .ret_zero
38
call __ictlz
39
- ; Carry flag will be set at the end of __ictlz
40
-; scf
41
- sbc hl, hl
42
- neg
43
- add a, 129
+ ex de, hl
+ ; DE was zero, so HL is now zero
+ dec hl
+ cpl
+ add a, 130
44
ld l, a
45
ret
46
0 commit comments