File tree Expand file tree Collapse file tree 2 files changed +26
-23
lines changed Expand file tree Collapse file tree 2 files changed +26
-23
lines changed Original file line number Diff line number Diff line change 22
33 section .text
44
5+ public __llshru
6+
7+ __llshru:
8+ ; Suboptimal for large shift amounts
9+ push af
10+ push iy
11+ ld iy, 0
12+ add iy, sp
13+ ld a, (iy + 9)
14+ or a, a
15+ jr z, __llshr_common.finish
16+ push de
17+ push hl
18+ srl b
19+ jr __llshr_common.hijack_llshru
20+
21+ section .text
22+
523 public __llshrs
624
725__llshrs:
@@ -12,12 +30,17 @@ __llshrs:
1230 add iy, sp
1331 ld a, (iy + 9)
1432 or a, a
15- jr z, .finish
33+ jr z, __llshr_common .finish
1634 push de
1735 push hl
36+
37+ section .text
38+
39+ private __llshr_common
40+ __llshr_common:
1841.loop:
1942 sra b
20- public __llshrs .hijack_llshru
43+ private __llshr_common .hijack_llshru
2144.hijack_llshru:
2245 rr c
2346 rr (iy - 1)
@@ -36,7 +59,7 @@ __llshrs:
3659 ld l, e
3760 ld h, d
3861 pop de
39- public __llshrs .finish
62+ private __llshr_common .finish
4063.finish:
4164 pop iy
4265 pop af
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments