ia32_reg.c (202919) | ia32_reg.c (208833) |
---|---|
1/*- 2 * Copyright (c) 2005 Peter Wemm 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2005 Peter Wemm 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/amd64/ia32/ia32_reg.c 202919 2010-01-24 12:13:38Z trasz $ | 26 * $FreeBSD: head/sys/amd64/ia32/ia32_reg.c 208833 2010-06-05 15:59:59Z kib $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 202919 2010-01-24 12:13:38Z trasz $"); | 30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 208833 2010-06-05 15:59:59Z kib $"); |
31 32#include "opt_compat.h" 33 34#include <sys/param.h> 35#include <sys/exec.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> 38#include <sys/kernel.h> --- 103 unchanged lines hidden (view full) --- 142 return (0); 143} 144 145int 146fill_fpregs32(struct thread *td, struct fpreg32 *regs) 147{ 148 struct save87 *sv_87 = (struct save87 *)regs; 149 struct env87 *penv_87 = &sv_87->sv_env; | 31 32#include "opt_compat.h" 33 34#include <sys/param.h> 35#include <sys/exec.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> 38#include <sys/kernel.h> --- 103 unchanged lines hidden (view full) --- 142 return (0); 143} 144 145int 146fill_fpregs32(struct thread *td, struct fpreg32 *regs) 147{ 148 struct save87 *sv_87 = (struct save87 *)regs; 149 struct env87 *penv_87 = &sv_87->sv_env; |
150 struct savefpu *sv_fpu = &td->td_pcb->pcb_save; | 150 struct savefpu *sv_fpu = &td->td_pcb->pcb_user_save; |
151 struct envxmm *penv_xmm = &sv_fpu->sv_env; 152 int i; 153 154 bzero(regs, sizeof(*regs)); 155 156 /* FPU control/status */ 157 penv_87->en_cw = penv_xmm->en_cw; 158 penv_87->en_sw = penv_xmm->en_sw; --- 18 unchanged lines hidden (view full) --- 177 return (0); 178} 179 180int 181set_fpregs32(struct thread *td, struct fpreg32 *regs) 182{ 183 struct save87 *sv_87 = (struct save87 *)regs; 184 struct env87 *penv_87 = &sv_87->sv_env; | 151 struct envxmm *penv_xmm = &sv_fpu->sv_env; 152 int i; 153 154 bzero(regs, sizeof(*regs)); 155 156 /* FPU control/status */ 157 penv_87->en_cw = penv_xmm->en_cw; 158 penv_87->en_sw = penv_xmm->en_sw; --- 18 unchanged lines hidden (view full) --- 177 return (0); 178} 179 180int 181set_fpregs32(struct thread *td, struct fpreg32 *regs) 182{ 183 struct save87 *sv_87 = (struct save87 *)regs; 184 struct env87 *penv_87 = &sv_87->sv_env; |
185 struct savefpu *sv_fpu = &td->td_pcb->pcb_save; | 185 struct savefpu *sv_fpu = &td->td_pcb->pcb_user_save; |
186 struct envxmm *penv_xmm = &sv_fpu->sv_env; 187 int i; 188 189 /* FPU control/status */ 190 penv_xmm->en_cw = penv_87->en_cw; 191 penv_xmm->en_sw = penv_87->en_sw; 192 penv_xmm->en_tw = penv_87->en_tw; 193 penv_xmm->en_rip = penv_87->en_fip; --- 37 unchanged lines hidden --- | 186 struct envxmm *penv_xmm = &sv_fpu->sv_env; 187 int i; 188 189 /* FPU control/status */ 190 penv_xmm->en_cw = penv_87->en_cw; 191 penv_xmm->en_sw = penv_87->en_sw; 192 penv_xmm->en_tw = penv_87->en_tw; 193 penv_xmm->en_rip = penv_87->en_fip; --- 37 unchanged lines hidden --- |