This source file includes following definitions.
- clear_fpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #ifndef _M68K_SYSTEM_H
16 #define _M68K_SYSTEM_H
17
18 #include <linux/autoconf.h>
19
20 #if defined(CONFIG_ATARI) && !defined(CONFIG_AMIGA) && !defined(CONFIG_MAC)
21
22 #define sti() __asm__ __volatile__ ("andiw #0xfbff,sr": : : "memory")
23 #else
24 #define sti() __asm__ __volatile__ ("andiw #0xf8ff,sr": : : "memory")
25 #endif
26 #define cli() __asm__ __volatile__ ("oriw #0x0700,sr": : : "memory")
27 #define nop() __asm__ __volatile__ ("nop"::)
28
29 #define save_flags(x) \
30 __asm__ __volatile__("movew sr,%0":"=d" (x) : :"memory")
31
32 #define restore_flags(x) \
33 __asm__ __volatile__("movew %0,sr": :"d" (x) : "memory")
34
35 #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc")
36
37 #define move_to_user_mode() \
38 __asm__ __volatile__ ("movel sp,usp\n\t" \
39 "movec %0,msp\n\t" \
40 "andiw #0xdfff,sr" \
41 : \
42 : "r" (current->kernel_stack_page + PAGE_SIZE) \
43 : "memory", "sp")
44
45 static inline void clear_fpu(void) {
46 unsigned long nilstate = 0;
47 __asm__ __volatile__ ("frestore %0@" : : "a" (&nilstate));
48 }
49
50 #define halt() \
51 __asm__ __volatile__ ("halt")
52
53 #endif