summaryrefslogtreecommitdiff
path: root/lib9/setfcr-Linux-spim.S
diff options
context:
space:
mode:
authorDavid Boddie <david@boddie.org.uk>2021-02-03 13:22:12 +0000
committerCharles Forsyth <charles.forsyth@gmail.com>2021-02-03 13:22:12 +0000
commit7bb791f115f350b3d65936061110ef08f6a5434f (patch)
tree72c24a577de5faf8b9d16ca4333d5e554070e8f6 /lib9/setfcr-Linux-spim.S
parent206fe115321515fd30686e46f830e26205053831 (diff)
parentc6b7177527d6244e733dd51c900028140d0dc947 (diff)
Merged in Linux/spim (pull request #11)
Fixes for spim architecture running on a Linux host Approved-by: Charles Forsyth
Diffstat (limited to 'lib9/setfcr-Linux-spim.S')
-rw-r--r--lib9/setfcr-Linux-spim.S27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib9/setfcr-Linux-spim.S b/lib9/setfcr-Linux-spim.S
new file mode 100644
index 00000000..9031f628
--- /dev/null
+++ b/lib9/setfcr-Linux-spim.S
@@ -0,0 +1,27 @@
+#include <sys/regdef.h>
+#include <sys/asm.h>
+
+#define FN(x) .type x,%function; .global x; x
+#define ENT
+#define RET jr ra
+
+ .file "setfcr-Linux-spim.S"
+FN(setfcr):
+ ENT
+ mtc1 a0, $31
+ RET
+
+FN(getfcr):
+ ENT
+ mfc1 v0, $31
+ RET
+
+FN(getfsr):
+ ENT
+ mfc1 v0, $31
+ RET
+
+FN(setfsr):
+ ENT
+ mtc1 a0, $31
+ RET