From 59a0541c5bc0b4346dcfbab76613f770d6e40d10 Mon Sep 17 00:00:00 2001 From: Daniel Cederman Date: Thu, 12 Jul 2018 09:15:55 +0200 Subject: [PATCH] sparc: Restore npc when returning from the syscall_lazy_fp_switch trap 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 da0ee43889..574cf66176 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: