Page MenuHomeFreeBSD

[PowerPC64LE] Fix LE VSX/fpr interop
ClosedPublic

Authored by bdragon on Dec 1 2020, 1:11 AM.
Referenced Files
F167421217: D27431.id.diff
Fri, Aug 21, 3:46 PM
F167343568: D27431.id.diff
Fri, Aug 21, 2:39 AM
Unknown Object (File)
Wed, Aug 19, 4:54 AM
Unknown Object (File)
Tue, Aug 18, 8:16 PM
Unknown Object (File)
Mon, Aug 17, 9:54 AM
Unknown Object (File)
Thu, Aug 13, 1:49 PM
Unknown Object (File)
Wed, Aug 12, 1:01 PM
Unknown Object (File)
Mon, Aug 10, 2:07 AM
Subscribers

Details

Summary

In the PCB struct, we need to match the VSX register file layout correctly, as the VSRs shadow the FPRs.

In LE, we need to have a dword of padding before the fprs so they end up on the correct side, as the struct may be manipulated by either the FP routines or the VSX routines.

Additionally, when saving and restoring fprs, we need to explicitly target the fpr union member so it gets offset correctly on LE.

Fixes weirdness with FP registers in VSX-using programs (A fpr that was saved by the FP routines but restored by the VSX routines was becoming 0 due to being loaded to the wrong side of the vsr.)

Original patch by jhibbits.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable