245 |
|
// Restore PowerPC registers |
246 |
|
lwz r1,XLM_EMUL_RETURN_STACK(0) |
247 |
|
RESTORE_SYSTEM_R2 |
248 |
– |
RESTORE_SYSTEM_R13 |
248 |
|
lmw r13,20(r1) |
249 |
|
lfd f14,20+19*4+0*8(r1) |
250 |
|
lfd f15,20+19*4+1*8(r1) |
762 |
|
C_SYMBOL_NAME(r_get_resource): |
763 |
|
do_get_resource XLM_R_GET_RESOURCE |
764 |
|
|
765 |
+ |
ASM_MACRO_START do_get_named_resource ASM_MACRO_ARG0_DEF |
766 |
+ |
// Create stack frame |
767 |
+ |
mflr r0 |
768 |
+ |
stw r0,8(r1) |
769 |
+ |
stwu r1,-(56+12)(r1) |
770 |
+ |
|
771 |
+ |
// Save type/ID |
772 |
+ |
stw r3,56(r1) |
773 |
+ |
stw r4,56+4(r1) |
774 |
+ |
|
775 |
+ |
// Call old routine |
776 |
+ |
lwz r0,ASM_MACRO_ARG0(0) |
777 |
+ |
lwz r2,XLM_RES_LIB_TOC(0) |
778 |
+ |
mtctr r0 |
779 |
+ |
bctrl |
780 |
+ |
stw r3,56+8(r1) // Save handle |
781 |
+ |
|
782 |
+ |
// Call CheckLoad |
783 |
+ |
RESTORE_SYSTEM_R2 |
784 |
+ |
RESTORE_SYSTEM_R13 |
785 |
+ |
lwz r3,56(r1) |
786 |
+ |
lwz r4,56+4(r1) |
787 |
+ |
lwz r5,56+8(r1) |
788 |
+ |
bl C_SYMBOL_NAME(named_check_load_invoc) |
789 |
+ |
lwz r3,56+8(r1) // Restore handle |
790 |
+ |
|
791 |
+ |
// Return to caller |
792 |
+ |
lwz r0,56+12+8(r1) |
793 |
+ |
mtlr r0 |
794 |
+ |
addi r1,r1,56+12 |
795 |
+ |
blr |
796 |
+ |
ASM_MACRO_END |
797 |
+ |
|
798 |
+ |
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(get_named_resource) |
799 |
+ |
C_SYMBOL_NAME(get_named_resource): |
800 |
+ |
do_get_named_resource XLM_GET_NAMED_RESOURCE |
801 |
+ |
|
802 |
+ |
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(get_1_named_resource) |
803 |
+ |
C_SYMBOL_NAME(get_1_named_resource): |
804 |
+ |
do_get_named_resource XLM_GET_1_NAMED_RESOURCE |
805 |
+ |
|
806 |
|
|
807 |
|
/* |
808 |
|
* void ppc_interrupt(uint32 entry{r3}, uint32 kernel_data{r4}) - Execute PPC interrupt |