mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-31 06:01:15 +08:00
2010-04-08 Till Straumann <strauman@slac.stanford.edu>
* cpu_asm.S, rtems/score/cpu.h: On uC5282, the thread restart needed to reload the frame pointer. As part of doing this, the code was moved from inline asm to the .S file.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2010-04-08 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* cpu_asm.S, rtems/score/cpu.h: On uC5282, the thread restart needed to
|
||||
reload the frame pointer. As part of doing this, the code was moved
|
||||
from inline asm to the .S file.
|
||||
|
||||
2010-03-27 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* cpu.c, cpu_asm.S: Add include of config.h
|
||||
|
||||
@@ -61,10 +61,23 @@ cacr_set: movew sr,d1 | get content of sr in d1
|
||||
movec d0,cacr | enable FPU in cacr
|
||||
#endif
|
||||
|
||||
|
||||
restore: movml a0@,d1-d7/a2-a7 | restore context
|
||||
movw d1,sr | restore status register
|
||||
rts
|
||||
|
||||
.global SYM (_CPU_Context_Restart_self)
|
||||
.set CONTEXT_ARG, 4 | context arg
|
||||
|
||||
#if defined( __mcoldfire__ ) && ( M68K_HAS_FPU == 1 )
|
||||
/* XXX _CPU_Context_switch maintains FPU context -- do we have to restore
|
||||
* that, too??
|
||||
*/
|
||||
#warning "_CPU_Context_Restart_self restoring FPU context not implemented"
|
||||
#endif
|
||||
SYM(_CPU_Context_Restart_self):
|
||||
moval a7@(CONTEXT_ARG),a0
|
||||
bra restore
|
||||
/*
|
||||
* Floating point context save and restore.
|
||||
*
|
||||
|
||||
@@ -472,14 +472,6 @@ uint32_t _CPU_ISR_Get_level( void );
|
||||
} while ( 0 )
|
||||
#endif
|
||||
|
||||
#define _CPU_Context_Restart_self( _the_context ) \
|
||||
{ asm volatile( "movew %0,%%sr ; " \
|
||||
"moval %1,%%a7 ; " \
|
||||
"rts" \
|
||||
: "=d" ((_the_context)->sr), "=d" ((_the_context)->a7_msp) \
|
||||
: "0" ((_the_context)->sr), "1" ((_the_context)->a7_msp) ); \
|
||||
}
|
||||
|
||||
/* end of Context handler macros */
|
||||
|
||||
/*
|
||||
@@ -700,6 +692,10 @@ void _CPU_Context_switch(
|
||||
Context_Control *heir
|
||||
);
|
||||
|
||||
void _CPU_Context_Restart_self(
|
||||
Context_Control *the_context
|
||||
);
|
||||
|
||||
/*
|
||||
* _CPU_Context_save_fp
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user