summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/i386
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/exec/score/cpu/i386/cpu.c4
-rw-r--r--c/src/exec/score/cpu/i386/cpu.h8
-rw-r--r--c/src/exec/score/cpu/i386/i386.h4
3 files changed, 7 insertions, 9 deletions
diff --git a/c/src/exec/score/cpu/i386/cpu.c b/c/src/exec/score/cpu/i386/cpu.c
index 446515d6f9..73108e66d1 100644
--- a/c/src/exec/score/cpu/i386/cpu.c
+++ b/c/src/exec/score/cpu/i386/cpu.c
@@ -34,7 +34,7 @@ void _CPU_Initialize(
)
{
register unsigned16 fp_status asm ("ax");
- register unsigned8 *fp_context;
+ register void *fp_context;
_CPU_Table = *cpu_table;
@@ -56,7 +56,7 @@ void _CPU_Initialize(
if ( fp_status == 0 ) {
- fp_context = _CPU_Null_fp_context;
+ fp_context = &_CPU_Null_fp_context;
asm volatile( "fsave (%0)" : "=r" (fp_context)
: "0" (fp_context)
diff --git a/c/src/exec/score/cpu/i386/cpu.h b/c/src/exec/score/cpu/i386/cpu.h
index f3793cd443..f173d0cdc7 100644
--- a/c/src/exec/score/cpu/i386/cpu.h
+++ b/c/src/exec/score/cpu/i386/cpu.h
@@ -147,11 +147,9 @@ EXTERN void *_CPU_Interrupt_stack_high;
/*
* Minimum size of a thread's stack.
- *
- * NOTE: 256 bytes is probably too low in most cases.
*/
-#define CPU_STACK_MINIMUM_SIZE 256
+#define CPU_STACK_MINIMUM_SIZE 1024
/*
* i386 is pretty tolerant of alignment. Just put things on 4 byte boundaries.
@@ -232,8 +230,8 @@ unsigned32 _CPU_ISR_Get_level( void );
#define _CPU_Context_Initialize_fp( _fp_area ) \
{ \
- unsigned32 *_source = (unsigned32 *) _CPU_Null_fp_context; \
- unsigned32 *_destination = (unsigned32 *) *(_fp_area); \
+ unsigned32 *_source = (unsigned32 *) &_CPU_Null_fp_context; \
+ unsigned32 *_destination = *(_fp_area); \
unsigned32 _index; \
\
for ( _index=0 ; _index < CPU_CONTEXT_FP_SIZE/4 ; _index++ ) \
diff --git a/c/src/exec/score/cpu/i386/i386.h b/c/src/exec/score/cpu/i386/i386.h
index d43669ba53..1832d4142e 100644
--- a/c/src/exec/score/cpu/i386/i386.h
+++ b/c/src/exec/score/cpu/i386/i386.h
@@ -170,8 +170,8 @@ typedef struct {
do { \
register unsigned32 _eflags = 0; \
\
- asm volatile ( "push %0 ; \
- popf " \
+ asm volatile ( "pushf ; \
+ pop %0" \
: "=r" ((_eflags)) : "0" ((_eflags)) \
); \
\