* 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:
@@ -10,6 +10,11 @@
|
|||||||
#include <arch/x86/descriptors.h>
|
#include <arch/x86/descriptors.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct tss {
|
struct tss {
|
||||||
uint16 prev_task;
|
uint16 prev_task;
|
||||||
uint16 unused0;
|
uint16 unused0;
|
||||||
@@ -59,7 +64,6 @@ typedef struct pdentry { // page directory entry
|
|||||||
unsigned int addr:20;
|
unsigned int addr:20;
|
||||||
} pdentry;
|
} pdentry;
|
||||||
|
|
||||||
// NOTE: Keep in sync with <os/arch/x86/arch_debugger.h>!
|
|
||||||
struct iframe {
|
struct iframe {
|
||||||
unsigned int gs;
|
unsigned int gs;
|
||||||
unsigned int fs;
|
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_swap_pgdir(addr_t new_pgdir);
|
||||||
void i386_fsave(void *fpu_state);
|
void i386_fsave(void *fpu_state);
|
||||||
void i386_fxsave(void *fpu_state);
|
void i386_fxsave(void *fpu_state);
|
||||||
void i386_frstor(void *fpu_state);
|
void i386_frstor(const void *fpu_state);
|
||||||
void i386_fxrstor(void *fpu_state);
|
void i386_fxrstor(const void *fpu_state);
|
||||||
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);
|
||||||
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);
|
||||||
void x86_set_task_gate(int32 n, int32 segment);
|
void x86_set_task_gate(int32 n, int32 segment);
|
||||||
|
|
||||||
#define read_ebp(value) \
|
#define read_ebp(value) \
|
||||||
@@ -161,4 +165,10 @@ _v; \
|
|||||||
|
|
||||||
extern segment_descriptor *gGDT;
|
extern segment_descriptor *gGDT;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* _KERNEL_ARCH_x86_CPU_H */
|
#endif /* _KERNEL_ARCH_x86_CPU_H */
|
||||||
|
|||||||
@@ -30,19 +30,19 @@ FUNCTION(i386_fxsave):
|
|||||||
fxsave (%eax)
|
fxsave (%eax)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
/* void i386_frstor(void *fpu_state); */
|
/* void i386_frstor(const void *fpu_state); */
|
||||||
FUNCTION(i386_frstor):
|
FUNCTION(i386_frstor):
|
||||||
movl 4(%esp), %eax
|
movl 4(%esp), %eax
|
||||||
frstor (%eax)
|
frstor (%eax)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
/* void i386_fxrstor(void *fpu_state); */
|
/* void i386_fxrstor(const void *fpu_state); */
|
||||||
FUNCTION(i386_fxrstor):
|
FUNCTION(i386_fxrstor):
|
||||||
movl 4(%esp), %eax
|
movl 4(%esp), %eax
|
||||||
fxrstor (%eax)
|
fxrstor (%eax)
|
||||||
ret
|
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):
|
FUNCTION(i386_fsave_swap):
|
||||||
movl 4(%esp),%eax
|
movl 4(%esp),%eax
|
||||||
fsave (%eax)
|
fsave (%eax)
|
||||||
@@ -50,7 +50,7 @@ FUNCTION(i386_fsave_swap):
|
|||||||
frstor (%eax)
|
frstor (%eax)
|
||||||
ret
|
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):
|
FUNCTION(i386_fxsave_swap):
|
||||||
movl 4(%esp),%eax
|
movl 4(%esp),%eax
|
||||||
fxsave (%eax)
|
fxsave (%eax)
|
||||||
|
|||||||
Reference in New Issue
Block a user