Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread/arch/x86_64 Correct and simplify computing th...



details:   https://anonhg.NetBSD.org/src/rev/fe09f8c7dc22
branches:  trunk
changeset: 553701:fe09f8c7dc22
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Oct 20 14:50:18 2003 +0000

description:
Correct and simplify computing the return point; just use PC-relative
addressing.

diffstat:

 lib/libpthread/arch/x86_64/pthread_switch.S |  14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diffs (35 lines):

diff -r c82910647147 -r fe09f8c7dc22 lib/libpthread/arch/x86_64/pthread_switch.S
--- a/lib/libpthread/arch/x86_64/pthread_switch.S       Mon Oct 20 13:53:47 2003 +0000
+++ b/lib/libpthread/arch/x86_64/pthread_switch.S       Mon Oct 20 14:50:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_switch.S,v 1.7 2003/10/19 21:45:03 fvdl Exp $  */
+/*     $NetBSD: pthread_switch.S,v 1.8 2003/10/20 14:50:18 fvdl Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -135,11 +135,7 @@
         * Edit the context so that it continues as if returning from
         * the _setcontext_u below.  
         */
-#ifdef PIC
-       movq    PIC_GOT(pthread__switch_return_point), %r11
-#else
-       leaq    pthread__switch_return_point, %r11
-#endif
+       leaq    pthread__switch_return_point(%rip), %r11
        movq    %r11, UC_RIP(%r14)
        movq    %r14, PT_UC(%r12)
        
@@ -205,11 +201,7 @@
         * Edit the context so that it continues as if returning from
         * the _setcontext_u below.  
         */
-#ifdef PIC
-       movq    PIC_GOT(locked_return_point), %r11
-#else
-       leaq    locked_return_point, %r11
-#endif
+       leaq    locked_return_point(%rip), %r11
        movq    %r11, UC_RIP(%r15)
        movq    %r15, PT_UC(%r12)
        



Home | Main Index | Thread Index | Old Index