machdep.c (122295) | machdep.c (122364) |
---|---|
1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1992 Terrence R. Lambert. 4 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * William Jolitz. --- 25 unchanged lines hidden (view full) --- 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)machdep.c 7.4 (Berkeley) 6/3/91 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1992 Terrence R. Lambert. 4 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * William Jolitz. --- 25 unchanged lines hidden (view full) --- 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)machdep.c 7.4 (Berkeley) 6/3/91 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 122295 2003-11-08 04:37:54Z peter $"); | 42__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 122364 2003-11-09 20:31:04Z marcel $"); |
43 44#include "opt_atalk.h" 45#include "opt_compat.h" 46#include "opt_cpu.h" 47#include "opt_ddb.h" 48#include "opt_inet.h" 49#include "opt_ipx.h" 50#include "opt_isa.h" --- 1385 unchanged lines hidden (view full) --- 1436 set_fpregs_xmm(fpregs, &td->td_pcb->pcb_save); 1437 return (0); 1438} 1439 1440/* 1441 * Get machine context. 1442 */ 1443int | 43 44#include "opt_atalk.h" 45#include "opt_compat.h" 46#include "opt_cpu.h" 47#include "opt_ddb.h" 48#include "opt_inet.h" 49#include "opt_ipx.h" 50#include "opt_isa.h" --- 1385 unchanged lines hidden (view full) --- 1436 set_fpregs_xmm(fpregs, &td->td_pcb->pcb_save); 1437 return (0); 1438} 1439 1440/* 1441 * Get machine context. 1442 */ 1443int |
1444get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret) | 1444get_mcontext(struct thread *td, mcontext_t *mcp, int flags) |
1445{ 1446 struct trapframe *tp; 1447 1448 tp = td->td_frame; 1449 PROC_LOCK(curthread->td_proc); 1450 mcp->mc_onstack = sigonstack(tp->tf_rsp); 1451 PROC_UNLOCK(curthread->td_proc); 1452 mcp->mc_r15 = tp->tf_r15; --- 4 unchanged lines hidden (view full) --- 1457 mcp->mc_r10 = tp->tf_r10; 1458 mcp->mc_r9 = tp->tf_r9; 1459 mcp->mc_r8 = tp->tf_r8; 1460 mcp->mc_rdi = tp->tf_rdi; 1461 mcp->mc_rsi = tp->tf_rsi; 1462 mcp->mc_rbp = tp->tf_rbp; 1463 mcp->mc_rbx = tp->tf_rbx; 1464 mcp->mc_rcx = tp->tf_rcx; | 1445{ 1446 struct trapframe *tp; 1447 1448 tp = td->td_frame; 1449 PROC_LOCK(curthread->td_proc); 1450 mcp->mc_onstack = sigonstack(tp->tf_rsp); 1451 PROC_UNLOCK(curthread->td_proc); 1452 mcp->mc_r15 = tp->tf_r15; --- 4 unchanged lines hidden (view full) --- 1457 mcp->mc_r10 = tp->tf_r10; 1458 mcp->mc_r9 = tp->tf_r9; 1459 mcp->mc_r8 = tp->tf_r8; 1460 mcp->mc_rdi = tp->tf_rdi; 1461 mcp->mc_rsi = tp->tf_rsi; 1462 mcp->mc_rbp = tp->tf_rbp; 1463 mcp->mc_rbx = tp->tf_rbx; 1464 mcp->mc_rcx = tp->tf_rcx; |
1465 if (clear_ret != 0) { | 1465 if (flags & GET_MC_CLEAR_RET) { |
1466 mcp->mc_rax = 0; 1467 mcp->mc_rdx = 0; 1468 } else { 1469 mcp->mc_rax = tp->tf_rax; 1470 mcp->mc_rdx = tp->tf_rdx; 1471 } 1472 mcp->mc_rip = tp->tf_rip; 1473 mcp->mc_cs = tp->tf_cs; --- 172 unchanged lines hidden --- | 1466 mcp->mc_rax = 0; 1467 mcp->mc_rdx = 0; 1468 } else { 1469 mcp->mc_rax = tp->tf_rax; 1470 mcp->mc_rdx = tp->tf_rdx; 1471 } 1472 mcp->mc_rip = tp->tf_rip; 1473 mcp->mc_cs = tp->tf_cs; --- 172 unchanged lines hidden --- |