summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S
diff options
context:
space:
mode:
authorHesham ALMatary <heshamelmatary@gmail.com>2014-08-31 18:29:41 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-09-02 09:29:08 -0500
commit305357eda5cc68436140a86379443ae4873f32e1 (patch)
tree7a23ace6a17c0bbd6337d5157ba6775f3bc36673 /cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S
parentAdd missing r31 load instruction _ISR_Handler (diff)
downloadrtems-305357eda5cc68436140a86379443ae4873f32e1.tar.bz2
or1k: Implement context validate and context volatile clobber functions.
score/cpu/or1k: Add two new assembly functions: _CPU_Context_validate and _CPU_Context_volatile_clobber; their implementation follows corresponding ARM functions.
Diffstat (limited to 'cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S')
-rw-r--r--cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S35
1 files changed, 35 insertions, 0 deletions
diff --git a/cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S b/cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S
new file mode 100644
index 0000000000..304b769649
--- /dev/null
+++ b/cpukit/score/cpu/or1k/or1k-context-volatile-clobber.S
@@ -0,0 +1,35 @@
+/*
+ * COPYRIGHT (c) 2014 Hesham ALMatary <heshamelmatary@gmail.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/asm.h>
+
+.section .text
+
+PUBLIC(_CPU_Context_volatile_clobber)
+SYM(_CPU_Context_volatile_clobber):
+
+.macro clobber_register reg
+ l.addi r0, r0, -1
+ l.addi \reg, r0, 0
+.endm
+
+ clobber_register r3
+ clobber_register r4
+ clobber_register r5
+ clobber_register r6
+ clobber_register r7
+ clobber_register r8
+ clobber_register r13
+ clobber_register r31
+
+ l.jr r9
+ l.nop