Rev 282 | Rev 391 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 282 | Rev 309 | ||
---|---|---|---|
Line 88... | Line 88... | ||
88 | * |
88 | * |
89 | * If a thread accesses coprocessor, exception is run, which |
89 | * If a thread accesses coprocessor, exception is run, which |
90 | * does a lazy fpu context switch. |
90 | * does a lazy fpu context switch. |
91 | * |
91 | * |
92 | */ |
92 | */ |
93 | void set_TS_flag(void) |
93 | void fpu_disable(void) |
94 | { |
94 | { |
95 | __asm__ volatile ( |
95 | __asm__ volatile ( |
96 | "mov %%cr0,%%rax;" |
96 | "mov %%cr0,%%rax;" |
97 | "bts $3,%%rax;" |
97 | "bts $3,%%rax;" |
98 | "mov %%rax,%%cr0;" |
98 | "mov %%rax,%%cr0;" |
Line 100... | Line 100... | ||
100 | : |
100 | : |
101 | :"%rax" |
101 | :"%rax" |
102 | ); |
102 | ); |
103 | } |
103 | } |
104 | 104 | ||
105 | void reset_TS_flag(void) |
105 | void fpu_enable(void) |
106 | { |
106 | { |
107 | __asm__ volatile ( |
107 | __asm__ volatile ( |
108 | "mov %%cr0,%%rax;" |
108 | "mov %%cr0,%%rax;" |
109 | "btr $3,%%rax;" |
109 | "btr $3,%%rax;" |
110 | "mov %%rax,%%cr0;" |
110 | "mov %%rax,%%cr0;" |