From 4009fd862af8be5f1475cc3c5b9b96d4719a32ff Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 27 Sep 2001 21:17:26 +0000 Subject: 2001-09-27 Jiri Gaisler * cpu_asm.S: Small patch to fix a bug in the rtems sparc port. The bug has been there all the time, but only hits the leon bsp since the leon cpu has a 5-stage pipeline (erc32 has 4 stages). --- c/src/exec/score/cpu/sparc/cpu_asm.S | 8 ++++---- cpukit/score/cpu/sparc/cpu_asm.S | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/c/src/exec/score/cpu/sparc/cpu_asm.S b/c/src/exec/score/cpu/sparc/cpu_asm.S index 9e186a0bb9..b5ef4ebf69 100644 --- a/c/src/exec/score/cpu/sparc/cpu_asm.S +++ b/c/src/exec/score/cpu/sparc/cpu_asm.S @@ -52,8 +52,8 @@ SYM(_CPU_Context_save_fp): or %l1, %lo(SPARC_PSR_EF_MASK), %l1 or %l0, %l1, %l0 mov %l0, %psr ! **** ENABLE FLOAT ACCESS **** - - ld [%i0], %l0 + nop; nop; nop; ! Need three nops before EF is + ld [%i0], %l0 ! active due to pipeline delay!!! std %f0, [%l0 + FO_F1_OFFSET] std %f2, [%l0 + F2_F3_OFFSET] std %f4, [%l0 + F4_F5_OFFSET] @@ -101,8 +101,8 @@ SYM(_CPU_Context_restore_fp): or %l1, %lo(SPARC_PSR_EF_MASK), %l1 or %l0, %l1, %l0 mov %l0, %psr ! **** ENABLE FLOAT ACCESS **** - - ld [%i0], %l0 + nop; nop; nop; ! Need three nops before EF is + ld [%i0], %l0 ! active due to pipeline delay!!! ldd [%l0 + FO_F1_OFFSET], %f0 ldd [%l0 + F2_F3_OFFSET], %f2 ldd [%l0 + F4_F5_OFFSET], %f4 diff --git a/cpukit/score/cpu/sparc/cpu_asm.S b/cpukit/score/cpu/sparc/cpu_asm.S index 9e186a0bb9..b5ef4ebf69 100644 --- a/cpukit/score/cpu/sparc/cpu_asm.S +++ b/cpukit/score/cpu/sparc/cpu_asm.S @@ -52,8 +52,8 @@ SYM(_CPU_Context_save_fp): or %l1, %lo(SPARC_PSR_EF_MASK), %l1 or %l0, %l1, %l0 mov %l0, %psr ! **** ENABLE FLOAT ACCESS **** - - ld [%i0], %l0 + nop; nop; nop; ! Need three nops before EF is + ld [%i0], %l0 ! active due to pipeline delay!!! std %f0, [%l0 + FO_F1_OFFSET] std %f2, [%l0 + F2_F3_OFFSET] std %f4, [%l0 + F4_F5_OFFSET] @@ -101,8 +101,8 @@ SYM(_CPU_Context_restore_fp): or %l1, %lo(SPARC_PSR_EF_MASK), %l1 or %l0, %l1, %l0 mov %l0, %psr ! **** ENABLE FLOAT ACCESS **** - - ld [%i0], %l0 + nop; nop; nop; ! Need three nops before EF is + ld [%i0], %l0 ! active due to pipeline delay!!! ldd [%l0 + FO_F1_OFFSET], %f0 ldd [%l0 + F2_F3_OFFSET], %f2 ldd [%l0 + F4_F5_OFFSET], %f4 -- cgit v1.2.3