git: pc64: Replace SMSW/LMSW with MOV CR0
Aaron LI
aly at crater.dragonflybsd.org
Fri Apr 17 19:04:14 PDT 2026
commit 06c58923a69137ab8761ae16b30514e2aa1ced27
Author: Aaron LI <aly at aaronly.me>
Date: Fri Apr 17 12:55:25 2026 +0800
pc64: Replace SMSW/LMSW with MOV CR0
The SMSW and LMSW instructions are deprecated and provided for
compatibility with 80286.
Intel SDM Volume 2 Section 4.3:
> This instruction is provided for compatibility with the Intel 286
> processor; programs and procedures intended to run on IA-32 and Intel
> 64 processors beginning with Intel386 processors should use the MOV
> (control registers) instruction to load the whole CR0 register.
Obtained-from: FreeBSD (commit d706ec297a60775e242168eecbb5160cc692c9a6)
Discussed-with: dillon
Summary of changes:
sys/cpu/x86_64/include/cpufunc.h | 6 ++++++
sys/platform/pc64/x86_64/npx.c | 7 ++++---
2 files changed, 10 insertions(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/06c58923a69137ab8761ae16b30514e2aa1ced27
--
DragonFly BSD source repository
More information about the Commits
mailing list