Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/arch/m68k
Module Name: src
Committed By: thorpej
Date: Sat Oct 31 20:14:20 UTC 2026
Modified Files:
src/sys/arch/m68k/fpe: fpu_emulate.c
src/sys/arch/m68k/m68k: fpu.c sig_machdep.c
Log Message:
Fix cpu_{get,set}mcontext() vis a vis FP state in the presence of
FPU_NONE+FPU_EMULATE. Previously, the emulated 68881 registers,
which are present in the PCB, were completely ignored becaue fputype
is FPU_NONE in that case.
This fix entails a few things:
- In fpu_emulate(), when we've reached the point where we know an
FPU instruction is going to be performed, set the PCB's copy of
the FP frame to indicate an "idle" state. This sets the stage
for normal FPU handling code to use the saved emulator state
just as it would with a real FPU.
- In fpu_init(), if we set FPU_NONE, also initialize m68k_cached_fpu_idle_frame
to mimic an idle 68881 idle frame so that the _UC_FPU+_UC_M68K_UC_USER
case in cpu_setmcontext() works correctly.
- In cpu_{get,set}mcontext(), always use the saved FP registers in the
PCB, and only interact with the FPU if fputype != FPU_NONE and curlwp.
While here, simplify the construction of the FPFRAME_IS_NULL() expression.
Problem reported by Romain Dolbeau on port-m68k.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/fpe/fpu_emulate.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/fpu.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/m68k/m68k/sig_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index