* Made C++ save.

* Made the parameter for restoring the FPU state const.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11522 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-03-01 23:52:09 +00:00
parent 00a2b607d8
commit c8d7534e5d
2 changed files with 19 additions and 9 deletions

View File

@ -10,6 +10,11 @@
#include <arch/x86/descriptors.h>
#ifdef __cplusplus
extern "C" {
#endif
struct tss {
uint16 prev_task;
uint16 unused0;
@ -59,7 +64,6 @@ typedef struct pdentry { // page directory entry
unsigned int addr:20;
} pdentry;
// NOTE: Keep in sync with <os/arch/x86/arch_debugger.h>!
struct iframe {
unsigned int gs;
unsigned int fs;
@ -96,10 +100,10 @@ void i386_switch_stack_and_call(addr_t stack, void (*func)(void *), void *arg);
void i386_swap_pgdir(addr_t new_pgdir);
void i386_fsave(void *fpu_state);
void i386_fxsave(void *fpu_state);
void i386_frstor(void *fpu_state);
void i386_fxrstor(void *fpu_state);
void i386_fsave_swap(void *old_fpu_state, void *new_fpu_state);
void i386_fxsave_swap(void *old_fpu_state, void *new_fpu_state);
void i386_frstor(const void *fpu_state);
void i386_fxrstor(const void *fpu_state);
void i386_fsave_swap(void *old_fpu_state, const void *new_fpu_state);
void i386_fxsave_swap(void *old_fpu_state, const void *new_fpu_state);
void x86_set_task_gate(int32 n, int32 segment);
#define read_ebp(value) \
@ -161,4 +165,10 @@ _v; \
extern segment_descriptor *gGDT;
#ifdef __cplusplus
} // extern "C" {
#endif
#endif /* _KERNEL_ARCH_x86_CPU_H */

View File

@ -30,19 +30,19 @@ FUNCTION(i386_fxsave):
fxsave (%eax)
ret
/* void i386_frstor(void *fpu_state); */
/* void i386_frstor(const void *fpu_state); */
FUNCTION(i386_frstor):
movl 4(%esp), %eax
frstor (%eax)
ret
/* void i386_fxrstor(void *fpu_state); */
/* void i386_fxrstor(const void *fpu_state); */
FUNCTION(i386_fxrstor):
movl 4(%esp), %eax
fxrstor (%eax)
ret
/* void i386_fsave_swap(void *old_fpu_state, void *new_fpu_state); */
/* void i386_fsave_swap(void *old_fpu_state, const void *new_fpu_state); */
FUNCTION(i386_fsave_swap):
movl 4(%esp),%eax
fsave (%eax)
@ -50,7 +50,7 @@ FUNCTION(i386_fsave_swap):
frstor (%eax)
ret
/* void i386_fxsave_swap(void *old_fpu_state, void *new_fpu_state); */
/* void i386_fxsave_swap(void *old_fpu_state, const void *new_fpu_state); */
FUNCTION(i386_fxsave_swap):
movl 4(%esp),%eax
fxsave (%eax)