3 * Floating point unit code
9 #include "per_cpu_data.h"
12 class slab_cache_anon;
22 static Context *owner(unsigned cpu);
23 static void set_owner(unsigned cpu, Context *owner);
24 static bool is_owner(unsigned cpu, Context *owner);
26 // all the following methods are arch dependent
27 static void init(unsigned cpu) FIASCO_INIT_CPU;
28 static unsigned state_size();
29 static unsigned state_align();
30 static void init_state(Fpu_state *);
31 static void restore_state(Fpu_state *);
32 static void save_state(Fpu_state *);
33 static void disable();
38 static Per_cpu<Context *>_owner;
43 #include "fpu_state.h"
45 Per_cpu<Context *> DEFINE_PER_CPU Fpu::_owner;
48 Context * Fpu::owner(unsigned cpu)
50 return _owner.cpu(cpu);
54 void Fpu::set_owner(unsigned cpu, Context *owner)
56 _owner.cpu(cpu) = owner;
60 bool Fpu::is_owner(unsigned cpu, Context *owner)
62 return _owner.cpu(cpu) == owner;
65 //---------------------------------------------------------------------------
66 IMPLEMENTATION [!fpu]:
69 void Fpu::init_state(Fpu_state *)
73 unsigned Fpu::state_size()
77 unsigned Fpu::state_align()
81 void Fpu::init(unsigned)
85 void Fpu::save_state(Fpu_state *)
89 void Fpu::restore_state(Fpu_state *)