After setcontext() or sigreturn the AltiVec and VSX registers stay in
the PCB until the thread touches them again, and only PCB_VECREGS and
PCB_FPREGS say they're valid. The NT_PPC_VMX and NT_PPC_VSX core notes
are only written when PCB_VEC and PCB_VSX are set, so a core dumped in
that window has no vector registers for the thread. Check the validity
flags instead, like get_mcontext() does.
PCB_FPREGS is also set on CPUs without VSX, so only write the VSX note
when the CPU has it.