[PATCH] sparc: Restore npc when returning from the syscall_lazy_fp_switch trap
Daniel Hellstrom
daniel at gaisler.com
Fri Aug 24 13:32:40 UTC 2018
From: Daniel Cederman <cederman at gaisler.com>
If the floating point trap occurred in a delay slot it is not certain
that npc will be equal to pc + 4.
---
cpukit/score/cpu/sparc/syscall.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/score/cpu/sparc/syscall.S b/cpukit/score/cpu/sparc/syscall.S
index da0ee43..574cf66 100644
--- a/cpukit/score/cpu/sparc/syscall.S
+++ b/cpukit/score/cpu/sparc/syscall.S
@@ -245,7 +245,7 @@ SYM(syscall_lazy_fp_switch):
/* Now, retry the floating point instruction with PSR[EF] == 1 */
jmp %l1
- rett %l1 + 4
+ rett %l2
.Lillegal_use_of_floating_point_unit:
--
2.7.4
More information about the devel
mailing list