diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-09-17 11:12:10 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-09-17 11:12:10 +0000 |
commit | f4675ef21fd7d7eec78133165de10ea830ff721c (patch) | |
tree | 0ae09e2c3d10e3dd3e29a5dd54d1f449b9989bef | |
parent | 4c24b770e721b1cabaf0afa4ebc7b58fa41efbc1 (diff) | |
download | FreeBSD-src-f4675ef21fd7d7eec78133165de10ea830ff721c.zip FreeBSD-src-f4675ef21fd7d7eec78133165de10ea830ff721c.tar.gz |
Don't reference cpu_fxsr unless CPU_ENABLE_SSE is defined. This fixes kernel
in !CPU_ENABLE_SSE case.
-rw-r--r-- | sys/amd64/amd64/machdep.c | 10 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index bf2104a..b5dd641 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -2168,7 +2168,10 @@ get_fpcontext(struct thread *td, mcontext_t *mcp) * npxgetregs()'s internals. */ addr = (union savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && cpu_fxsr && + if (td == PCPU_GET(fpcurthread) && +#ifdef CPU_ENABLE_SSE + cpu_fxsr && +#endif ((uintptr_t)(void *)addr & 0xF)) { do addr = (void *)((char *)addr + 4); @@ -2200,7 +2203,10 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp) mcp->mc_ownedfp == _MC_FPOWNED_PCB) { /* XXX align as above. */ addr = (union savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && cpu_fxsr && + if (td == PCPU_GET(fpcurthread) && +#ifdef CPU_ENABLE_SSE + cpu_fxsr && +#endif ((uintptr_t)(void *)addr & 0xF)) { do addr = (void *)((char *)addr + 4); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index bf2104a..b5dd641 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -2168,7 +2168,10 @@ get_fpcontext(struct thread *td, mcontext_t *mcp) * npxgetregs()'s internals. */ addr = (union savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && cpu_fxsr && + if (td == PCPU_GET(fpcurthread) && +#ifdef CPU_ENABLE_SSE + cpu_fxsr && +#endif ((uintptr_t)(void *)addr & 0xF)) { do addr = (void *)((char *)addr + 4); @@ -2200,7 +2203,10 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp) mcp->mc_ownedfp == _MC_FPOWNED_PCB) { /* XXX align as above. */ addr = (union savefpu *)&mcp->mc_fpstate; - if (td == PCPU_GET(fpcurthread) && cpu_fxsr && + if (td == PCPU_GET(fpcurthread) && +#ifdef CPU_ENABLE_SSE + cpu_fxsr && +#endif ((uintptr_t)(void *)addr & 0xF)) { do addr = (void *)((char *)addr + 4); |