Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2003 23:05:51 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29672 for review
Message-ID:  <200304250605.h3P65pbf051102@repoman.freebsd.org>

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

Change 29672 by peter@peter_daintree on 2003/04/24 23:05:36

	use movq instead of pushq so as to be insulated from trapframe reodering

Affected files ...

.. //depot/projects/hammer/sys/x86_64/isa/icu_vector.s#9 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/isa/icu_vector.s#9 (text+ko) ====

@@ -24,23 +24,22 @@
 	.text ;								\
 	SUPERALIGN_TEXT ;						\
 IDTVEC(vec_name) ;							\
-	pushq	$0 ;		/* dummy error code */			\
-	pushq	$0 ;		/* dummy trap type */			\
-	pushq	%rax ;							\
-	pushq	%rcx ;							\
-	pushq	%rdx ;							\
-	pushq	%rbx ;							\
-	pushq	%rbp ;							\
-	pushq	%rsi ;							\
-	pushq	%rdi ;							\
-	pushq	%r8 ;							\
-	pushq	%r9 ;							\
-	pushq	%r10 ;							\
-	pushq	%r11 ;							\
-	pushq	%r12 ;							\
-	pushq	%r13 ;							\
-	pushq	%r14 ;							\
-	pushq	%r15 ;							\
+	subq	$TF_RIP,%rsp ;	/* skip dummy tf_err and tf_trapno */	\
+	movq	%rax,TF_RAX(%rsp) ;					\
+	movq	%rcx,TF_RCX(%rsp) ;					\
+	movq	%rdx,TF_RDX(%rsp) ;					\
+	movq	%rbx,TF_RBX(%rsp) ;					\
+	movq	%rbp,TF_RBP(%rsp) ;					\
+	movq	%rsi,TF_RSI(%rsp) ;					\
+	movq	%rdi,TF_RDI(%rsp) ;					\
+	movq	%r8,TF_R8(%rsp) ;					\
+	movq	%r9,TF_R9(%rsp) ;					\
+	movq	%r10,TF_R10(%rsp) ;					\
+	movq	%r11,TF_R11(%rsp) ;					\
+	movq	%r12,TF_R12(%rsp) ;					\
+	movq	%r13,TF_R13(%rsp) ;					\
+	movq	%r14,TF_R14(%rsp) ;					\
+	movq	%r15,TF_R15(%rsp) ;					\
 	FAKE_MCOUNT((12)*4(%rsp)) ;					\
 	call	critical_enter ;					\
 	movq	PCPU(CURTHREAD),%rbx ;					\
@@ -69,23 +68,22 @@
 	.text ;								\
 	SUPERALIGN_TEXT ;						\
 IDTVEC(vec_name) ;							\
-	pushq	$0 ;		/* dummy error code */			\
-	pushq	$0 ;		/* dummy trap type */			\
-	pushq	%rax ;							\
-	pushq	%rcx ;							\
-	pushq	%rdx ;							\
-	pushq	%rbx ;							\
-	pushq	%rbp ;							\
-	pushq	%rsi ;							\
-	pushq	%rdi ;							\
-	pushq	%r8 ;							\
-	pushq	%r9 ;							\
-	pushq	%r10 ;							\
-	pushq	%r11 ;							\
-	pushq	%r12 ;							\
-	pushq	%r13 ;							\
-	pushq	%r14 ;							\
-	pushq	%r15 ;							\
+	subq	$TF_RIP,%rsp ;	/* skip dummy tf_err and tf_trapno */	\
+	movq	%rax,TF_RAX(%rsp) ;					\
+	movq	%rcx,TF_RCX(%rsp) ;					\
+	movq	%rdx,TF_RDX(%rsp) ;					\
+	movq	%rbx,TF_RBX(%rsp) ;					\
+	movq	%rbp,TF_RBP(%rsp) ;					\
+	movq	%rsi,TF_RSI(%rsp) ;					\
+	movq	%rdi,TF_RDI(%rsp) ;					\
+	movq	%r8,TF_R8(%rsp) ;					\
+	movq	%r9,TF_R9(%rsp) ;					\
+	movq	%r10,TF_R10(%rsp) ;					\
+	movq	%r11,TF_R11(%rsp) ;					\
+	movq	%r12,TF_R12(%rsp) ;					\
+	movq	%r13,TF_R13(%rsp) ;					\
+	movq	%r14,TF_R14(%rsp) ;					\
+	movq	%r15,TF_R15(%rsp) ;					\
 	maybe_extra_ipending ;						\
 	movb	imen + IRQ_BYTE(irq_num),%al ;				\
 	orb	$IRQ_BIT(irq_num),%al ;					\



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