PERFORCE change 29757 for review
Peter Wemm
peter at FreeBSD.org
Fri Apr 25 18:43:32 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29757
Change 29757 by peter at peter_daintree on 2003/04/25 18:42:41
murder the toxic PIC_PROLOGUE/PIC_EPILOGUE crud. There's still
a bit more #ifdef PIC stuff left that I have to check out and
convert/cleanup.
Affected files ...
.. //depot/projects/hammer/lib/libc/x86_64/gen/rfork_thread.S#2 edit
.. //depot/projects/hammer/lib/libc/x86_64/gen/setjmp.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/gen/sigsetjmp.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/Ovfork.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/brk.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/cerror.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/exect.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/ptrace.S#2 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/sbrk.S#3 edit
.. //depot/projects/hammer/lib/libc/x86_64/sys/setlogin.S#2 edit
Differences ...
==== //depot/projects/hammer/lib/libc/x86_64/gen/rfork_thread.S#2 (text+ko) ====
@@ -109,5 +109,4 @@
* Branch here if the thread creation fails:
*/
2:
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror))
==== //depot/projects/hammer/lib/libc/x86_64/gen/setjmp.S#3 (text+ko) ====
@@ -55,12 +55,10 @@
ENTRY(setjmp)
pushq %rdi
movq %rdi,%rcx
- PIC_PROLOGUE
leaq 72(%rcx),%rdi /* (sigset_t*)oset */
movq $0,%rsi /* (sigset_t*)set */
movq $1,%rdx /* SIG_BLOCK */
call PIC_PLT(CNAME(_sigprocmask))
- PIC_EPILOGUE
popq %rdi
movq %rdi,%rcx
movq 0(%rsp),%rdx /* retval */
@@ -82,12 +80,10 @@
pushq %rdi
pushq %rsi
movq %rdi,%rdx
- PIC_PROLOGUE
movq $0,%rdi /* (sigset_t*)oset */
leaq 72(%rdx),%rsi /* (sigset_t*)set */
movq $3,%rdx /* SIG_SETMASK */
call PIC_PLT(CNAME(_sigprocmask))
- PIC_EPILOGUE
popq %rsi
popq %rdi /* jmpbuf */
movq %rdi,%rdx
==== //depot/projects/hammer/lib/libc/x86_64/gen/sigsetjmp.S#3 (text+ko) ====
@@ -63,12 +63,10 @@
movl %esi,88(%rcx)
testl %esi,%esi
jz 2f
- PIC_PROLOGUE
leaq 72(%rcx),%rdi /* (sigset_t*)oset */
movq $0,%rsi /* (sigset_t*)set */
movq $1,%rdx /* SIG_BLOCK */
call PIC_PLT(CNAME(_sigprocmask))
- PIC_EPILOGUE
popq %rdi
movq %rdi,%rcx
2: movq 0(%rsp),%rdx /* retval */
@@ -92,12 +90,10 @@
movq %rdi,%rdx
pushq %rdi
pushq %rsi
- PIC_PROLOGUE
movq $0,%rdi /* (sigset_t*)oset */
leaq 72(%rdx),%rsi /* (sigset_t*)set */
movq $3,%rdx /* SIG_SETMASK */
call PIC_PLT(CNAME(_sigprocmask))
- PIC_EPILOGUE
popq %rsi
popq %rdi /* jmpbuf */
2: movq %rdi,%rdx
==== //depot/projects/hammer/lib/libc/x86_64/sys/Ovfork.S#3 (text+ko) ====
@@ -54,5 +54,4 @@
jmp *%rcx
1:
pushq %rcx
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror))
==== //depot/projects/hammer/lib/libc/x86_64/sys/brk.S#3 (text+ko) ====
@@ -51,10 +51,8 @@
ENTRY(brk)
#ifdef PIC
movl 4(%esp),%eax
- PIC_PROLOGUE
movl PIC_GOT(HIDENAME(curbrk)),%edx # set up GOT addressing
movl PIC_GOT(HIDENAME(minbrk)),%ecx #
- PIC_EPILOGUE
cmpl %eax,(%ecx)
jbe ok
movl (%ecx),%eax
@@ -68,7 +66,6 @@
movl $0,%eax
ret
err:
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror))
#else
==== //depot/projects/hammer/lib/libc/x86_64/sys/cerror.S#3 (text+ko) ====
@@ -53,15 +53,8 @@
.type CNAME(__error), at function
HIDENAME(cerror):
pushq %rax
-#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
call PIC_PLT(CNAME(__error))
popq %rcx
- PIC_EPILOGUE
-#else
- call CNAME(__error)
- popq %rcx
-#endif
movq %rcx,(%rax)
movq $-1,%rax
movq $-1,%rdx
==== //depot/projects/hammer/lib/libc/x86_64/sys/exect.S#3 (text+ko) ====
@@ -51,5 +51,4 @@
pushq %rdx
popfq
KERNCALL
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */
==== //depot/projects/hammer/lib/libc/x86_64/sys/ptrace.S#2 (text+ko) ====
@@ -45,10 +45,8 @@
ENTRY(ptrace)
xorl %eax,%eax
#ifdef PIC
- PIC_PROLOGUE
movl PIC_GOT(CNAME(errno)),%edx
movl %eax,(%edx)
- PIC_EPILOGUE
#else
movl %eax,CNAME(errno)
#endif
@@ -57,5 +55,4 @@
jb err
ret
err:
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror))
==== //depot/projects/hammer/lib/libc/x86_64/sys/sbrk.S#3 (text+ko) ====
@@ -54,25 +54,20 @@
ENTRY(sbrk)
#ifdef PIC
movl 4(%esp),%ecx
- PIC_PROLOGUE
movl PIC_GOT(HIDENAME(curbrk)),%edx
movl (%edx),%eax
- PIC_EPILOGUE
testl %ecx,%ecx
jz back
addl %eax,4(%esp)
mov $SYS_break,%eax
KERNCALL
jb err
- PIC_PROLOGUE
movl PIC_GOT(HIDENAME(curbrk)),%edx
movl (%edx),%eax
addl %ecx,(%edx)
- PIC_EPILOGUE
back:
ret
err:
- PIC_PROLOGUE
jmp PIC_PLT(HIDENAME(cerror))
#else /* !PIC */
==== //depot/projects/hammer/lib/libc/x86_64/sys/setlogin.S#2 (text+ko) ====
@@ -46,12 +46,10 @@
SYSCALL(setlogin)
#ifdef PIC
- PIC_PROLOGUE
pushl %eax
movl PIC_GOT(CNAME(_logname_valid)),%eax
movl $0,(%eax)
popl %eax
- PIC_EPILOGUE
#else
movl $0,CNAME(_logname_valid)
#endif
More information about the p4-projects
mailing list