Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
system.h
Go to the documentation of this file.
1 #ifndef _ASM_CRIS_ARCH_SYSTEM_H
2 #define _ASM_CRIS_ARCH_SYSTEM_H
3 
4 
5 /* Read the CPU version register. */
6 static inline unsigned long rdvr(void)
7 {
8  unsigned char vr;
9 
10  __asm__ __volatile__ ("move $vr, %0" : "=rm" (vr));
11  return vr;
12 }
13 
14 #define cris_machine_name "crisv32"
15 
16 /* Read the user-mode stack pointer. */
17 static inline unsigned long rdusp(void)
18 {
19  unsigned long usp;
20 
21  __asm__ __volatile__ ("move $usp, %0" : "=rm" (usp));
22  return usp;
23 }
24 
25 /* Read the current stack pointer. */
26 static inline unsigned long rdsp(void)
27 {
28  unsigned long sp;
29 
30  __asm__ __volatile__ ("move.d $sp, %0" : "=rm" (sp));
31  return sp;
32 }
33 
34 /* Write the user-mode stack pointer. */
35 #define wrusp(usp) __asm__ __volatile__ ("move %0, $usp" : : "rm" (usp))
36 
37 #endif /* _ASM_CRIS_ARCH_SYSTEM_H */