Deleted Added
full compact
machdep.c (205409) machdep.c (205642)
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
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.

--- 22 unchanged lines hidden (view full) ---

31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
35 * from: FreeBSD: src/sys/i386/i386/machdep.c,v 1.477 2001/08/27
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
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.

--- 22 unchanged lines hidden (view full) ---

31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
35 * from: FreeBSD: src/sys/i386/i386/machdep.c,v 1.477 2001/08/27
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/machdep.c 205409 2010-03-21 13:09:54Z marius $");
39__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/machdep.c 205642 2010-03-25 14:24:00Z nwhitehorn $");
40
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_kstack_pages.h"
44#include "opt_msgbuf.h"
45
46#include <sys/param.h>
47#include <sys/malloc.h>

--- 916 unchanged lines hidden (view full) ---

964ptrace_clear_single_step(struct thread *td)
965{
966
967 /* TODO; */
968 return (0);
969}
970
971void
40
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_kstack_pages.h"
44#include "opt_msgbuf.h"
45
46#include <sys/param.h>
47#include <sys/malloc.h>

--- 916 unchanged lines hidden (view full) ---

964ptrace_clear_single_step(struct thread *td)
965{
966
967 /* TODO; */
968 return (0);
969}
970
971void
972exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
972exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
973{
974 struct trapframe *tf;
975 struct pcb *pcb;
976 struct proc *p;
977 u_long sp;
978
979 /* XXX no cpu_exec */
980 p = td->td_proc;

--- 6 unchanged lines hidden (view full) ---

987 pcb = td->td_pcb;
988 tf = td->td_frame;
989 sp = rounddown(stack, 16);
990 bzero(pcb, sizeof(*pcb));
991 bzero(tf, sizeof(*tf));
992 tf->tf_out[0] = stack;
993 tf->tf_out[3] = p->p_sysent->sv_psstrings;
994 tf->tf_out[6] = sp - SPOFF - sizeof(struct frame);
973{
974 struct trapframe *tf;
975 struct pcb *pcb;
976 struct proc *p;
977 u_long sp;
978
979 /* XXX no cpu_exec */
980 p = td->td_proc;

--- 6 unchanged lines hidden (view full) ---

987 pcb = td->td_pcb;
988 tf = td->td_frame;
989 sp = rounddown(stack, 16);
990 bzero(pcb, sizeof(*pcb));
991 bzero(tf, sizeof(*tf));
992 tf->tf_out[0] = stack;
993 tf->tf_out[3] = p->p_sysent->sv_psstrings;
994 tf->tf_out[6] = sp - SPOFF - sizeof(struct frame);
995 tf->tf_tnpc = entry + 4;
996 tf->tf_tpc = entry;
995 tf->tf_tnpc = imgp->entry_addr + 4;
996 tf->tf_tpc = imgp->entry_addr;
997 tf->tf_tstate = TSTATE_IE | TSTATE_PEF | TSTATE_MM_TSO;
998
999 td->td_retval[0] = tf->tf_out[0];
1000 td->td_retval[1] = tf->tf_out[1];
1001}
1002
1003int
1004fill_regs(struct thread *td, struct reg *regs)

--- 98 unchanged lines hidden ---
997 tf->tf_tstate = TSTATE_IE | TSTATE_PEF | TSTATE_MM_TSO;
998
999 td->td_retval[0] = tf->tf_out[0];
1000 td->td_retval[1] = tf->tf_out[1];
1001}
1002
1003int
1004fill_regs(struct thread *td, struct reg *regs)

--- 98 unchanged lines hidden ---