Previously, the FP CPU context was not preserved when delivering
a signal to Linux processes on amd64. This could cause random
segfaults, especially so since GCC started stashing integer
registers into FPU instead of spilling them to stack.
This is mostly copy/pasted from amd64/exec_machdep.c, and uses
native FreeBSD mcontext instead of trying to stash the FP state
into Linux-specific structures. This is much simpler, and I
don't know of userspace code that would try to access it.
This fixes random crashes when running Minecraft server 1.15.1
under Focal (openjdk-14-jdk:amd64 14.0.2+12-1~20.04).
Sponsored By: EPSRC