]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 11 Apr 2001 19:57:49 +0000 (19:57 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 11 Apr 2001 19:57:49 +0000 (19:57 +0000)
2001-04-11  David Mosberger  <davidm@hpl.hp.com>

* sysdeps/ia64/htonl.S: Drop superfluous "alloc".
* sysdeps/ia64/htons.S: Likewise.

* sysdeps/ia64/memset.S: Add unwind directives.
* sysdeps/ia64/strncpy.S: Likewise.
* sysdeps/ia64/strcat.S: Likewise.

* sysdeps/ia64/memccpy.S: Add unwind directives.  Drop superfluous
restore of ar.pfs.
* sysdeps/ia64/strchr.S: Likewise.
* sysdeps/ia64/memmove.S: Likewise.
* sysdeps/ia64/memcpy.S: Likewise.
* sysdeps/ia64/memcmp.S: Likewise.
* sysdeps/ia64/memchr.S: Likewise.
* sysdeps/ia64/strcmp.S: Likewise.
* sysdeps/ia64/strlen.S: Likewise.
* sysdeps/ia64/strcpy.S: Likewise.
* sysdeps/ia64/strncmp.S: Likewise.

16 files changed:
ChangeLog
sysdeps/ia64/htonl.S
sysdeps/ia64/htons.S
sysdeps/ia64/memccpy.S
sysdeps/ia64/memchr.S
sysdeps/ia64/memcmp.S
sysdeps/ia64/memcpy.S
sysdeps/ia64/memmove.S
sysdeps/ia64/memset.S
sysdeps/ia64/strcat.S
sysdeps/ia64/strchr.S
sysdeps/ia64/strcmp.S
sysdeps/ia64/strcpy.S
sysdeps/ia64/strlen.S
sysdeps/ia64/strncmp.S
sysdeps/ia64/strncpy.S

index 3289110dd888b188ad86b4bbcd2ab8ba17f05c96..3b6b1fe98909d00453eadf9a3cf0d4fe9f90da90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2001-04-11  David Mosberger  <davidm@hpl.hp.com>
+
+       * sysdeps/ia64/htonl.S: Drop superfluous "alloc".
+       * sysdeps/ia64/htons.S: Likewise.
+
+       * sysdeps/ia64/memset.S: Add unwind directives.
+       * sysdeps/ia64/strncpy.S: Likewise.
+       * sysdeps/ia64/strcat.S: Likewise.
+
+       * sysdeps/ia64/memccpy.S: Add unwind directives.  Drop superfluous
+       restore of ar.pfs.
+       * sysdeps/ia64/strchr.S: Likewise.
+       * sysdeps/ia64/memmove.S: Likewise.
+       * sysdeps/ia64/memcpy.S: Likewise.
+       * sysdeps/ia64/memcmp.S: Likewise.
+       * sysdeps/ia64/memchr.S: Likewise.
+       * sysdeps/ia64/strcmp.S: Likewise.
+       * sysdeps/ia64/strlen.S: Likewise.
+       * sysdeps/ia64/strcpy.S: Likewise.
+       * sysdeps/ia64/strncmp.S: Likewise.
+
 2001-04-11  Jakub Jelinek  <jakub@redhat.com>
 
        * wcsmbs/wchar.h (fgetwc, getwc, getwchar, fputwc, putwc, putwchar,
index 79be96baad2ffa732c83fbaadec98665efa5bf92..cc6677515c86b051bdf2ce204b0901581dfa40b3 100644 (file)
@@ -1,5 +1,5 @@
 /* Change byte order in 32-bit value.  ia64 version.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Dan Pop <Dan.Pop@cern.ch>
 
 
 
 #include <sysdep.h>
-#undef ret
 
 ENTRY(htonl)
-       alloc   ret0 = ar.pfs, 1, 0, 0, 0
-       shl     in0 = in0, 32
+       shl     ret0 = r32, 32
        ;;
-       mux1    ret0 = in0, @rev
-       br.ret.sptk.many b0
+       mux1    ret0 = ret0, @rev
+       ret
 END(htonl)
 
 weak_alias (htonl, ntohl)
index fb5e66e4582058b9ed13bb3124a1cae92a65ee5b..74c9951f3b54a151a7fdd13df0774d18af52cd2b 100644 (file)
@@ -1,5 +1,5 @@
 /* Change byte order in 16-bit value.  ia64 version.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Dan Pop <Dan.Pop@cern.ch>
 
 
 
 #include <sysdep.h>
-#undef ret
 
 ENTRY(htons)
-       alloc   ret0 = ar.pfs, 1, 0, 0, 0
-       shl     in0 = in0, 48
+       shl     ret0 = r32, 48
        ;;
-       mux1    ret0 = in0, @rev
-       br.ret.sptk.many b0
+       mux1    ret0 = ret0, @rev
+       ret
 END(htons)
 
 weak_alias (htons, ntohs)
index 589c9ccf1600cd70a4ce357f1a32e26d4ac6f17e..fbb21e48225e38391757f6cf5560f5649bc6a747 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the memccpy() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,6 @@
 #define OP_T_THRES     16
 #define OPSIZ          8
 
-#define saved_pfs      r14
 #define saved_pr       r17
 #define saved_lc       r18
 #define dest           r19
 #define        value           r31
 
 ENTRY(memccpy)
-       alloc   saved_pfs = ar.pfs, 4, 40 - 4, 0, 40
+       .prologue
+       alloc   r2 = ar.pfs, 4, 40 - 4, 0, 40
 
 #include "softpipe.h"
        .rotr   r[MEMLAT + 3], tmp1[4], tmp2[4], val[4], tmp3[2], pos0[2]
        .rotp   p[MEMLAT + 6 + 1]
 
        mov     ret0 = r0               // return NULL if no match
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicate registers
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        mov     dest = in0              // dest
        mov     src = in1               // src
        extr.u  char = in2, 0, 8        // char
@@ -143,7 +146,6 @@ ENTRY(memccpy)
 .foundit:
 (p6)   mov     ret0 = dest
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
@@ -158,7 +160,6 @@ ENTRY(memccpy)
        shr.u   value = value, 8
        br.cloop.sptk .l5 ;;
        mov     ret0 = dest
-       mov     ar.pfs = saved_pfs
        mov     pr = saved_pr, -1
        mov     ar.lc = saved_lc
        br.ret.sptk.many b0
index 5ec9b21032095fe14cd803d6404769a7192a4bf6..e659c5ee3da5286ca23d0ca85d7cb93c5e741827 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memchr() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -43,7 +43,6 @@
 #include <sysdep.h>
 #undef ret
 
-#define        saved_pfs       r14
 #define saved_pr       r15
 #define saved_lc       r16
 #define        chr             r17
 #define str            in0
 
 ENTRY(__memchr)
-       alloc saved_pfs = ar.pfs, 3, 0, 29, 32
+       .prologue
+       alloc r2 = ar.pfs, 3, 0, 29, 32
 #include "softpipe.h"
        .rotr   value[MEMLAT+1], addr[MEMLAT+3], aux[2], poschr[2]
        .rotp   p[MEMLAT+3]
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicates
+       .body
        mov     ret0 = str
        and     tmp = 7, str            // tmp = str % 8
        cmp.ne  p7, p0 = r0, r0         // clear p7
@@ -118,7 +121,6 @@ ENTRY(__memchr)
 (p6)   adds    ret0 = -1, ret0                    // if we got here from l1 or l3
 (p7)   add     ret0 = addr[MEMLAT+2], poschr[1]   // if we got here from l2
        mov     pr = saved_pr, -1
-       mov     ar.pfs = saved_pfs
        mov     ar.lc = saved_lc
        br.ret.sptk.many b0
 
index 2e4f2ec9675b9ac0a170121c8633d2ee46d8c360..c08f0d2b04ce335ff9120ebec4e3f261f2dd080c 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memcmp() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,7 +40,6 @@
 #define OPSIZ          8
 #define MEMLAT         2
 
-#define saved_pfs      r14
 #define start          r15
 #define saved_pr       r17
 #define saved_lc       r18
 #define loopcnt                r30
 
 ENTRY(memcmp)
-       alloc   saved_pfs = ar.pfs, 3, 37, 0, 40
+       .prologue
+       alloc   r2 = ar.pfs, 3, 37, 0, 40
 
        .rotr   r[MEMLAT + 2], q[MEMLAT + 5], tmp1[4], tmp2[4], val[2]
        .rotp   p[MEMLAT + 4 + 1]
 
        mov     ret0 = r0               // by default return value = 0
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicate registers
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        mov     dest = in0              // dest
        mov     src = in1               // src
        mov     len = in2               // len
@@ -126,7 +129,6 @@ ENTRY(memcmp)
        cmp.ltu p6, p7 = value2, value1 ;;
 (p6)   mov     ret0 = -1
 (p7)   mov     ret0 = 1
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
@@ -154,7 +156,6 @@ ENTRY(memcmp)
 .done:
 (p6)   sub     ret0 = value2, value1   // don't execute it if falling thru
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
index caa1aa058a2e5eb328be942aace63bc0bbbaae5f..5dcceaafa330446d5113ebdef42fa19c18904921 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memcpy() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,7 +40,6 @@
 #define OP_T_THRES     16
 #define OPSIZ          8
 
-#define saved_pfs      r14
 #define adest          r15
 #define saved_pr       r17
 #define saved_lc       r18
                br.cond.sptk .cpyfew ; /* deal with the remaining bytes */
 
 ENTRY(memcpy)
-       alloc   saved_pfs = ar.pfs, 3, 16 - 3, 0, 16
+       .prologue
+       alloc   r2 = ar.pfs, 3, 16 - 3, 0, 16
 #include "softpipe.h"
        .rotr   r[MEMLAT + 2], q[MEMLAT + 1]
        .rotp   p[MEMLAT + 2]
        mov     ret0 = in0              // return value = dest
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicate registers
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        or      tmp3 = in0, in1 ;;      // tmp3 = dest | src
        or      tmp3 = tmp3, in2        // tmp3 = dest | src | len
        mov     dest = in0              // dest
@@ -112,7 +115,6 @@ ENTRY(memcpy)
 (p[MEMLAT])    st8     [adest] = q[MEMLAT], 16
                br.ctop.dptk .l0 ;;
 
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
@@ -182,7 +184,6 @@ ENTRY(memcpy)
        st1     [dest] = value, 1
        br.cloop.dptk   .l4 ;;
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
index 3fc38b9537d97884e70e2f98fc3a14cb96b2f381..a3f7edef925db7dcc9db9487f23416755158b3ee 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memmove() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,6 @@
 #define OP_T_THRES     16
 #define OPSIZ           8
 
-#define saved_pfs      r14
 #define adest          r15
 #define saved_pr       r17
 #define saved_lc       r18
                br.cond.sptk .cpyfew ; /* deal with the remaining bytes */
 
 ENTRY(memmove)
-       alloc   saved_pfs = ar.pfs, 3, 29, 0, 32
+       .prologue
+       alloc   r2 = ar.pfs, 3, 29, 0, 32
 #include "softpipe.h"
        .rotr   r[MEMLAT + 2], q[MEMLAT + 1]
        .rotp   p[MEMLAT + 2]
        mov     ret0 = in0              // return value = dest
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicate registers
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        or      tmp3 = in0, in1 ;;      // tmp3 = dest | src
        or      tmp3 = tmp3, in2        // tmp3 = dest | src | len
        mov     dest = in0              // dest
@@ -119,7 +122,6 @@ ENTRY(memmove)
 (p[MEMLAT])    st8     [adest] = q[MEMLAT], 16
                br.ctop.dptk .l0 ;;
 
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
@@ -189,7 +191,6 @@ ENTRY(memmove)
        st1     [dest] = value, 1
        br.cloop.dptk   .l4 ;;
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     pr = saved_pr, -1       // restore the predicate registers
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
index 0ebd9bc72c4afa137258a51f10739fa7b1035c84..0d67b1cfe0082598addaf241ccd6631aa7226824 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memset() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
 #define wordval                loc6
 
 ENTRY(memset)
+       .prologue
        alloc   save_pfs = ar.pfs, 3, 7, 0, 0   
+       .save ar.lc, save_lc
        mov     save_lc = ar.lc
+       .body
        mov     ret0 = dest
        and     tmp = 7, dest
        cmp.eq  p6, p0 = cnt, r0
index d8afacbe0923e3f6045aa6050dfb8ff67dee35fd..094ebb7d53a75c445fb3e4083c8b13d11a12d2b7 100644 (file)
@@ -1,6 +1,6 @@
 /* IA-64 assembly version of the standard strcat() function.  
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
 
 #define src    in1
 #define dest   in0
-#define save_pfs loc0
-#define save_b0        loc1
+#define save_b0        loc0
+#define save_pfs loc1
 #define tmp    loc2
 #define rc     ret0
 
 ENTRY(strcat)
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
        alloc   save_pfs = ar.pfs, 2, 3, 2, 0
        mov     save_b0 = b0
+       .body
        mov     out0 = dest
        mov     tmp = gp ;;
        br.call.sptk.many b0 = strlen# ;; // rc = strlen(dest);
index 48cbf89fa8cb4b2692cc53af8799d046e227ddf3..1130fdfa7866d5d70e9c361160c71950873db1ac 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strchr() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,6 @@
 #include <sysdep.h>
 #undef ret
 
-#define        saved_pfs       r14
 #define saved_lc       r18
 #define poschr         r19
 #define pos0           r20
 #define chr            in1
 
 ENTRY(strchr)
-       alloc saved_pfs = ar.pfs, 2, 0, 0, 0
+       .prologue
+       alloc r2 = ar.pfs, 2, 0, 0, 0
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        mov     ret0 = str      
        and     tmp = 7, str            // tmp = str % 8
        mux1    chrx8 = chr, @brcst
@@ -94,12 +96,10 @@ ENTRY(strchr)
        adds    ret0 = -15, ret0 ;;     // should be -16, but we decrement
 .restore_and_exit:                     // ret0 in the next instruction
        adds    ret0 = -1, ret0         // ret0 was pointing 1 char too far
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     ar.lc = saved_lc        // restore the loop counter
        br.ret.sptk.many b0
 .notfound:
        mov     ret0 = r0               // return NULL if null was found
-       mov     ar.pfs = saved_pfs      // first
        mov     ar.lc = saved_lc
        br.ret.sptk.many b0
 .recovery:
index 164dd1bd7f0966308e296517359b3b5a5162f550..e958c0f20ee8b9484b1902eaef7e42c57e67a335 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strcmp() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
 #define s1             in0
 #define s2             in1
 
-#define saved_pfs      r14
 #define val1           r15
 #define val2           r16
 
 
 ENTRY(strcmp)
-       alloc   saved_pfs = ar.pfs, 2, 0, 0, 0
+       alloc   r2 = ar.pfs, 2, 0, 0, 0
 .loop:
        ld1     val1 = [s1], 1
        ld1     val2 = [s2], 1
@@ -50,6 +49,5 @@ ENTRY(strcmp)
        cmp.eq.and p6, p0 = val1, val2
 (p6)   br.cond.sptk .loop
        sub     ret0 = val1, val2
-       mov     ar.pfs = saved_pfs
        br.ret.sptk.many b0
 END(strcmp)
index 2a2e7e9a4a93876cdc732f036110e8423c7669e4..a3b75270f63a751eaf6d0e220c6e04547dd9f78a 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strcpy() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -34,7 +34,6 @@
 #include <sysdep.h>
 #undef ret
 
-#define saved_pfs      r14
 #define saved_lc       r15
 #define saved_pr       r16
 #define thresh         r17
 #define        value           r31
 
 ENTRY(strcpy)
-       alloc   saved_pfs = ar.pfs, 2, 0, 30, 32
+       .prologue
+       alloc   r2 = ar.pfs, 2, 0, 30, 32
 
 #define MEMLAT 2
        .rotr   r[MEMLAT + 2]
        .rotp   p[MEMLAT + 1]
 
        mov     ret0 = in0              // return value = dest
+       .save pr, saved_pr
        mov     saved_pr = pr           // save the predicate registers
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        sub     tmp = r0, in0 ;;        // tmp = -dest
        mov     dest = in0              // dest
        mov     src = in1               // src
@@ -127,7 +130,6 @@ ENTRY(strcpy)
        st1     [dest] = c, 1
        br.cloop.dptk   .l4 ;;
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs      // restore the PFS
        mov     ar.lc = saved_lc        // restore the loop counter
        mov     pr = saved_pr, -1       // restore the predicate registers
        br.ret.sptk.many b0
index 32079f9b6881b94195c07ef4e851e068d6325d7b..9f01c2cf0549a950e682171f2c78b440dc8b93b3 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strlen() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,6 @@
 #include <sysdep.h>
 #undef ret
 
-#define        saved_pfs       r14
 #define saved_lc       r18
 #define str            r19
 #define pos0           r20
 #define len            ret0
 
 ENTRY(strlen)
-       alloc saved_pfs = ar.pfs, 1, 0, 0, 0
+       .prologue
+       alloc r2 = ar.pfs, 1, 0, 0, 0
+       .save ar.lc, saved_lc
         mov    saved_lc = ar.lc        // save the loop counter
+       .body
        mov     str = in0       
        mov     len = r0                // len = 0
        and     tmp = 7, in0            // tmp = str % 8
@@ -86,7 +88,6 @@ l2:   ld8.s   val2 = [str], 8         // don't bomb out here
        add     len = len, tmp;;
        adds    len = -16, len
 .restore_and_exit:
-       mov ar.pfs = saved_pfs          // restore the PFS
        mov ar.lc = saved_lc            // restore the loop counter
        br.ret.sptk.many b0
 .recovery:
index d24bcdf680f893330761ca7bad18edc119613a2e..430d357d2991a0fcd611aa5eef7a316acf30671a 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strncmp() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
 #define s2             in1
 #define n              in2
 
-#define saved_pfs      r14
 #define val1           r15
 #define val2           r16
 
 
 ENTRY(strncmp)
-       alloc   saved_pfs = ar.pfs, 3, 0, 0, 0
+       alloc   r2 = ar.pfs, 3, 0, 0, 0
        mov     ret0 = r0
        cmp.eq  p6, p0 = r0, r0         // set p6
        cmp.eq  p7, p0 = n, r0          // return immediately if n == 0
@@ -58,6 +57,5 @@ ENTRY(strncmp)
 (p6)   br.cond.sptk .loop
        sub     ret0 = val1, val2
 .restore_and_exit:
-       mov     ar.pfs = saved_pfs
        br.ret.sptk.many b0
 END(strncmp)   
index 96f19c47fae5cf278bd987b7e23ed6a74f8867a1..ae2e9a4561cd8272d9f73e17050037f566a0aaae 100644 (file)
@@ -1,6 +1,6 @@
 /* Optimized version of the standard strncpy() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@cern.ch>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,8 +33,8 @@
 #include <sysdep.h>
 #undef ret
 
-#define saved_pfs      loc0
-#define saved_b0       loc1
+#define saved_b0       loc0
+#define saved_pfs      loc1
 #define saved_pr       loc2
 #define saved_lc       loc3
 #define tmp            loc4
 #define rc             ret0
 
 ENTRY(strncpy)
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)
        alloc   saved_pfs = ar.pfs, 3, 6, 3, 0
        mov     saved_b0 = b0
+       .save pr, saved_pr
        mov     saved_pr = pr
+       .save ar.lc, saved_lc
        mov     saved_lc = ar.lc
+       .body
        cmp.gtu p6, p0 = 24, n
 (p6)   br.cond.spnt .cpyfew
        mov     out0 = src
This page took 0.077579 seconds and 5 git commands to generate.