Handwritten asm: Register getter/setter functions (#1815)

* Handwritten asm: Register getter/setter functions

* Formatting fix
This commit is contained in:
Tharo
2025-08-05 17:13:47 +01:00
committed by GitHub
parent 43a3ad88dc
commit ce93b71b95
15 changed files with 417 additions and 255 deletions
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+10
View File
@@ -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)
+11
View File
@@ -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)
+11
View File
@@ -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)
+11
View File
@@ -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)