From: Ulrich Drepper Date: Fri, 23 Feb 2001 22:34:22 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.30~23479 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef5166a66965fbbe024746d7a5fcefe424f4d8b7;p=external%2Fglibc.git Update. 2001-02-23 Ulrich Drepper * sysdeps/i386/strtok.S: Continue to return NULL after the first time this happened. --- diff --git a/ChangeLog b/ChangeLog index b723a67..d9ec1c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-23 Ulrich Drepper + + * sysdeps/i386/strtok.S: Continue to return NULL after the first + time this happened. + 2001-02-23 Andreas Jaeger * string/tester.c (test_strtok_r): Add testcase. diff --git a/sysdeps/i386/strtok.S b/sysdeps/i386/strtok.S index ff8980a..19af2b1 100644 --- a/sysdeps/i386/strtok.S +++ b/sysdeps/i386/strtok.S @@ -1,6 +1,6 @@ /* strtok (str, delim) -- Return next DELIM separated token from STR. For Intel 80x86, x>=3. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -113,6 +113,8 @@ L(0): movl SAVE_PTR, %edx we have to take care for PIC code. */ movl SAVE_PTR, %edx #endif + testl %edx, %edx + jz L(returnNULL) L(1): /* First we create a table with flags for all possible characters. diff --git a/sysdeps/powerpc/fprrest.S b/sysdeps/powerpc/fprrest.S index 0400c97..80fa577 100644 --- a/sysdeps/powerpc/fprrest.S +++ b/sysdeps/powerpc/fprrest.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,42 +16,79 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + Floating Point Registers (FPRs) restore routine +*/ + #include - ASM_GLOBAL_DIRECTIVE _restfpr_14 -_restfpr_14: lfd fp14,-144(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_15 -_restfpr_15: lfd fp15,-136(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_16 -_restfpr_16: lfd fp16,-128(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_17 -_restfpr_17: lfd fp17,-120(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_18 -_restfpr_18: lfd fp18,-112(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_19 -_restfpr_19: lfd fp19,-104(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_20 -_restfpr_20: lfd fp20,-96(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_21 -_restfpr_21: lfd fp21,-88(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_22 -_restfpr_22: lfd fp22,-80(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_23 -_restfpr_23: lfd fp23,-72(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_24 -_restfpr_24: lfd fp24,-64(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_25 -_restfpr_25: lfd fp25,-56(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_26 -_restfpr_26: lfd fp26,-48(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_27 -_restfpr_27: lfd fp27,-40(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_28 -_restfpr_28: lfd fp28,-32(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_29 -_restfpr_29: lfd fp29,-24(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_30 -_restfpr_30: lfd fp30,-16(r11) - ASM_GLOBAL_DIRECTIVE _restfpr_31 -_restfpr_31: lfd fp31,-8(r11) - blr +ENTRY(_restfpr_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14) +C_TEXT(_restf14): +C_TEXT(_restfpr_14): lfd fp14,-144(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15) +C_TEXT(_restf15): +C_TEXT(_restfpr_15): lfd fp15,-136(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16) +C_TEXT(_restf16): +C_TEXT(_restfpr_16): lfd fp16,-128(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17) +C_TEXT(_restf17): +C_TEXT(_restfpr_17): lfd fp17,-120(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18) +C_TEXT(_restf18): +C_TEXT(_restfpr_18): lfd fp18,-112(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19) +C_TEXT(_restf19): +C_TEXT(_restfpr_19): lfd fp19,-104(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20) +C_TEXT(_restf20): +C_TEXT(_restfpr_20): lfd fp20,-96(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21) +C_TEXT(_restf21): +C_TEXT(_restfpr_21): lfd fp21,-88(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22) +C_TEXT(_restf22): +C_TEXT(_restfpr_22): lfd fp22,-80(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23) +C_TEXT(_restf23): +C_TEXT(_restfpr_23): lfd fp23,-72(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24) +C_TEXT(_restf24): +C_TEXT(_restfpr_24): lfd fp24,-64(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25) +C_TEXT(_restf25): +C_TEXT(_restfpr_25): lfd fp25,-56(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26) +C_TEXT(_restf26): +C_TEXT(_restfpr_26): lfd fp26,-48(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27) +C_TEXT(_restf27): +C_TEXT(_restfpr_27): lfd fp27,-40(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28) +C_TEXT(_restf28): +C_TEXT(_restfpr_28): lfd fp28,-32(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29) +C_TEXT(_restf29): +C_TEXT(_restfpr_29): lwz r0,8(r1) #get return address from frame + lfd fp29,-24(r1) #restore f29 + mtlr r0 #move return address to LR + lfd fp30,-16(r1) #restore f30 + lfd fp31,-8(r1) #restore f31 + blr #return diff --git a/sysdeps/powerpc/fprsave.S b/sysdeps/powerpc/fprsave.S index 8c4e186..dfc0c44 100644 --- a/sysdeps/powerpc/fprsave.S +++ b/sysdeps/powerpc/fprsave.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,42 +16,78 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + Floating Point Registers (FPRs) save routine +*/ + #include - ASM_GLOBAL_DIRECTIVE _savefpr_14 -_savefpr_14: stfd fp14,-144(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_15 -_savefpr_15: stfd fp15,-136(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_16 -_savefpr_16: stfd fp16,-128(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_17 -_savefpr_17: stfd fp17,-120(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_18 -_savefpr_18: stfd fp18,-112(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_19 -_savefpr_19: stfd fp19,-104(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_20 -_savefpr_20: stfd fp20,-96(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_21 -_savefpr_21: stfd fp21,-88(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_22 -_savefpr_22: stfd fp22,-80(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_23 -_savefpr_23: stfd fp23,-72(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_24 -_savefpr_24: stfd fp24,-64(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_25 -_savefpr_25: stfd fp25,-56(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_26 -_savefpr_26: stfd fp26,-48(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_27 -_savefpr_27: stfd fp27,-40(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_28 -_savefpr_28: stfd fp28,-32(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_29 -_savefpr_29: stfd fp29,-24(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_30 -_savefpr_30: stfd fp30,-16(r11) - ASM_GLOBAL_DIRECTIVE _savefpr_31 -_savefpr_31: stfd fp31,-8(r11) - blr +ENTRY(_savefpr_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14) +C_TEXT(_savef14): +C_TEXT(_savefpr_14): stfd fp14,-144(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15) +C_TEXT(_savef15): +C_TEXT(_savefpr_15): stfd fp15,-136(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16) +C_TEXT(_savef16): +C_TEXT(_savefpr_16): stfd fp16,-128(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17) +C_TEXT(_savef17): +C_TEXT(_savefpr_17): stfd fp17,-120(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18) +C_TEXT(_savef18): +C_TEXT(_savefpr_18): stfd fp18,-112(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19) +C_TEXT(_savef19): +C_TEXT(_savefpr_19): stfd fp19,-104(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20) +C_TEXT(_savef20): +C_TEXT(_savefpr_20): stfd fp20,-96(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21) +C_TEXT(_savef21): +C_TEXT(_savefpr_21): stfd fp21,-88(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22) +C_TEXT(_savef22): +C_TEXT(_savefpr_22): stfd fp22,-80(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23) +C_TEXT(_savef23): +C_TEXT(_savefpr_23): stfd fp23,-72(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24) +C_TEXT(_savef24): +C_TEXT(_savefpr_24): stfd fp24,-64(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25) +C_TEXT(_savef25): +C_TEXT(_savefpr_25): stfd fp25,-56(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26) +C_TEXT(_savef26): +C_TEXT(_savefpr_26): stfd fp26,-48(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27) +C_TEXT(_savef27): +C_TEXT(_savefpr_27): stfd fp27,-40(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28) +C_TEXT(_savef28): +C_TEXT(_savefpr_28): stfd fp28,-32(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29) +C_TEXT(_savef29): +C_TEXT(_savefpr_29): stfd fp29,-24(r1) #save f29 + stfd fp30,-16(r1) #save f30 + stfd fp31,-8(r1) #save f31 + stw r0,8(r1) #save LR in callers frame + blr #return diff --git a/sysdeps/powerpc/gprrest0.S b/sysdeps/powerpc/gprrest0.S index 3e6b327..d203904 100644 --- a/sysdeps/powerpc/gprrest0.S +++ b/sysdeps/powerpc/gprrest0.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,44 +16,54 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + General Purpose Register (GPR) restore routine + when Floating Point Registers (FPRs) are not saved + + Note: This restore routine must not be called when GPR30 or + GPR31, or both, are the only registers beings saved. In these + cases, the saving and restoring must be done inline. +*/ + #include - ASM_GLOBAL_DIRECTIVE _restgpr0_13 -_restgpr0_13: lwz r13,-76(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_14 -_restgpr0_14: lwz r14,-72(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_15 -_restgpr0_15: lwz r15,-68(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_16 -_restgpr0_16: lwz r16,-64(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_17 -_restgpr0_17: lwz r17,-60(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_18 -_restgpr0_18: lwz r18,-56(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_19 -_restgpr0_19: lwz r19,-52(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_20 -_restgpr0_20: lwz r20,-48(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_21 -_restgpr0_21: lwz r21,-44(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_22 -_restgpr0_22: lwz r22,-40(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_23 -_restgpr0_23: lwz r23,-36(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_24 -_restgpr0_24: lwz r24,-32(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_25 -_restgpr0_25: lwz r25,-28(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_26 -_restgpr0_26: lwz r26,-24(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_27 -_restgpr0_27: lwz r27,-20(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_28 -_restgpr0_28: lwz r28,-16(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_29 -_restgpr0_29: lwz r29,-12(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_30 -_restgpr0_30: lwz r30,-8(r1) - ASM_GLOBAL_DIRECTIVE _restgpr0_31 -_restgpr0_31: lwz r31,-4(r1) - blr +ENTRY(_restgpr0_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_13) +C_TEXT(_restgpr0_13): lwz r13,-76(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_14) +C_TEXT(_restgpr0_14): lwz r14,-72(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_15) +C_TEXT(_restgpr0_15): lwz r15,-68(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_16) +C_TEXT(_restgpr0_16): lwz r16,-64(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_17) +C_TEXT(_restgpr0_17): lwz r17,-60(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_18) +C_TEXT(_restgpr0_18): lwz r18,-56(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_19) +C_TEXT(_restgpr0_19): lwz r19,-52(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_20) +C_TEXT(_restgpr0_20): lwz r20,-48(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_21) +C_TEXT(_restgpr0_21): lwz r21,-44(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_22) +C_TEXT(_restgpr0_22): lwz r22,-40(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_23) +C_TEXT(_restgpr0_23): lwz r23,-36(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_24) +C_TEXT(_restgpr0_24): lwz r24,-32(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_25) +C_TEXT(_restgpr0_25): lwz r25,-28(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_26) +C_TEXT(_restgpr0_26): lwz r26,-24(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_27) +C_TEXT(_restgpr0_27): lwz r27,-20(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_28) +C_TEXT(_restgpr0_28): lwz r28,-16(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_29) +C_TEXT(_restgpr0_29): lwz r0,8(r1) #get return address from frame + lwz r29,-12(r1) #restore r29 + mtlr r0 #move return address to LR + lwz r30,-8(r1) #restore r30 + lwz r31,-4(r1) #restore r31 + blr #return diff --git a/sysdeps/powerpc/gprrest1.S b/sysdeps/powerpc/gprrest1.S index d92a8cd..2e9a68f 100644 --- a/sysdeps/powerpc/gprrest1.S +++ b/sysdeps/powerpc/gprrest1.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,44 +16,48 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + General Purpose Register (GPR) restore routine + when Floating Point Registers (FPRs) are saved +*/ + #include - ASM_GLOBAL_DIRECTIVE _restgpr1_13 -_restgpr1_13: lwz r13,-76(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_14 -_restgpr1_14: lwz r14,-72(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_15 -_restgpr1_15: lwz r15,-68(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_16 -_restgpr1_16: lwz r16,-64(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_17 -_restgpr1_17: lwz r17,-60(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_18 -_restgpr1_18: lwz r18,-56(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_19 -_restgpr1_19: lwz r19,-52(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_20 -_restgpr1_20: lwz r20,-48(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_21 -_restgpr1_21: lwz r21,-44(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_22 -_restgpr1_22: lwz r22,-40(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_23 -_restgpr1_23: lwz r23,-36(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_24 -_restgpr1_24: lwz r24,-32(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_25 -_restgpr1_25: lwz r25,-28(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_26 -_restgpr1_26: lwz r26,-24(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_27 -_restgpr1_27: lwz r27,-20(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_28 -_restgpr1_28: lwz r28,-16(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_29 -_restgpr1_29: lwz r29,-12(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_30 -_restgpr1_30: lwz r30,-8(r12) - ASM_GLOBAL_DIRECTIVE _restgpr1_31 -_restgpr1_31: lwz r31,-4(r12) - blr +ENTRY(_restgpr1_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_13) +C_TEXT(_restgpr1_13): lwz r13,-76(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_14) +C_TEXT(_restgpr1_14): lwz r14,-72(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_15) +C_TEXT(_restgpr1_15): lwz r15,-68(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_16) +C_TEXT(_restgpr1_16): lwz r16,-64(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_17) +C_TEXT(_restgpr1_17): lwz r17,-60(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_18) +C_TEXT(_restgpr1_18): lwz r18,-56(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_19) +C_TEXT(_restgpr1_19): lwz r19,-52(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_20) +C_TEXT(_restgpr1_20): lwz r20,-48(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_21) +C_TEXT(_restgpr1_21): lwz r21,-44(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_22) +C_TEXT(_restgpr1_22): lwz r22,-40(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_23) +C_TEXT(_restgpr1_23): lwz r23,-36(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_24) +C_TEXT(_restgpr1_24): lwz r24,-32(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_25) +C_TEXT(_restgpr1_25): lwz r25,-28(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_26) +C_TEXT(_restgpr1_26): lwz r26,-24(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_27) +C_TEXT(_restgpr1_27): lwz r27,-20(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_28) +C_TEXT(_restgpr1_28): lwz r28,-16(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr1_29) +C_TEXT(_restgpr1_29): lwz r29,-12(r12) #restore r29 + lwz r30,-8(r12) #restore r30 + lwz r31,-4(r12) #restore r31 + blr #return diff --git a/sysdeps/powerpc/gprsave0.S b/sysdeps/powerpc/gprsave0.S index ddd88b5..90316be 100644 --- a/sysdeps/powerpc/gprsave0.S +++ b/sysdeps/powerpc/gprsave0.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,45 +16,53 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + General Purpose Register (GPR) save routine + when Floating Point Registers (FPRs) are not saved + + Note: This save routine must not be called when GPR30 or + GPR31, or both, are the only registers beings saved. In these + cases, the saving and restoring must be done inline. +*/ + #include - ASM_GLOBAL_DIRECTIVE _savegpr0_13 -_savegpr0_13: stw r13,-76(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_14 -_savegpr0_14: stw r14,-72(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_15 -_savegpr0_15: stw r15,-68(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_16 -_savegpr0_16: stw r16,-64(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_17 -_savegpr0_17: stw r17,-60(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_18 -_savegpr0_18: stw r18,-56(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_19 -_savegpr0_19: stw r19,-52(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_20 -_savegpr0_20: stw r20,-48(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_21 -_savegpr0_21: stw r21,-44(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_22 -_savegpr0_22: stw r22,-40(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_23 -_savegpr0_23: stw r23,-36(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_24 -_savegpr0_24: stw r24,-32(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_25 -_savegpr0_25: stw r25,-28(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_26 -_savegpr0_26: stw r26,-24(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_27 -_savegpr0_27: stw r27,-20(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_28 -_savegpr0_28: stw r28,-16(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_29 -_savegpr0_29: stw r29,-12(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_30 -_savegpr0_30: stw r30,-8(r1) - ASM_GLOBAL_DIRECTIVE _savegpr0_31 -_savegpr0_31: stw r31,-4(r1) - stw r0,8(r1) - blr +ENTRY(_savegpr0_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_13) +C_TEXT(_savegpr0_13): stw r13,-76(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_14) +C_TEXT(_savegpr0_14): stw r14,-72(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_15) +C_TEXT(_savegpr0_15): stw r15,-68(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_16) +C_TEXT(_savegpr0_16): stw r16,-64(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_17) +C_TEXT(_savegpr0_17): stw r17,-60(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_18) +C_TEXT(_savegpr0_18): stw r18,-56(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_19) +C_TEXT(_savegpr0_19): stw r19,-52(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_20) +C_TEXT(_savegpr0_20): stw r20,-48(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_21) +C_TEXT(_savegpr0_21): stw r21,-44(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_22) +C_TEXT(_savegpr0_22): stw r22,-40(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_23) +C_TEXT(_savegpr0_23): stw r23,-36(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_24) +C_TEXT(_savegpr0_24): stw r24,-32(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_25) +C_TEXT(_savegpr0_25): stw r25,-28(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_26) +C_TEXT(_savegpr0_26): stw r26,-24(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_27) +C_TEXT(_savegpr0_27): stw r27,-20(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_28) +C_TEXT(_savegpr0_28): stw r28,-16(r1) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_29) +C_TEXT(_savegpr0_29): stw r29,-12(r1) #save r29 + stw r30,-8(r1) #save r30 + stw r31,-4(r1) #save r31 + stw r0,8(r1) #save LR in callers frame + blr #return diff --git a/sysdeps/powerpc/gprsave1.S b/sysdeps/powerpc/gprsave1.S index 85d6bdc..5193119 100644 --- a/sysdeps/powerpc/gprsave1.S +++ b/sysdeps/powerpc/gprsave1.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,44 +16,48 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* + General Purpose Register (GPR) save routine + when Floating Point Registers (FPRs) are saved +*/ + #include - ASM_GLOBAL_DIRECTIVE _savegpr1_13 -_savegpr1_13: stw r13,-76(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_14 -_savegpr1_14: stw r14,-72(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_15 -_savegpr1_15: stw r15,-68(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_16 -_savegpr1_16: stw r16,-64(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_17 -_savegpr1_17: stw r17,-60(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_18 -_savegpr1_18: stw r18,-56(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_19 -_savegpr1_19: stw r19,-52(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_20 -_savegpr1_20: stw r20,-48(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_21 -_savegpr1_21: stw r21,-44(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_22 -_savegpr1_22: stw r22,-40(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_23 -_savegpr1_23: stw r23,-36(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_24 -_savegpr1_24: stw r24,-32(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_25 -_savegpr1_25: stw r25,-28(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_26 -_savegpr1_26: stw r26,-24(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_27 -_savegpr1_27: stw r27,-20(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_28 -_savegpr1_28: stw r28,-16(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_29 -_savegpr1_29: stw r29,-12(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_30 -_savegpr1_30: stw r30,-8(r12) - ASM_GLOBAL_DIRECTIVE _savegpr1_31 -_savegpr1_31: stw r31,-4(r12) - blr +ENTRY(_savegpr1_all) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_13) +C_TEXT(_savegpr1_13): stw r13,-76(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_14) +C_TEXT(_savegpr1_14): stw r14,-72(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_15) +C_TEXT(_savegpr1_15): stw r15,-68(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_16) +C_TEXT(_savegpr1_16): stw r16,-64(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_17) +C_TEXT(_savegpr1_17): stw r17,-60(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_18) +C_TEXT(_savegpr1_18): stw r18,-56(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_19) +C_TEXT(_savegpr1_19): stw r19,-52(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_20) +C_TEXT(_savegpr1_20): stw r20,-48(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_21) +C_TEXT(_savegpr1_21): stw r21,-44(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_22) +C_TEXT(_savegpr1_22): stw r22,-40(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_23) +C_TEXT(_savegpr1_23): stw r23,-36(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_24) +C_TEXT(_savegpr1_24): stw r24,-32(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_25) +C_TEXT(_savegpr1_25): stw r25,-28(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_26) +C_TEXT(_savegpr1_26): stw r26,-24(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_27) +C_TEXT(_savegpr1_27): stw r27,-20(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_28) +C_TEXT(_savegpr1_28): stw r28,-16(r12) + ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_29) +C_TEXT(_savegpr1_29): stw r29,-12(r12) #save r29 + stw r30,-8(r12) #save r30 + stw r31,-4(r12) #save r31 + blr #return