Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Apr 2003 03:30:55 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 28221 for review
Message-ID:  <200304051130.h35BUtjw052220@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28221

Change 28221 by peter@peter_overcee on 2003/04/05 03:30:38

	tidy up pcb_e* and a few stragglers of mc_e*

Affected files ...

.. //depot/projects/hammer/sys/x86_64/include/pcb.h#8 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/genassym.c#14 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#12 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#16 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/include/pcb.h#8 (text+ko) ====

@@ -47,12 +47,12 @@
 
 struct pcb {
 	long	pcb_cr3;
-	long	pcb_edi;
-	long	pcb_esi;
-	long	pcb_ebp;
-	long	pcb_esp;
-	long	pcb_ebx;
-	long	pcb_eip;
+	long	pcb_rdi;
+	long	pcb_rsi;
+	long	pcb_rbp;
+	long	pcb_rsp;
+	long	pcb_rbx;
+	long	pcb_rip;
 
 	struct	savefpu	pcb_save;
 	u_long	pcb_flags;

==== //depot/projects/hammer/sys/x86_64/x86_64/genassym.c#14 (text+ko) ====

@@ -114,12 +114,12 @@
 ASSYM(KERNBASE, KERNBASE);
 ASSYM(MCLBYTES, MCLBYTES);
 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
-ASSYM(PCB_EDI, offsetof(struct pcb, pcb_edi));
-ASSYM(PCB_ESI, offsetof(struct pcb, pcb_esi));
-ASSYM(PCB_EBP, offsetof(struct pcb, pcb_ebp));
-ASSYM(PCB_ESP, offsetof(struct pcb, pcb_esp));
-ASSYM(PCB_EBX, offsetof(struct pcb, pcb_ebx));
-ASSYM(PCB_EIP, offsetof(struct pcb, pcb_eip));
+ASSYM(PCB_RDI, offsetof(struct pcb, pcb_rdi));
+ASSYM(PCB_RSI, offsetof(struct pcb, pcb_rsi));
+ASSYM(PCB_RBP, offsetof(struct pcb, pcb_rbp));
+ASSYM(PCB_RSP, offsetof(struct pcb, pcb_rsp));
+ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx));
+ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip));
 
 ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs));
 ASSYM(PCB_PSL, offsetof(struct pcb, pcb_psl));
@@ -134,10 +134,10 @@
 ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
 ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
 ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
-ASSYM(TF_EFLAGS, offsetof(struct trapframe, tf_rflags));
+ASSYM(TF_RFLAGS, offsetof(struct trapframe, tf_rflags));
 ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
 ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc));
-ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_eflags));
+ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_rflags));
 ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs));
 ASSYM(ENOENT, ENOENT);
 ASSYM(EFAULT, EFAULT);

==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#12 (text+ko) ====

@@ -101,12 +101,12 @@
 	movq	TD_PCB(%rcx),%rdx
 
 	movq	(%rsp),%rax			/* Hardware registers */
-	movq	%rax,PCB_EIP(%rdx)
-	movq	%rbx,PCB_EBX(%rdx)
-	movq	%rsp,PCB_ESP(%rdx)
-	movq	%rbp,PCB_EBP(%rdx)
-	movq	%rsi,PCB_ESI(%rdx)
-	movq	%rdi,PCB_EDI(%rdx)
+	movq	%rax,PCB_RIP(%rdx)
+	movq	%rbx,PCB_RBX(%rdx)
+	movq	%rsp,PCB_RSP(%rdx)
+	movq	%rbp,PCB_RBP(%rdx)
+	movq	%rsi,PCB_RSI(%rdx)
+	movq	%rdi,PCB_RDI(%rdx)
 #XXX	movq	%gs,PCB_GS(%rdx)
 	pushfq					/* PSL */
 	popq	PCB_PSL(%rdx)
@@ -151,12 +151,12 @@
 	 * to load up the rest of the next context.
 	 */
 	/* Restore context. */
-	movq	PCB_EBX(%rdx),%rbx
-	movq	PCB_ESP(%rdx),%rsp
-	movq	PCB_EBP(%rdx),%rbp
-	movq	PCB_ESI(%rdx),%rsi
-	movq	PCB_EDI(%rdx),%rdi
-	movq	PCB_EIP(%rdx),%rax
+	movq	PCB_RBX(%rdx),%rbx
+	movq	PCB_RSP(%rdx),%rsp
+	movq	PCB_RBP(%rdx),%rbp
+	movq	PCB_RSI(%rdx),%rsi
+	movq	PCB_RDI(%rdx),%rdi
+	movq	PCB_RIP(%rdx),%rax
 	movq	%rax,(%rsp)
 	pushq	PCB_PSL(%rdx)
 	popfq
@@ -242,16 +242,16 @@
 
 	/* Save caller's return address.  Child won't execute this routine. */
 	movq	(%rsp),%rax
-	movq	%rax,PCB_EIP(%rcx)
+	movq	%rax,PCB_RIP(%rcx)
 
 	movq	%cr3,%rax
 	movq	%rax,PCB_CR3(%rcx)
 
-	movq	%rbx,PCB_EBX(%rcx)
-	movq	%rsp,PCB_ESP(%rcx)
-	movq	%rbp,PCB_EBP(%rcx)
-	movq	%rsi,PCB_ESI(%rcx)
-	movq	%rdi,PCB_EDI(%rcx)
+	movq	%rbx,PCB_RBX(%rcx)
+	movq	%rsp,PCB_RSP(%rcx)
+	movq	%rbp,PCB_RBP(%rcx)
+	movq	%rsi,PCB_RSI(%rcx)
+	movq	%rdi,PCB_RDI(%rcx)
 #XXX	movq	%gs,PCB_GS(%rcx)
 	pushfq
 	popq	PCB_PSL(%rcx)

==== //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#16 (text+ko) ====

@@ -139,12 +139,12 @@
 #else
 	pcb2->pcb_cr3 = vtophys(vmspace_pmap(p2->p_vmspace)->pm_pdir);
 #endif
-	pcb2->pcb_edi = 0;
-	pcb2->pcb_esi = (int)fork_return;	/* fork_trampoline argument */
-	pcb2->pcb_ebp = 0;
-	pcb2->pcb_esp = (long)td2->td_frame - sizeof(void *);
-	pcb2->pcb_ebx = (long)td2;		/* fork_trampoline argument */
-	pcb2->pcb_eip = (long)fork_trampoline;
+	pcb2->pcb_rdi = 0;
+	pcb2->pcb_rsi = (int)fork_return;	/* fork_trampoline argument */
+	pcb2->pcb_rbp = 0;
+	pcb2->pcb_rsp = (long)td2->td_frame - sizeof(void *);
+	pcb2->pcb_rbx = (long)td2;		/* fork_trampoline argument */
+	pcb2->pcb_rip = (long)fork_trampoline;
 	pcb2->pcb_psl = td2->td_frame->tf_rflags & ~PSL_I; /* ints disabled */
 	/*-
 	 * pcb2->pcb_savefpu:	cloned above.
@@ -155,7 +155,7 @@
 
 	/*
 	 * Now, cpu_switch() can schedule the new process.
-	 * pcb_esp is loaded pointing to the cpu_switch() stack frame
+	 * pcb_rsp is loaded pointing to the cpu_switch() stack frame
 	 * containing the return address when exiting cpu_switch.
 	 * This will normally be to fork_trampoline(), which will have
 	 * %ebx loaded with the new proc's pointer.  fork_trampoline()
@@ -180,8 +180,8 @@
 	 * Note that the trap frame follows the args, so the function
 	 * is really called like this:  func(arg, frame);
 	 */
-	td->td_pcb->pcb_esi = (long) func;	/* function */
-	td->td_pcb->pcb_ebx = (long) arg;	/* first arg */
+	td->td_pcb->pcb_rsi = (long) func;	/* function */
+	td->td_pcb->pcb_rbx = (long) arg;	/* first arg */
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304051130.h35BUtjw052220>