mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
alpha: Use cfi_startproc instead of dual procedure descriptors
This commit is contained in:
parent
a683563255
commit
b2afe910fb
@ -1,5 +1,14 @@
|
||||
2012-06-06 Richard Henderson <rth@twiddle.net>
|
||||
|
||||
* sysdeps/alpha/alphaev6/stxcpy.S: Use cfi markup instead of
|
||||
dual ecoff procedure descriptors.
|
||||
* sysdeps/alpha/alphaev6/stxncpy.S: Likewise.
|
||||
* sysdeps/alpha/bzero.S: Likewise.
|
||||
* sysdeps/alpha/memset.S: Likewise.
|
||||
* sysdeps/alpha/stxcpy.S: Likewise.
|
||||
* sysdeps/alpha/stxncpy.S: Likewise.
|
||||
* sysdeps/unix/alpha/sysdep.h (USEPV_PROF): New.
|
||||
|
||||
* sysdeps/alpha/_mcount.S: Move .prologue after stack alloc.
|
||||
|
||||
2012-06-05 Richard Henderson <rth@twiddle.net>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
|
||||
This file is part of the GNU C Library.
|
||||
@ -41,24 +41,20 @@
|
||||
.arch ev6
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
.type __stxcpy, @function
|
||||
.globl __stxcpy
|
||||
.usepv __stxcpy, no
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the
|
||||
aligned copy in its own procedure descriptor */
|
||||
|
||||
|
||||
.ent stxcpy_aligned
|
||||
.align 4
|
||||
stxcpy_aligned:
|
||||
.frame sp, 0, t9
|
||||
.prologue 0
|
||||
cfi_startproc
|
||||
cfi_return_column (t9)
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == the first source word. */
|
||||
|
||||
.align 4
|
||||
stxcpy_aligned:
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
lda t2, -1 # E : build a mask against false zero
|
||||
mskqh t2, a1, t2 # U : detection in the src word (stall)
|
||||
@ -115,15 +111,8 @@ $a_eos:
|
||||
nop
|
||||
nop
|
||||
|
||||
.end stxcpy_aligned
|
||||
|
||||
.align 4
|
||||
.ent __stxcpy
|
||||
.globl __stxcpy
|
||||
__stxcpy:
|
||||
.frame sp, 0, t9
|
||||
.prologue 0
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t0 # E :
|
||||
unop # E :
|
||||
@ -321,7 +310,5 @@ $unaligned:
|
||||
or t0, t1, t1 # e1 : and put it there
|
||||
stq_u t1, 0(a0) # .. e0 : (stall)
|
||||
ret (t9) # e1 :
|
||||
nop
|
||||
|
||||
.end __stxcpy
|
||||
|
||||
cfi_endproc
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
|
||||
This file is part of the GNU C Library.
|
||||
@ -49,22 +49,19 @@
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the
|
||||
aligned copy in its own procedure descriptor */
|
||||
.text
|
||||
.type __stxncpy, @function
|
||||
.globl __stxncpy
|
||||
.usepv __stxncpy, no
|
||||
|
||||
|
||||
.ent stxncpy_aligned
|
||||
.align 4
|
||||
stxncpy_aligned:
|
||||
.frame sp, 0, t9, 0
|
||||
.prologue 0
|
||||
cfi_startproc
|
||||
cfi_return_column (t9)
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == the first source word. */
|
||||
|
||||
.align 4
|
||||
stxncpy_aligned:
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
lda t2, -1 # E : build a mask against false zero
|
||||
mskqh t2, a1, t2 # U : detection in the src word (stall)
|
||||
@ -111,7 +108,6 @@ $a_loop:
|
||||
On entry to this basic block we have:
|
||||
t0 == the source word containing the null
|
||||
t7 == the cmpbge mask that found it. */
|
||||
|
||||
$a_eos:
|
||||
negq t7, t8 # E : find low bit set
|
||||
and t7, t8, t8 # E : (stall)
|
||||
@ -144,15 +140,8 @@ $a_eoc:
|
||||
nop
|
||||
nop
|
||||
|
||||
.end stxncpy_aligned
|
||||
|
||||
.align 4
|
||||
.ent __stxncpy
|
||||
.globl __stxncpy
|
||||
__stxncpy:
|
||||
.frame sp, 0, t9, 0
|
||||
.prologue 0
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t1 # E :
|
||||
and a0, 7, t0 # E : find dest misalignment
|
||||
@ -166,16 +155,14 @@ __stxncpy:
|
||||
|
||||
sll t10, t2, t10 # U : t10 = bitmask of last count byte
|
||||
bne t1, $unaligned # U :
|
||||
|
||||
/* We are co-aligned; take care of a partial first word. */
|
||||
ldq_u t1, 0(a1) # L : load first src word
|
||||
addq a1, 8, a1 # E :
|
||||
|
||||
beq t0, stxncpy_aligned # U : avoid loading dest word if not needed
|
||||
beq t0, stxncpy_aligned # U : avoid loading dest word if not needed
|
||||
ldq_u t0, 0(a0) # L :
|
||||
nop
|
||||
nop
|
||||
|
||||
br stxncpy_aligned # .. e1 :
|
||||
br stxncpy_aligned # U :
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@ -231,7 +218,7 @@ $u_head:
|
||||
|
||||
extqh t2, a1, t0 # U : position lo-bits of hi word (stall)
|
||||
cmpbge zero, t2, t7 # E :
|
||||
nop
|
||||
nop
|
||||
bne t7, $u_eos # U :
|
||||
|
||||
/* Unaligned copy main loop. In order to avoid reading too much,
|
||||
@ -314,7 +301,7 @@ $u_final:
|
||||
1: stq_u t0, 0(a0) # L :
|
||||
ret (t9) # L0 : Latency=3
|
||||
|
||||
/* Got to end-of-count before end of string.
|
||||
/* Got to end-of-count before end of string.
|
||||
On entry to this basic block:
|
||||
t1 == the shifted high-order bits from the previous source word */
|
||||
$u_eoc:
|
||||
@ -325,7 +312,7 @@ $u_eoc:
|
||||
|
||||
ldq_u t2, 8(a1) # L : load final src word
|
||||
nop
|
||||
extqh t2, a1, t0 # U : extract low bits for last word (stall)
|
||||
extqh t2, a1, t0 # U : extract low bits for last word (stall)
|
||||
or t1, t0, t1 # E : (stall)
|
||||
|
||||
1: cmpbge zero, t1, t7 # E :
|
||||
@ -394,9 +381,5 @@ $unaligned:
|
||||
stq_u t0, 0(a0) # L : (stall)
|
||||
|
||||
ret (t9) # L0 : Latency=3
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
.end __stxncpy
|
||||
|
||||
cfi_endproc
|
||||
|
@ -36,23 +36,19 @@
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
.type __bzero, @function
|
||||
.globl __bzero
|
||||
.usepv __bzero, USEPV_PROF
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the main
|
||||
loop in its own procedure descriptor. */
|
||||
cfi_startproc
|
||||
|
||||
/* On entry to this basic block:
|
||||
t3 == loop counter
|
||||
t4 == bytes in partial final word
|
||||
a0 == possibly misaligned destination pointer */
|
||||
|
||||
.ent bzero_loop
|
||||
.align 3
|
||||
bzero_loop:
|
||||
.frame sp, 0, ra, 0
|
||||
.prologue 0
|
||||
|
||||
beq t3, $tail #
|
||||
blbc t3, 0f # skip single store if count even
|
||||
|
||||
@ -75,16 +71,11 @@ $tail: bne t4, 1f # is there a tail to do?
|
||||
stq_u t0, 0(a0) #
|
||||
ret #
|
||||
|
||||
.end bzero_loop
|
||||
|
||||
ENTRY(__bzero)
|
||||
__bzero:
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
#endif
|
||||
|
||||
mov a0, v0 # e0 : move return value in place
|
||||
@ -115,5 +106,5 @@ $oneq:
|
||||
|
||||
$done: ret
|
||||
|
||||
END(__bzero)
|
||||
cfi_endproc
|
||||
weak_alias (__bzero, bzero)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -37,11 +37,11 @@
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
.type memset, @function
|
||||
.globl memset
|
||||
.usepv memset, USEPV_PROF
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the main
|
||||
loop in its own procedure descriptor. */
|
||||
cfi_startproc
|
||||
|
||||
/* On entry to this basic block:
|
||||
t3 == loop counter
|
||||
@ -49,12 +49,8 @@
|
||||
a0 == possibly misaligned destination pointer
|
||||
a1 == replicated source character */
|
||||
|
||||
.ent memset_loop
|
||||
.align 3
|
||||
memset_loop:
|
||||
.frame sp, 0, ra, 0
|
||||
.prologue 0
|
||||
|
||||
beq t3, $tail
|
||||
blbc t3, 0f # skip single store if count even
|
||||
|
||||
@ -80,19 +76,14 @@ $tail: bne t4, 1f # is there a tail to do?
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
.end memset_loop
|
||||
|
||||
ENTRY(memset)
|
||||
memset:
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
lda AT, _mcount
|
||||
jsr AT, (AT), _mcount
|
||||
.prologue 1
|
||||
#else
|
||||
.prologue 0
|
||||
#endif
|
||||
|
||||
zapnot a1, 1, a1 # e0 : zero extend input character
|
||||
and a1, 0xff, a1 # e0 : zero extend input character
|
||||
mov a0, v0 # .. e1 : move return value in place
|
||||
sll a1, 8, t0 # e0 : begin replicating the char
|
||||
beq a2, $done # .. e1 : early exit for zero-length store
|
||||
@ -132,5 +123,5 @@ $oneq:
|
||||
|
||||
$done: ret
|
||||
|
||||
END(memset)
|
||||
cfi_endproc
|
||||
libc_hidden_builtin_def (memset)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -43,22 +43,18 @@
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
.type __stxcpy, @function
|
||||
.globl __stxcpy
|
||||
.usepv __stxcpy, no
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the
|
||||
aligned copy in its own procedure descriptor */
|
||||
|
||||
.ent stxcpy_aligned
|
||||
.align 3
|
||||
stxcpy_aligned:
|
||||
.frame sp, 0, t9
|
||||
.prologue 0
|
||||
cfi_startproc
|
||||
cfi_return_column (t9)
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == the first source word. */
|
||||
|
||||
.align 3
|
||||
stxcpy_aligned:
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
lda t2, -1 # e1 : build a mask against false zero
|
||||
mskqh t2, a1, t2 # e0 : detection in the src word
|
||||
@ -72,7 +68,6 @@ stxcpy_aligned:
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == a source word not containing a null. */
|
||||
|
||||
$a_loop:
|
||||
stq_u t1, 0(a0) # e0 :
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
@ -106,15 +101,8 @@ $a_eos:
|
||||
1: stq_u t1, 0(a0) # e0 :
|
||||
ret (t9) # .. e1 :
|
||||
|
||||
.end stxcpy_aligned
|
||||
|
||||
.align 3
|
||||
.ent __stxcpy
|
||||
.globl __stxcpy
|
||||
__stxcpy:
|
||||
.frame sp, 0, t9
|
||||
.prologue 0
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t0 # e0 :
|
||||
unop # :
|
||||
@ -303,4 +291,4 @@ $unaligned:
|
||||
stq_u t1, 0(a0) # .. e0 :
|
||||
ret (t9)
|
||||
|
||||
.end __stxcpy
|
||||
cfi_endproc
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson (rth@tamu.edu)
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -52,22 +52,18 @@
|
||||
.set noreorder
|
||||
|
||||
.text
|
||||
.type __stxncpy, @function
|
||||
.globl __stxncpy
|
||||
.usepv __stxncpy, no
|
||||
|
||||
/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
|
||||
doesn't like putting the entry point for a procedure somewhere in the
|
||||
middle of the procedure descriptor. Work around this by putting the
|
||||
aligned copy in its own procedure descriptor */
|
||||
|
||||
.ent stxncpy_aligned
|
||||
.align 3
|
||||
stxncpy_aligned:
|
||||
.frame sp, 0, t9, 0
|
||||
.prologue 0
|
||||
cfi_startproc
|
||||
cfi_return_column (t9)
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == the first destination word for masking back in
|
||||
t1 == the first source word. */
|
||||
|
||||
.align 3
|
||||
stxncpy_aligned:
|
||||
/* Create the 1st output word and detect 0's in the 1st input word. */
|
||||
lda t2, -1 # e1 : build a mask against false zero
|
||||
mskqh t2, a1, t2 # e0 : detection in the src word
|
||||
@ -81,7 +77,6 @@ stxncpy_aligned:
|
||||
|
||||
/* On entry to this basic block:
|
||||
t0 == a source word not containing a null. */
|
||||
|
||||
$a_loop:
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
addq a0, 8, a0 # .. e1 :
|
||||
@ -98,7 +93,6 @@ $a_loop:
|
||||
On entry to this basic block we have:
|
||||
t0 == the source word containing the null
|
||||
t7 == the cmpbge mask that found it. */
|
||||
|
||||
$a_eos:
|
||||
negq t7, t8 # e0 : find low bit set
|
||||
and t7, t8, t8 # e1 (stall)
|
||||
@ -126,15 +120,8 @@ $a_eoc:
|
||||
or t10, t7, t7
|
||||
br $a_eos
|
||||
|
||||
.end stxncpy_aligned
|
||||
|
||||
.align 3
|
||||
.ent __stxncpy
|
||||
.globl __stxncpy
|
||||
__stxncpy:
|
||||
.frame sp, 0, t9, 0
|
||||
.prologue 0
|
||||
|
||||
/* Are source and destination co-aligned? */
|
||||
xor a0, a1, t1 # e0 :
|
||||
and a0, 7, t0 # .. e1 : find dest misalignment
|
||||
@ -359,4 +346,4 @@ $unaligned:
|
||||
stq_u t0, 0(a0) # e0 :
|
||||
ret (t9) # .. e1 :
|
||||
|
||||
.end __stxncpy
|
||||
cfi_endproc
|
||||
|
@ -71,6 +71,12 @@
|
||||
.prologue 1
|
||||
#endif /* PROF */
|
||||
|
||||
#ifdef PROF
|
||||
# define USEPV_PROF std
|
||||
#else
|
||||
# define USEPV_PROF no
|
||||
#endif
|
||||
|
||||
#if RTLD_PRIVATE_ERRNO
|
||||
# define SYSCALL_ERROR_LABEL $syscall_error
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
|
Loading…
Reference in New Issue
Block a user