mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-22 06:19:54 -04:00
Handwritten asm: Register getter/setter functions (#1815)
* Handwritten asm: Register getter/setter functions * Formatting fix
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetCause)
|
||||
MFC0( v0, C0_CAUSE)
|
||||
jr ra
|
||||
END(__osGetCause)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetCompare)
|
||||
MFC0( v0, C0_COMPARE)
|
||||
jr ra
|
||||
END(__osGetCompare)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetConfig)
|
||||
MFC0( v0, C0_CONFIG)
|
||||
jr ra
|
||||
END(__osGetConfig)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(osGetCount)
|
||||
MFC0( v0, C0_COUNT)
|
||||
jr ra
|
||||
END(osGetCount)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetFpcCsr)
|
||||
CFC1( v0, C1_FPCSR)
|
||||
jr ra
|
||||
END(__osGetFpcCsr)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetSR)
|
||||
MFC0( v0, C0_SR)
|
||||
jr ra
|
||||
END(__osGetSR)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osGetWatchLo)
|
||||
MFC0( v0, C0_WATCHLO)
|
||||
jr ra
|
||||
END(__osGetWatchLo)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetCause)
|
||||
MTC0( a0, C0_CAUSE)
|
||||
jr ra
|
||||
END(__osSetCause)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetCompare)
|
||||
MTC0( a0, C0_COMPARE)
|
||||
jr ra
|
||||
END(__osSetCompare)
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetConfig)
|
||||
MTC0( a0, C0_CONFIG)
|
||||
jr ra
|
||||
END(__osSetConfig)
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetFpcCsr)
|
||||
CFC1( v0, fcr31)
|
||||
CTC1( a0, fcr31)
|
||||
jr ra
|
||||
END(__osSetFpcCsr)
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetSR)
|
||||
MTC0( a0, C0_SR)
|
||||
NOP
|
||||
jr ra
|
||||
END(__osSetSR)
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "PR/asm.h"
|
||||
#include "PR/regdef.h"
|
||||
#include "PR/R4300.h"
|
||||
|
||||
.text
|
||||
|
||||
LEAF(__osSetWatchLo)
|
||||
MTC0( a0, C0_WATCHLO)
|
||||
NOP
|
||||
jr ra
|
||||
END(__osSetWatchLo)
|
||||
Reference in New Issue
Block a user