1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_CRIS_ARCH_SYSTEM_H
3 #define __ASM_CRIS_ARCH_SYSTEM_H
6 /* read the CPU version register */
8 static inline unsigned long rdvr(void) {
10 __asm__ volatile ("move $vr,%0" : "=rm" (vr));
14 #define cris_machine_name "cris"
16 /* read/write the user-mode stackpointer */
18 static inline unsigned long rdusp(void) {
20 __asm__ __volatile__("move $usp,%0" : "=rm" (usp));
25 __asm__ __volatile__("move %0,$usp" : /* no outputs */ : "rm" (usp))
27 /* read the current stackpointer */
29 static inline unsigned long rdsp(void) {
31 __asm__ __volatile__("move.d $sp,%0" : "=rm" (sp));
35 static inline unsigned long _get_base(char * addr)