489 |
|
stw r1,XLM_EMUL_RETURN_STACK(0) |
490 |
|
|
491 |
|
// Preset registers for ROM boot routine |
492 |
< |
lis r3,0x40b0 // Pointer to ROM boot structure |
493 |
< |
ori r3,r3,0xd000 |
492 |
> |
lis r3,ASM_HA16(C_SYMBOL_NAME(ROMBase)) // Pointer to ROM boot structure: |
493 |
> |
lwz r3,ASM_LO16(C_SYMBOL_NAME(ROMBase))(r3) // r3 = ROMBase + 0x30d000 |
494 |
> |
addis r3,r3,ASM_HA16(0x30d000) |
495 |
> |
addi r3,r3,ASM_LO16(0x30d000) |
496 |
|
|
497 |
|
// 68k emulator is now active |
498 |
|
li r0,MODE_68K |
889 |
|
|
890 |
|
// Atomically increase stack_id |
891 |
|
lis r19,ASM_HA16(ASM_MACRO_ARG2) |
892 |
< |
la r19,ASM_LO16(ASM_MACRO_ARG2,r19) |
892 |
> |
la r19,ASM_LO16(ASM_MACRO_ARG2)(r19) |
893 |
|
li r4,1 |
894 |
|
mr r3,r19 |
895 |
|
bl C_SYMBOL_NAME(atomic_add) |
899 |
|
// ID was 0, we can use the local stack |
900 |
|
lis r9,ASM_HA16(ASM_MACRO_ARG1) |
901 |
|
lis r3,(SIG_STACK_SIZE>>16) |
902 |
< |
la r9,ASM_LO16(ASM_MACRO_ARG1,r9) |
902 |
> |
la r9,ASM_LO16(ASM_MACRO_ARG1)(r9) |
903 |
|
addi r3,r3,((SIG_STACK_SIZE&0xffff)-64) |
904 |
|
add r1,r9,r3 |
905 |
|
|