git: npx: Use 64-bit version FXSAVE64/FXRSTOR64 and XSAVE64/XRSTOR64

Aaron LI aly at
Tue Jul 6 16:34:26 PDT 2021

commit 59661255f6a5aa0d829c5469cc30c77cfbeec3fc
Author: Aaron LI <aly at>
Date:   Mon Jul 5 19:50:51 2021 +0800

    npx: Use 64-bit version FXSAVE64/FXRSTOR64 and XSAVE64/XRSTOR64
    Since DragonFly is 64-bit only, use the 64-bit version
    The new FXSAVE64/FXRSTOR64 version represents FIP/FDP as 64-bit fields
    (union fp_addr.fa_64), while the legacy FXSAVE/FXRSTOR version uses
    split fields: 32-bit offset, 16-bit segment and 16-bit reserved field
    (union fp_addr.fa_32).  The latter implies that the actual addresses are
    truncated to 32 bits which is insufficient in modern programs.
    Improve the inline ASM code a bit to use 'xsave64'/'xrstor64' names.
    The extra 'area' variable is introduced to help avoid dereferencing
    'void *' pointer.
    Referred-to: NetBSD

Summary of changes:
 sys/platform/pc64/x86_64/npx.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list