Commit 8f744ea9 by David Mosberger Committed by Richard Henderson

crti.asm: Clean up trailing whitespace.

        * 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.

From-SVN: r65150
parent e129b3f9
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> 2003-04-01 Roger Sayle <roger@eyesopen.com>
PR fortran/9974 PR fortran/9974
......
...@@ -33,33 +33,33 @@ __DTOR_LIST__: ...@@ -33,33 +33,33 @@ __DTOR_LIST__:
__JCR_LIST__: __JCR_LIST__:
.section .sdata .section .sdata
.type dtor_ptr#,@object .type dtor_ptr,@object
.size dtor_ptr#,8 .size dtor_ptr,8
dtor_ptr: dtor_ptr:
data8 @gprel(__DTOR_LIST__# + 8) data8 @gprel(__DTOR_LIST__ + 8)
/* A handle for __cxa_finalize to manage c++ local destructors. */ /* A handle for __cxa_finalize to manage c++ local destructors. */
.global __dso_handle# .global __dso_handle
.type __dso_handle#,@object .type __dso_handle,@object
.size __dso_handle#,8 .size __dso_handle,8
#ifdef SHARED #ifdef SHARED
.section .data .section .data
__dso_handle: __dso_handle:
data8 __dso_handle# data8 __dso_handle
#else #else
.section .bss .section .bss
__dso_handle: __dso_handle:
data8 0 data8 0
#endif #endif
.hidden __dso_handle# .hidden __dso_handle
#ifdef HAVE_INITFINI_ARRAY #ifdef HAVE_INITFINI_ARRAY
.section .fini_array,"a","progbits" .section .fini_array,"a"
data8 @fptr(__do_global_dtors_aux) data8 @fptr(__do_global_dtors_aux)
.section .init_array,"a","progbits" .section .init_array,"a"
data8 @fptr(__do_jv_register_classes) data8 @fptr(__do_jv_register_classes)
data8 @fptr(__do_global_ctors_aux) data8 @fptr(__do_global_ctors_aux)
...@@ -79,7 +79,7 @@ __dso_handle: ...@@ -79,7 +79,7 @@ __dso_handle:
*/ */
.section .fini,"ax","progbits" .section .fini,"ax","progbits"
{ .mlx { .mlx
movl r2 = @pcrel(__do_global_dtors_aux# - 16) movl r2 = @pcrel(__do_global_dtors_aux - 16)
} }
{ .mii { .mii
mov r3 = ip mov r3 = ip
...@@ -97,7 +97,7 @@ __dso_handle: ...@@ -97,7 +97,7 @@ __dso_handle:
.section .init,"ax","progbits" .section .init,"ax","progbits"
{ .mlx { .mlx
movl r2 = @pcrel(__do_jv_register_classes# - 16) movl r2 = @pcrel(__do_jv_register_classes - 16)
} }
{ .mii { .mii
mov r3 = ip mov r3 = ip
...@@ -113,56 +113,58 @@ __dso_handle: ...@@ -113,56 +113,58 @@ __dso_handle:
#endif /* !HAVE_INITFINI_ARRAY */ #endif /* !HAVE_INITFINI_ARRAY */
.section .text .section .text
.align 16 .align 32
.proc __do_global_dtors_aux# .proc __do_global_dtors_aux
__do_global_dtors_aux: __do_global_dtors_aux:
.prologue
#ifndef SHARED #ifndef SHARED
{ .mii .save ar.pfs, r35
alloc loc3 = ar.pfs, 0, 4, 1, 0 alloc loc3 = ar.pfs, 0, 4, 1, 0
addl loc0 = @gprel(dtor_ptr#), gp addl loc0 = @gprel(dtor_ptr), gp
mov loc1 = b0 .save rp, loc1
} mov loc1 = rp
{ .mib .body
mov loc2 = gp
br.sptk.few 1f mov loc2 = gp
;; nop 0
} br.sptk.many 1f
;;
#else #else
/* /*
if (__cxa_finalize) if (__cxa_finalize)
__cxa_finalize(__dso_handle) __cxa_finalize(__dso_handle)
*/ */
{ .mii .save ar.pfs, r35
alloc loc3 = ar.pfs, 0, 4, 1, 0 alloc loc3 = ar.pfs, 0, 4, 1, 0
addl loc0 = @gprel(dtor_ptr#), gp addl loc0 = @gprel(dtor_ptr), gp
addl r16 = @ltoff(@fptr(__cxa_finalize#)), gp addl r16 = @ltoff(@fptr(__cxa_finalize)), gp
;; ;;
}
{ .mmi ld8 r16 = [r16]
ld8 r16 = [r16] ;;
;; addl out0 = @ltoff(__dso_handle), gp
addl out0 = @ltoff(__dso_handle#), gp cmp.ne p7, p0 = r0, r16
cmp.ne p7, p0 = r0, r16 ;;
;;
} ld8 out0 = [out0]
{ .mmi (p7) ld8 r18 = [r16], 8
ld8 out0 = [out0] .save rp, loc1
(p7) ld8 r18 = [r16], 8 mov loc1 = rp
mov loc1 = b0 .body
;; ;;
}
{ .mfi mov loc2 = gp
mov loc2 = gp (p7) ld8 gp = [r16]
(p7) mov b6 = r18 (p7) mov b6 = r18
}
{ nop 0
.mfb nop 0
(p7) ld8 gp = [r16] (p7) br.call.sptk.many rp = b6
(p7) br.call.sptk.many b0 = b6 ;;
}
{ .mfb nop 0
br.sptk.few 1f nop 0
} br.sptk.many 1f
#endif #endif
/* /*
do { do {
...@@ -171,89 +173,75 @@ __do_global_dtors_aux: ...@@ -171,89 +173,75 @@ __do_global_dtors_aux:
} while (dtor_ptr); } while (dtor_ptr);
*/ */
0: 0:
{ .mmi st8 [loc0] = r15 // update dtor_ptr (in memory)
st8 [loc0] = r15 ld8 r17 = [r16], 8 // r17 <- dtor's entry-point
ld8 r17 = [r16], 8 nop 0
;; ;;
}
{ .mib ld8 gp = [r16] // gp <- dtor's gp
ld8 gp = [r16] mov b6 = r17
mov b6 = r17 br.call.sptk.many rp = b6
br.call.sptk.many b0 = b6
} 1: ld8 r15 = [loc0] // r15 <- dtor_ptr (gp-relative)
1: ;;
{ .mmi add r16 = r15, loc2 // r16 <- dtor_ptr (absolute)
ld8 r15 = [loc0] adds r15 = 8, r15
;; ;;
add r16 = r15, loc2
adds r15 = 8, r15 ld8 r16 = [r16] // r16 <- pointer to dtor's fdesc
;; mov rp = loc1
} mov ar.pfs = loc3
{ .mmi ;;
ld8 r16 = [r16]
mov gp = loc2 cmp.ne p6, p0 = r0, r16
mov b0 = loc1 (p6) br.cond.sptk.few 0b
;; br.ret.sptk.many rp
} .endp __do_global_dtors_aux
{ .mib
cmp.ne p6, p0 = r0, r16 .align 32
mov ar.pfs = loc3 .proc __do_jv_register_classes
(p6) br.cond.sptk.few 0b
}
{ .bbb
br.ret.sptk.many b0
;;
}
.endp __do_global_dtors_aux#
.align 16
.proc __do_jv_register_classes#
__do_jv_register_classes: __do_jv_register_classes:
{ .mlx .save ar.pfs, r33
alloc loc2 = ar.pfs, 0, 3, 1, 0 alloc loc1 = ar.pfs, 0, 2, 1, 0
movl out0 = @gprel(__JCR_LIST__) movl out0 = @gprel(__JCR_LIST__)
;; ;;
}
{ .mmi addl r14 = @ltoff(@fptr(_Jv_RegisterClasses)), gp
addl r14 = @ltoff(@fptr(_Jv_RegisterClasses)), gp add out0 = out0, gp
add out0 = out0, gp .save rp, loc0
;; mov loc0 = rp
} .body
{ .mmi ;;
ld8 r14 = [r14]
ld8 r15 = [out0] ld8 r14 = [r14]
cmp.ne p6, p0 = r0, r0 ld8 r15 = [out0]
;; cmp.ne p6, p0 = r0, r0
} ;;
{ .mib
cmp.eq.or p6, p0 = r0, r14 cmp.eq.or p6, p0 = r0, r14
cmp.eq.or p6, p0 = r0, r15 cmp.eq.or p6, p0 = r0, r15
(p6) br.ret.sptk.many b0 (p6) br.ret.sptk.many rp
}
{ .mii ld8 r15 = [r14], 8
ld8 r15 = [r14], 8 ;;
mov loc0 = b0 ld8 gp = [r14]
mov loc1 = gp mov b6 = r15
;;
} nop 0
{ .mib nop 0
ld8 gp = [r14] br.call.sptk.many rp = b6
mov b6 = r15 ;;
br.call.sptk.many b0 = b6
;; nop 0
} mov rp = loc0
{ .mii mov ar.pfs = loc1
mov gp = loc1
mov b0 = loc0 nop 0
mov ar.pfs = loc2 nop 0
} br.ret.sptk.many rp
{ .bbb .endp __do_jv_register_classes
br.ret.sptk.many b0
;;
}
.endp __do_jv_register_classes#
#ifdef SHARED #ifdef SHARED
.weak __cxa_finalize# .weak __cxa_finalize
#endif #endif
.weak _Jv_RegisterClasses .weak _Jv_RegisterClasses
...@@ -49,7 +49,7 @@ __JCR_END__: ...@@ -49,7 +49,7 @@ __JCR_END__:
*/ */
.section .init,"ax","progbits" .section .init,"ax","progbits"
{ .mlx { .mlx
movl r2 = @pcrel(__do_global_ctors_aux# - 16) movl r2 = @pcrel(__do_global_ctors_aux - 16)
} }
{ .mii { .mii
mov r3 = ip mov r3 = ip
...@@ -65,63 +65,54 @@ __JCR_END__: ...@@ -65,63 +65,54 @@ __JCR_END__:
#endif /* !HAVE_INITFINI_ARRAY */ #endif /* !HAVE_INITFINI_ARRAY */
.text .text
.align 16 .align 32
#ifdef HAVE_INITFINI_ARRAY #ifdef HAVE_INITFINI_ARRAY
/* This is referenced from crtbegin.o. */ /* This is referenced from crtbegin.o. */
.globl __do_global_ctors_aux# .globl __do_global_ctors_aux
.type __do_global_ctors_aux#,@function .type __do_global_ctors_aux,@function
.hidden __do_global_ctors_aux# .hidden __do_global_ctors_aux
#endif #endif
.proc __do_global_ctors_aux# .proc __do_global_ctors_aux
__do_global_ctors_aux: __do_global_ctors_aux:
.prologue
/* /*
for (loc0 = __CTOR_END__-1; *p != -1; --p) for (loc0 = __CTOR_END__-1; *p != -1; --p)
(*p) (); (*p) ();
*/ */
{ .mlx .save ar.pfs, r34
alloc loc4 = ar.pfs, 0, 5, 0, 0 alloc loc2 = ar.pfs, 0, 4, 0, 0
movl loc0 = @gprel(__CTOR_END__# - 8) movl loc0 = @gprel(__CTOR_END__ - 8)
;; ;;
}
{ .mmi add loc0 = loc0, gp
add loc0 = loc0, gp ;;
mov loc1 = b0 ld8 loc3 = [loc0], -8
;; .save rp, loc1
} mov loc1 = rp
{ .body
.mmi ;;
ld8 loc3 = [loc0], -8
mov loc2 = gp cmp.eq p6, p0 = -1, loc3
;; nop 0
} (p6) br.cond.spnt.few 2f
{ .mfb
cmp.eq p6, p0 = -1, loc3 0: ld8 r15 = [loc3], 8
(p6) br.cond.spnt.few 2f ;;
} ld8 gp = [loc3]
0: mov b6 = r15
{ .mmi
ld8 r15 = [loc3], 8 ld8 loc3 = [loc0], -8
;; nop 0
ld8 gp = [loc3] br.call.sptk.many rp = b6
mov b6 = r15 ;;
}
{ .mfb cmp.ne p6, p0 = -1, loc3
ld8 loc3 = [loc0], -8 nop 0
br.call.sptk.many b0 = b6 (p6) br.cond.sptk.few 0b
;;
} 2: nop.m 0
{ .mfb mov rp = loc1
cmp.ne p6, p0 = -1, loc3 mov ar.pfs = loc2
(p6) br.cond.sptk.few 0b
} br.ret.sptk.many rp
2: .endp __do_global_ctors_aux
{ .mii
mov gp = loc2
mov b0 = loc1
mov ar.pfs = loc4
}
{ .bbb
br.ret.sptk.many b0
;;
}
.endp __do_global_ctors_aux#
# Copyright (C) 2000, 2001 Free Software Foundation, Inc. # Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# Written By Timothy Wall # Written By Timothy Wall
# #
# This file is free software; you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any # Free Software Foundation; either version 2, or (at your option) any
# later version. # later version.
# #
# In addition to the permissions in the GNU General Public License, the # In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the # Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute # compiled version of this file with other programs, and to distribute
...@@ -13,23 +13,23 @@ ...@@ -13,23 +13,23 @@
# file. (The General Public License restrictions do apply in other # file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and # respects; for example, they cover modification of the file, and
# distribution when not linked into another program.) # distribution when not linked into another program.)
# #
# This file is distributed in the hope that it will be useful, but # This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to # along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330, # the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
# #
# As a special exception, if you link this library with files # As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause # compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License. # the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why # This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License. # 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 # This file just make a stack frame for the contents of the .fini and
# .init sections. Users may put any desired instructions in those # .init sections. Users may put any desired instructions in those
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.section ".init" .section ".init"
.align 16 .align 16
.global _init# .global _init
_init: _init:
.prologue 14, 33 .prologue 14, 33
.save ar.pfs, r34 .save ar.pfs, r34
...@@ -49,10 +49,10 @@ _init: ...@@ -49,10 +49,10 @@ _init:
.save rp, r33 .save rp, r33
mov r33 = b0 mov r33 = b0
.body .body
.section ".fini" .section ".fini"
.align 16 .align 16
.global _fini# .global _fini
_fini: _fini:
.prologue 14, 33 .prologue 14, 33
.save ar.pfs, r34 .save ar.pfs, r34
...@@ -62,5 +62,5 @@ _fini: ...@@ -62,5 +62,5 @@ _fini:
.save rp, r33 .save rp, r33
mov r33 = b0 mov r33 = b0
.body .body
# end of crti.asm # end of crti.asm
# Copyright (C) 2000, 2001 Free Software Foundation, Inc. # Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# Written By Timothy Wall # Written By Timothy Wall
# #
# This file is free software; you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any # Free Software Foundation; either version 2, or (at your option) any
# later version. # later version.
# #
# In addition to the permissions in the GNU General Public License, the # In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the # Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute # compiled version of this file with other programs, and to distribute
...@@ -13,23 +13,23 @@ ...@@ -13,23 +13,23 @@
# file. (The General Public License restrictions do apply in other # file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and # respects; for example, they cover modification of the file, and
# distribution when not linked into another program.) # distribution when not linked into another program.)
# #
# This file is distributed in the hope that it will be useful, but # This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to # along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330, # the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
# #
# As a special exception, if you link this library with files # As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause # compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License. # the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why # This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License. # 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 # This file just makes sure that the .fini and .init sections do in
# fact return. Users may put any desired instructions in those sections. # fact return. Users may put any desired instructions in those sections.
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
.restore sp .restore sp
mov r12 = r35 mov r12 = r35
br.ret.sptk.many b0 br.ret.sptk.many b0
.section ".fini" .section ".fini"
;; ;;
mov ar.pfs = r34 mov ar.pfs = r34
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment