1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
.include "macros.inc"
.section .text, "ax"
.global __unregister_fragment
__unregister_fragment:
cmpwi r3, 0
blt lbl_80082B7C
cmpwi r3, 1
bge lbl_80082B7C
mulli r4, r3, 0xc
lis r3, fragmentinfo@ha
addi r0, r3, fragmentinfo@l
add r3, r0, r4
li r0, 0
stw r0, 0(r3)
stw r0, 4(r3)
stw r0, 8(r3)
lbl_80082B7C:
blr
.global __register_fragment
__register_fragment:
lis r5, fragmentinfo@ha
addi r5, r5, fragmentinfo@l
b lbl_80082B8C
lbl_80082B8C:
b lbl_80082B90
lbl_80082B90:
lwz r0, 8(r5)
cmpwi r0, 0
bne lbl_80082BB4
stw r3, 0(r5)
li r0, 1
li r3, 0
stw r4, 4(r5)
stw r0, 8(r5)
b lbl_80082BB8
lbl_80082BB4:
li r3, -1
lbl_80082BB8:
blr
.section .bss, "wa"
fragmentinfo:
.skip 0x10
|