Rev 1787 | Rev 2071 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1877 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | 39 | ||
40 | typedef void (*fpu_context_function)(fpu_context_t *fctx); |
40 | typedef void (*fpu_context_function)(fpu_context_t *fctx); |
41 | 41 | ||
42 | static fpu_context_function fpu_save,fpu_restore; |
42 | static fpu_context_function fpu_save, fpu_restore; |
43 | 43 | ||
44 | - | ||
45 | - | ||
46 | static void fpu_context_f_save(fpu_context_t *fctx) |
44 | static void fpu_context_f_save(fpu_context_t *fctx) |
47 | { |
45 | { |
48 | __asm__ volatile ( |
46 | __asm__ volatile ( |
49 | "fnsave %0" |
47 | "fnsave %0" |
50 | : "=m"(*fctx) |
48 | : "=m"(*fctx) |
Line 90... | Line 88... | ||
90 | { |
88 | { |
91 | fpu_save=fpu_context_f_save; |
89 | fpu_save = fpu_context_f_save; |
92 | fpu_restore=fpu_context_f_restore; |
90 | fpu_restore = fpu_context_f_restore; |
93 | } |
91 | } |
94 | 92 | ||
95 | - | ||
96 | - | ||
97 | void fpu_context_save(fpu_context_t *fctx) |
93 | void fpu_context_save(fpu_context_t *fctx) |
98 | { |
94 | { |
99 | fpu_save(fctx); |
95 | fpu_save(fctx); |
100 | } |
96 | } |
101 | 97 | ||
102 | void fpu_context_restore(fpu_context_t *fctx) |
98 | void fpu_context_restore(fpu_context_t *fctx) |
103 | { |
99 | { |
104 | fpu_restore(fctx); |
100 | fpu_restore(fctx); |
105 | } |
101 | } |
106 | 102 | ||
107 | - | ||
108 | - | ||
109 | void fpu_init() |
103 | void fpu_init() |
110 | { |
104 | { |
111 | uint32_t help0=0,help1=0; |
105 | uint32_t help0 = 0, help1 = 0; |
112 | __asm__ volatile ( |
106 | __asm__ volatile ( |
113 | "fninit;\n" |
107 | "fninit;\n" |
Line 121... | Line 115... | ||
121 | ); |
115 | ); |
122 | } |
116 | } |
123 | 117 | ||
124 | /** @} |
118 | /** @} |
125 | */ |
119 | */ |
126 | - |