diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-29 15:54:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-30 16:46:36 +0200 |
commit | 1f6cdba6e1b13b05fec969938db46e08f4e68ace (patch) | |
tree | ef95a12b0f72d888b9b69a7c76ff347216f729c2 /cpukit | |
parent | sparc: Avoid new window for FP save/restore (diff) | |
download | rtems-1f6cdba6e1b13b05fec969938db46e08f4e68ace.tar.bz2 |
sparc: Remove superfluous FP enable
The FP context save/restore makes only sense in the context of FP
threads.
Update #2270.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/cpu/sparc/cpu.c | 5 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc/cpu_asm.S | 24 |
2 files changed, 7 insertions, 22 deletions
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c index f96d1ea786..e967bf2169 100644 --- a/cpukit/score/cpu/sparc/cpu.c +++ b/cpukit/score/cpu/sparc/cpu.c @@ -125,6 +125,11 @@ void _CPU_Initialize(void) { #if (SPARC_HAS_FPU == 1) Context_Control_fp *pointer; + uint32_t psr; + + sparc_get_psr( psr ); + psr |= SPARC_PSR_EF_MASK; + sparc_set_psr( psr ); /* * This seems to be the most appropriate way to obtain an initial diff --git a/cpukit/score/cpu/sparc/cpu_asm.S b/cpukit/score/cpu/sparc/cpu_asm.S index ddb2a1313d..3fa0532c86 100644 --- a/cpukit/score/cpu/sparc/cpu_asm.S +++ b/cpukit/score/cpu/sparc/cpu_asm.S @@ -44,17 +44,7 @@ .align 4 PUBLIC(_CPU_Context_save_fp) SYM(_CPU_Context_save_fp): - /* - * The following enables the floating point unit. - */ - - mov %psr, %o1 - sethi %hi(SPARC_PSR_EF_MASK), %o2 - or %o2, %lo(SPARC_PSR_EF_MASK), %o2 - or %o1, %o2, %o1 - mov %o1, %psr ! **** ENABLE FLOAT ACCESS **** - nop; nop; nop; ! Need three nops before EF is - ld [%o0], %o1 ! active due to pipeline delay!!! + ld [%o0], %o1 std %f0, [%o1 + FO_F1_OFFSET] std %f2, [%o1 + F2_F3_OFFSET] std %f4, [%o1 + F4_F5_OFFSET] @@ -90,17 +80,7 @@ SYM(_CPU_Context_save_fp): .align 4 PUBLIC(_CPU_Context_restore_fp) SYM(_CPU_Context_restore_fp): - /* - * The following enables the floating point unit. - */ - - mov %psr, %o1 - sethi %hi(SPARC_PSR_EF_MASK), %o2 - or %o2, %lo(SPARC_PSR_EF_MASK), %o2 - or %o1, %o2, %o1 - mov %o1, %psr ! **** ENABLE FLOAT ACCESS **** - nop; nop; nop; ! Need three nops before EF is - ld [%o0], %o1 ! active due to pipeline delay!!! + ld [%o0], %o1 ldd [%o1 + FO_F1_OFFSET], %f0 ldd [%o1 + F2_F3_OFFSET], %f2 ldd [%o1 + F4_F5_OFFSET], %f4 |