The per-cpu temporary buffers are not needed since the pcb_save areas have
the proper alignment. Change dummy variable in npxinit from stack to bss to ensure proper alignment. Reviewed by: bde
This commit is contained in:
parent
9f81cc840b
commit
e55bc0a096
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79824
@ -564,7 +564,7 @@ void
|
|||||||
npxinit(control)
|
npxinit(control)
|
||||||
u_short control;
|
u_short control;
|
||||||
{
|
{
|
||||||
union savefpu dummy;
|
static union savefpu dummy;
|
||||||
critical_t savecrit;
|
critical_t savecrit;
|
||||||
|
|
||||||
if (!npx_exists)
|
if (!npx_exists)
|
||||||
@ -926,30 +926,21 @@ static void
|
|||||||
fpusave(addr)
|
fpusave(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
fnsave(addr);
|
fnsave(addr);
|
||||||
else {
|
else
|
||||||
fxsave(&svxmm[oncpu]);
|
fxsave(addr);
|
||||||
bcopy(&svxmm[oncpu], addr, sizeof(struct savexmm));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpurstor(addr)
|
fpurstor(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
frstor(addr);
|
frstor(addr);
|
||||||
else {
|
else
|
||||||
bcopy(addr, &svxmm[oncpu], sizeof (struct savexmm));
|
fxrstor(addr);
|
||||||
fxrstor(&svxmm[oncpu]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef I586_CPU_XXX
|
#ifdef I586_CPU_XXX
|
||||||
|
@ -564,7 +564,7 @@ void
|
|||||||
npxinit(control)
|
npxinit(control)
|
||||||
u_short control;
|
u_short control;
|
||||||
{
|
{
|
||||||
union savefpu dummy;
|
static union savefpu dummy;
|
||||||
critical_t savecrit;
|
critical_t savecrit;
|
||||||
|
|
||||||
if (!npx_exists)
|
if (!npx_exists)
|
||||||
@ -926,30 +926,21 @@ static void
|
|||||||
fpusave(addr)
|
fpusave(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
fnsave(addr);
|
fnsave(addr);
|
||||||
else {
|
else
|
||||||
fxsave(&svxmm[oncpu]);
|
fxsave(addr);
|
||||||
bcopy(&svxmm[oncpu], addr, sizeof(struct savexmm));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpurstor(addr)
|
fpurstor(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
frstor(addr);
|
frstor(addr);
|
||||||
else {
|
else
|
||||||
bcopy(addr, &svxmm[oncpu], sizeof (struct savexmm));
|
fxrstor(addr);
|
||||||
fxrstor(&svxmm[oncpu]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef I586_CPU_XXX
|
#ifdef I586_CPU_XXX
|
||||||
|
@ -564,7 +564,7 @@ void
|
|||||||
npxinit(control)
|
npxinit(control)
|
||||||
u_short control;
|
u_short control;
|
||||||
{
|
{
|
||||||
union savefpu dummy;
|
static union savefpu dummy;
|
||||||
critical_t savecrit;
|
critical_t savecrit;
|
||||||
|
|
||||||
if (!npx_exists)
|
if (!npx_exists)
|
||||||
@ -926,30 +926,21 @@ static void
|
|||||||
fpusave(addr)
|
fpusave(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
fnsave(addr);
|
fnsave(addr);
|
||||||
else {
|
else
|
||||||
fxsave(&svxmm[oncpu]);
|
fxsave(addr);
|
||||||
bcopy(&svxmm[oncpu], addr, sizeof(struct savexmm));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpurstor(addr)
|
fpurstor(addr)
|
||||||
union savefpu *addr;
|
union savefpu *addr;
|
||||||
{
|
{
|
||||||
static struct savexmm svxmm[MAXCPU];
|
|
||||||
u_char oncpu = PCPU_GET(cpuid);
|
|
||||||
|
|
||||||
if (!cpu_fxsr)
|
if (!cpu_fxsr)
|
||||||
frstor(addr);
|
frstor(addr);
|
||||||
else {
|
else
|
||||||
bcopy(addr, &svxmm[oncpu], sizeof (struct savexmm));
|
fxrstor(addr);
|
||||||
fxrstor(&svxmm[oncpu]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef I586_CPU_XXX
|
#ifdef I586_CPU_XXX
|
||||||
|
Loading…
Reference in New Issue
Block a user