summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-01 23:29:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-01 23:29:35 +0000
commit3eb5cd2209d826f82b88210e16eb24873fcdde5f (patch)
tree3b7851933c9a813796d6fb586f277231dcf6bf5c /gcc
parent375b98af7a4ab51b0e6d87892321f2c30c1fcdeb (diff)
downloadgcc-3eb5cd2209d826f82b88210e16eb24873fcdde5f.tar.gz
* config/ia64/crti.asm: Clean up trailing whitespace.
Remove trailing hashes (#) from identifiers. * config/ia64/crtn.asm: Ditto. * config/ia64/crtend.asm: Remove trailing hashes (#) from identifiers. (__do_global_ctors_aux): Align to 32-byte boundary. Add unwind directives. Drop explicit bundling---it just makes the code harder to read. Don't save/restore gp needlessly. * config/ia64/crtbegin.asm: Remove trailing hashes (#) from identifiers (they're only needed if the identifier would clash with a register name otherwise). (__do_global_dtors_aux): Align to 32-byte boundary. Add unwind directives. Drop explicit bundling---it just makes the code harder to read. (__do_jv_register_classes): Ditto. (.fini_array): Remove "progbits" (newer assemblers don't like wrong section-types). (.init_array): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog24
-rw-r--r--gcc/config/ia64/crtbegin.asm260
-rw-r--r--gcc/config/ia64/crtend.asm97
-rw-r--r--gcc/config/ia64/crti.asm20
-rw-r--r--gcc/config/ia64/crtn.asm14
5 files changed, 209 insertions, 206 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2fa9ef5cbbd..ed1698f6613 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,27 @@
+2003-04-01 David Mosberger <davidm@hpl.hp.com>
+
+ * config/ia64/crti.asm: Clean up trailing whitespace.
+ Remove trailing hashes (#) from identifiers.
+
+ * config/ia64/crtn.asm: Ditto.
+
+ * config/ia64/crtend.asm: Remove trailing hashes (#) from
+ identifiers.
+ (__do_global_ctors_aux): Align to 32-byte boundary. Add unwind
+ directives. Drop explicit bundling---it just makes the code
+ harder to read. Don't save/restore gp needlessly.
+
+ * config/ia64/crtbegin.asm: Remove trailing hashes (#) from
+ identifiers (they're only needed if the identifier would clash
+ with a register name otherwise).
+ (__do_global_dtors_aux): Align to 32-byte boundary. Add unwind
+ directives. Drop explicit bundling---it just makes the code
+ harder to read.
+ (__do_jv_register_classes): Ditto.
+ (.fini_array): Remove "progbits" (newer
+ assemblers don't like wrong section-types).
+ (.init_array): Ditto.
+
2003-04-01 Roger Sayle <roger@eyesopen.com>
PR fortran/9974
diff --git a/gcc/config/ia64/crtbegin.asm b/gcc/config/ia64/crtbegin.asm
index cb49e10bc56..c64de028eef 100644
--- a/gcc/config/ia64/crtbegin.asm
+++ b/gcc/config/ia64/crtbegin.asm
@@ -33,33 +33,33 @@ __DTOR_LIST__:
__JCR_LIST__:
.section .sdata
- .type dtor_ptr#,@object
- .size dtor_ptr#,8
+ .type dtor_ptr,@object
+ .size dtor_ptr,8
dtor_ptr:
- data8 @gprel(__DTOR_LIST__# + 8)
+ data8 @gprel(__DTOR_LIST__ + 8)
/* A handle for __cxa_finalize to manage c++ local destructors. */
- .global __dso_handle#
- .type __dso_handle#,@object
- .size __dso_handle#,8
+ .global __dso_handle
+ .type __dso_handle,@object
+ .size __dso_handle,8
#ifdef SHARED
.section .data
__dso_handle:
- data8 __dso_handle#
+ data8 __dso_handle
#else
.section .bss
__dso_handle:
data8 0
#endif
- .hidden __dso_handle#
+ .hidden __dso_handle
#ifdef HAVE_INITFINI_ARRAY
-.section .fini_array,"a","progbits"
+.section .fini_array,"a"
data8 @fptr(__do_global_dtors_aux)
-.section .init_array,"a","progbits"
+.section .init_array,"a"
data8 @fptr(__do_jv_register_classes)
data8 @fptr(__do_global_ctors_aux)
@@ -79,7 +79,7 @@ __dso_handle:
*/
.section .fini,"ax","progbits"
{ .mlx
- movl r2 = @pcrel(__do_global_dtors_aux# - 16)
+ movl r2 = @pcrel(__do_global_dtors_aux - 16)
}
{ .mii
mov r3 = ip
@@ -97,7 +97,7 @@ __dso_handle:
.section .init,"ax","progbits"
{ .mlx
- movl r2 = @pcrel(__do_jv_register_classes# - 16)
+ movl r2 = @pcrel(__do_jv_register_classes - 16)
}
{ .mii
mov r3 = ip
@@ -113,56 +113,58 @@ __dso_handle:
#endif /* !HAVE_INITFINI_ARRAY */
.section .text
- .align 16
- .proc __do_global_dtors_aux#
+ .align 32
+ .proc __do_global_dtors_aux
__do_global_dtors_aux:
+ .prologue
#ifndef SHARED
- { .mii
- alloc loc3 = ar.pfs, 0, 4, 1, 0
- addl loc0 = @gprel(dtor_ptr#), gp
- mov loc1 = b0
- }
- { .mib
- mov loc2 = gp
- br.sptk.few 1f
- ;;
- }
+ .save ar.pfs, r35
+ alloc loc3 = ar.pfs, 0, 4, 1, 0
+ addl loc0 = @gprel(dtor_ptr), gp
+ .save rp, loc1
+ mov loc1 = rp
+ .body
+
+ mov loc2 = gp
+ nop 0
+ br.sptk.many 1f
+ ;;
#else
/*
if (__cxa_finalize)
__cxa_finalize(__dso_handle)
*/
- { .mii
- alloc loc3 = ar.pfs, 0, 4, 1, 0
- addl loc0 = @gprel(dtor_ptr#), gp
- addl r16 = @ltoff(@fptr(__cxa_finalize#)), gp
- ;;
- }
- { .mmi
- ld8 r16 = [r16]
- ;;
- addl out0 = @ltoff(__dso_handle#), gp
- cmp.ne p7, p0 = r0, r16
- ;;
- }
- { .mmi
- ld8 out0 = [out0]
-(p7) ld8 r18 = [r16], 8
- mov loc1 = b0
- ;;
- }
- { .mfi
- mov loc2 = gp
-(p7) mov b6 = r18
- }
- {
- .mfb
-(p7) ld8 gp = [r16]
-(p7) br.call.sptk.many b0 = b6
- }
- { .mfb
- br.sptk.few 1f
- }
+ .save ar.pfs, r35
+ alloc loc3 = ar.pfs, 0, 4, 1, 0
+ addl loc0 = @gprel(dtor_ptr), gp
+ addl r16 = @ltoff(@fptr(__cxa_finalize)), gp
+ ;;
+
+ ld8 r16 = [r16]
+ ;;
+ addl out0 = @ltoff(__dso_handle), gp
+ cmp.ne p7, p0 = r0, r16
+ ;;
+
+ ld8 out0 = [out0]
+(p7) ld8 r18 = [r16], 8
+ .save rp, loc1
+ mov loc1 = rp
+ .body
+ ;;
+
+ mov loc2 = gp
+(p7) ld8 gp = [r16]
+(p7) mov b6 = r18
+
+ nop 0
+ nop 0
+(p7) br.call.sptk.many rp = b6
+ ;;
+
+ nop 0
+ nop 0
+ br.sptk.many 1f
#endif
/*
do {
@@ -171,89 +173,75 @@ __do_global_dtors_aux:
} while (dtor_ptr);
*/
0:
- { .mmi
- st8 [loc0] = r15
- ld8 r17 = [r16], 8
- ;;
- }
- { .mib
- ld8 gp = [r16]
- mov b6 = r17
- br.call.sptk.many b0 = b6
- }
-1:
- { .mmi
- ld8 r15 = [loc0]
- ;;
- add r16 = r15, loc2
- adds r15 = 8, r15
- ;;
- }
- { .mmi
- ld8 r16 = [r16]
- mov gp = loc2
- mov b0 = loc1
- ;;
- }
- { .mib
- cmp.ne p6, p0 = r0, r16
- mov ar.pfs = loc3
-(p6) br.cond.sptk.few 0b
- }
- { .bbb
- br.ret.sptk.many b0
- ;;
- }
- .endp __do_global_dtors_aux#
-
- .align 16
- .proc __do_jv_register_classes#
+ st8 [loc0] = r15 // update dtor_ptr (in memory)
+ ld8 r17 = [r16], 8 // r17 <- dtor's entry-point
+ nop 0
+ ;;
+
+ ld8 gp = [r16] // gp <- dtor's gp
+ mov b6 = r17
+ br.call.sptk.many rp = b6
+
+1: ld8 r15 = [loc0] // r15 <- dtor_ptr (gp-relative)
+ ;;
+ add r16 = r15, loc2 // r16 <- dtor_ptr (absolute)
+ adds r15 = 8, r15
+ ;;
+
+ ld8 r16 = [r16] // r16 <- pointer to dtor's fdesc
+ mov rp = loc1
+ mov ar.pfs = loc3
+ ;;
+
+ cmp.ne p6, p0 = r0, r16
+(p6) br.cond.sptk.few 0b
+ br.ret.sptk.many rp
+ .endp __do_global_dtors_aux
+
+ .align 32
+ .proc __do_jv_register_classes
__do_jv_register_classes:
- { .mlx
- alloc loc2 = ar.pfs, 0, 3, 1, 0
- movl out0 = @gprel(__JCR_LIST__)
- ;;
- }
- { .mmi
- addl r14 = @ltoff(@fptr(_Jv_RegisterClasses)), gp
- add out0 = out0, gp
- ;;
- }
- { .mmi
- ld8 r14 = [r14]
- ld8 r15 = [out0]
- cmp.ne p6, p0 = r0, r0
- ;;
- }
- { .mib
- cmp.eq.or p6, p0 = r0, r14
- cmp.eq.or p6, p0 = r0, r15
-(p6) br.ret.sptk.many b0
- }
- { .mii
- ld8 r15 = [r14], 8
- mov loc0 = b0
- mov loc1 = gp
- ;;
- }
- { .mib
- ld8 gp = [r14]
- mov b6 = r15
- br.call.sptk.many b0 = b6
- ;;
- }
- { .mii
- mov gp = loc1
- mov b0 = loc0
- mov ar.pfs = loc2
- }
- { .bbb
- br.ret.sptk.many b0
- ;;
- }
- .endp __do_jv_register_classes#
+ .save ar.pfs, r33
+ alloc loc1 = ar.pfs, 0, 2, 1, 0
+ movl out0 = @gprel(__JCR_LIST__)
+ ;;
+
+ addl r14 = @ltoff(@fptr(_Jv_RegisterClasses)), gp
+ add out0 = out0, gp
+ .save rp, loc0
+ mov loc0 = rp
+ .body
+ ;;
+
+ ld8 r14 = [r14]
+ ld8 r15 = [out0]
+ cmp.ne p6, p0 = r0, r0
+ ;;
+
+ cmp.eq.or p6, p0 = r0, r14
+ cmp.eq.or p6, p0 = r0, r15
+(p6) br.ret.sptk.many rp
+
+ ld8 r15 = [r14], 8
+ ;;
+ ld8 gp = [r14]
+ mov b6 = r15
+
+ nop 0
+ nop 0
+ br.call.sptk.many rp = b6
+ ;;
+
+ nop 0
+ mov rp = loc0
+ mov ar.pfs = loc1
+
+ nop 0
+ nop 0
+ br.ret.sptk.many rp
+ .endp __do_jv_register_classes
#ifdef SHARED
-.weak __cxa_finalize#
+.weak __cxa_finalize
#endif
.weak _Jv_RegisterClasses
diff --git a/gcc/config/ia64/crtend.asm b/gcc/config/ia64/crtend.asm
index 303f30cbce8..f357e5652f4 100644
--- a/gcc/config/ia64/crtend.asm
+++ b/gcc/config/ia64/crtend.asm
@@ -49,7 +49,7 @@ __JCR_END__:
*/
.section .init,"ax","progbits"
{ .mlx
- movl r2 = @pcrel(__do_global_ctors_aux# - 16)
+ movl r2 = @pcrel(__do_global_ctors_aux - 16)
}
{ .mii
mov r3 = ip
@@ -65,63 +65,54 @@ __JCR_END__:
#endif /* !HAVE_INITFINI_ARRAY */
.text
- .align 16
+ .align 32
#ifdef HAVE_INITFINI_ARRAY
/* This is referenced from crtbegin.o. */
- .globl __do_global_ctors_aux#
- .type __do_global_ctors_aux#,@function
- .hidden __do_global_ctors_aux#
+ .globl __do_global_ctors_aux
+ .type __do_global_ctors_aux,@function
+ .hidden __do_global_ctors_aux
#endif
- .proc __do_global_ctors_aux#
+ .proc __do_global_ctors_aux
__do_global_ctors_aux:
+ .prologue
/*
for (loc0 = __CTOR_END__-1; *p != -1; --p)
(*p) ();
*/
- { .mlx
- alloc loc4 = ar.pfs, 0, 5, 0, 0
- movl loc0 = @gprel(__CTOR_END__# - 8)
- ;;
- }
- { .mmi
- add loc0 = loc0, gp
- mov loc1 = b0
- ;;
- }
- {
- .mmi
- ld8 loc3 = [loc0], -8
- mov loc2 = gp
- ;;
- }
- { .mfb
- cmp.eq p6, p0 = -1, loc3
-(p6) br.cond.spnt.few 2f
- }
-0:
- { .mmi
- ld8 r15 = [loc3], 8
- ;;
- ld8 gp = [loc3]
- mov b6 = r15
- }
- { .mfb
- ld8 loc3 = [loc0], -8
- br.call.sptk.many b0 = b6
- ;;
- }
- { .mfb
- cmp.ne p6, p0 = -1, loc3
-(p6) br.cond.sptk.few 0b
- }
-2:
- { .mii
- mov gp = loc2
- mov b0 = loc1
- mov ar.pfs = loc4
- }
- { .bbb
- br.ret.sptk.many b0
- ;;
- }
- .endp __do_global_ctors_aux#
+ .save ar.pfs, r34
+ alloc loc2 = ar.pfs, 0, 4, 0, 0
+ movl loc0 = @gprel(__CTOR_END__ - 8)
+ ;;
+
+ add loc0 = loc0, gp
+ ;;
+ ld8 loc3 = [loc0], -8
+ .save rp, loc1
+ mov loc1 = rp
+ .body
+ ;;
+
+ cmp.eq p6, p0 = -1, loc3
+ nop 0
+(p6) br.cond.spnt.few 2f
+
+0: ld8 r15 = [loc3], 8
+ ;;
+ ld8 gp = [loc3]
+ mov b6 = r15
+
+ ld8 loc3 = [loc0], -8
+ nop 0
+ br.call.sptk.many rp = b6
+ ;;
+
+ cmp.ne p6, p0 = -1, loc3
+ nop 0
+(p6) br.cond.sptk.few 0b
+
+2: nop.m 0
+ mov rp = loc1
+ mov ar.pfs = loc2
+
+ br.ret.sptk.many rp
+ .endp __do_global_ctors_aux
diff --git a/gcc/config/ia64/crti.asm b/gcc/config/ia64/crti.asm
index 4b94b7f6953..4b48e3d40e8 100644
--- a/gcc/config/ia64/crti.asm
+++ b/gcc/config/ia64/crti.asm
@@ -1,11 +1,11 @@
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# Written By Timothy Wall
-#
+#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
-#
+#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
@@ -13,23 +13,23 @@
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
-#
+#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-#
+#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
-#
+#
# This file just make a stack frame for the contents of the .fini and
# .init sections. Users may put any desired instructions in those
@@ -39,7 +39,7 @@
.section ".init"
.align 16
- .global _init#
+ .global _init
_init:
.prologue 14, 33
.save ar.pfs, r34
@@ -49,10 +49,10 @@ _init:
.save rp, r33
mov r33 = b0
.body
-
+
.section ".fini"
.align 16
- .global _fini#
+ .global _fini
_fini:
.prologue 14, 33
.save ar.pfs, r34
@@ -62,5 +62,5 @@ _fini:
.save rp, r33
mov r33 = b0
.body
-
+
# end of crti.asm
diff --git a/gcc/config/ia64/crtn.asm b/gcc/config/ia64/crtn.asm
index 0b45d380aad..48a9a03fdc6 100644
--- a/gcc/config/ia64/crtn.asm
+++ b/gcc/config/ia64/crtn.asm
@@ -1,11 +1,11 @@
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# Written By Timothy Wall
-#
+#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
-#
+#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
@@ -13,23 +13,23 @@
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
-#
+#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-#
+#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
-#
+#
# This file just makes sure that the .fini and .init sections do in
# fact return. Users may put any desired instructions in those sections.
@@ -44,7 +44,7 @@
.restore sp
mov r12 = r35
br.ret.sptk.many b0
-
+
.section ".fini"
;;
mov ar.pfs = r34