ia32_reg.c (c0d73b99f2247ef89b2c619d990b2bfd0cfb5903) ia32_reg.c (6cf9a08d2c338e25f0be42326e6880f089156562)
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

--- 133 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;
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

--- 133 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 ---