]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
alpha: Use cfi_startproc instead of dual procedure descriptors
authorRichard Henderson <rth@twiddle.net>
Wed, 6 Jun 2012 21:35:00 +0000 (14:35 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 6 Jun 2012 21:35:00 +0000 (14:35 -0700)
ChangeLog.alpha
sysdeps/alpha/alphaev6/stxcpy.S
sysdeps/alpha/alphaev6/stxncpy.S
sysdeps/alpha/bzero.S
sysdeps/alpha/memset.S
sysdeps/alpha/stxcpy.S
sysdeps/alpha/stxncpy.S
sysdeps/unix/alpha/sysdep.h

index 2c107ad9314c021444a23bb272740e154f4088d4..ceee910c3c7ecbb04141db244c2868812a96b0a5 100644 (file)
@@ -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>
index 37ad737ba8febc5cdf95861b2753f49f0390efa7..bdc8e72eb6b1accc62e5536492798cfe484f54fd 100644 (file)
@@ -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.
        .arch ev6
        .set noat
        .set noreorder
-       .text
-
-/* 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   __stxcpy, @function
+       .globl  __stxcpy
+       .usepv  __stxcpy, no
 
-       .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
index 31f85706f908bd9037f57d8c1cdcb90791bf75bc..d134eb8c108848004a67cde20e4c94d6cbfc5685 100644 (file)
@@ -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.
        .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
index 091024b1ee577687ddda496b932ea0cdea17438c..a691ff68b4ea64ad683e80155a2e592846ecf39a 100644 (file)
        .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)
index 4ac70929c25ec1a3d26b1289e17ca1716e74960d..db92771e296517fd101922c640326d45f7f6032f 100644 (file)
@@ -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.
 
        .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
           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)
index 46f19a98589fef442d7dd205b322a04dcd64831d..c55d005893c831bec0a51d5b8455b0ac86366c5b 100644 (file)
@@ -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.
 
        .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
index 5b81ac907bcd5b0559a388b155bb6bee3771c3f5..f8b494af0c261db0130a0fe6b26cc3a5e7013f7e 100644 (file)
@@ -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.
 
        .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
index e17bf211bd3d0e0f4c75f7d3b6d0567311e71ae7..4ee0746acca7b539932cba2ef4a397a67ef613a5 100644 (file)
        .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                 \