This commit is contained in:
parent
9ddb9041f3
commit
43fe9e2d08
5 changed files with 267 additions and 0 deletions
28
source/system/gp.mip
Normal file
28
source/system/gp.mip
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
|
||||
global SaveGP
|
||||
global ReloadGP
|
||||
global SetGP
|
||||
|
||||
section .data
|
||||
GpSave dw 0
|
||||
|
||||
section .text
|
||||
|
||||
SaveGP
|
||||
la t8,GpSave
|
||||
j ra
|
||||
sw gp,0(t8)
|
||||
|
||||
ReloadGP
|
||||
add v0,gp,r0
|
||||
la t8,GpSave
|
||||
j ra
|
||||
lw gp,0(t8)
|
||||
|
||||
|
||||
|
||||
|
||||
SetGP
|
||||
j ra
|
||||
add gp,a0,r0
|
36
source/system/lnkopt.mip
Normal file
36
source/system/lnkopt.mip
Normal file
|
@ -0,0 +1,36 @@
|
|||
global LNK_RamSize
|
||||
global LNK_StackSize
|
||||
global LNK_OrgAddress
|
||||
global LNK_FileSys
|
||||
global LNK_DevKit
|
||||
|
||||
global OPT_LinkerOpts
|
||||
|
||||
global OPT_RamSize
|
||||
global OPT_StackSize
|
||||
global OPT_OrgAddress
|
||||
global OPT_FreeMemStart
|
||||
global OPT_FreeMemSize
|
||||
global OPT_FileSystem
|
||||
global OPT_DevKit
|
||||
global hahha
|
||||
|
||||
xref _extractors_size
|
||||
extractors group
|
||||
|
||||
|
||||
section .rdata
|
||||
OPT_LinkerOpts
|
||||
OPT_RamSize dw LNK_RamSize*1024*1024
|
||||
OPT_StackSize dw LNK_StackSize
|
||||
OPT_OrgAddress dw LNK_OrgAddress
|
||||
OPT_FreeMemStart dw hahha
|
||||
OPT_FreeMemSize dw ((LNK_OrgAddress+(LNK_RamSize*1024*1024)-(64*1024))-hahha)-LNK_StackSize
|
||||
OPT_FileSystem dw LNK_FileSys
|
||||
OPT_DevKit dw LNK_DevKit
|
||||
OPT_extraCtorsSize dw _extractors_size
|
||||
OPT_extraCtorsAddress dw group(extractors)
|
||||
|
||||
section .last
|
||||
|
||||
hahha dw 0
|
Loading…
Add table
Add a link
Reference in a new issue