mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-27 09:49:46 -07:00
target/hppa: Copy instruction code into fr1 on FPU assist fault
The hardware stores the instruction code in the lower bits of the FP
exception register #1 on FP assist traps.
This fixes the FP exception handler on Linux, as the Linux kernel uses
the value to decide on the correct signal which should be pushed into
userspace (see decode_fpu() in Linux kernel).
Signed-off-by: Helge Deller <deller@gmx.de>
(cherry picked from commit 923976dfe3)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
53a4bf6830
commit
b1ff64ba4e
1 changed files with 4 additions and 0 deletions
|
|
@ -175,6 +175,10 @@ void hppa_cpu_do_interrupt(CPUState *cs)
|
|||
}
|
||||
}
|
||||
env->cr[CR_IIR] = ldl_phys(cs->as, paddr);
|
||||
if (i == EXCP_ASSIST) {
|
||||
/* stuff insn code into bits of FP exception register #1 */
|
||||
env->fr[0] |= (env->cr[CR_IIR] & 0x03ffffff);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue