crtbegin.asm (__JCR_LIST__): New.
authorRichard Henderson <rth@gcc.gnu.org>
Thu, 9 Aug 2001 20:22:15 +0000 (13:22 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 9 Aug 2001 20:22:15 +0000 (13:22 -0700)
        * config/alpha/crtbegin.asm (__JCR_LIST__): New.
        (__do_global_dtors_aux): Use gp-relative static data to avoid
        one dynamic relocation.
        (__do_frame_setup): Register Java classes.
        * config/alpha/crtend.asm (__JCR_END__): New.

From-SVN: r44746

gcc/ChangeLog
gcc/config/alpha/crtbegin.asm
gcc/config/alpha/crtend.asm

index ec34ae2e195ae87b56dbeeab2952aeeb4abea69b..92b43523b8b4025baef4c55a2e5f3747cb2dd95c 100644 (file)
@@ -1,23 +1,31 @@
+2001-08-09  Richard Henderson  <rth@redhat.com>
+
+       * config/alpha/crtbegin.asm (__JCR_LIST__): New.
+       (__do_global_dtors_aux): Use gp-relative static data to avoid
+       one dynamic relocation.
+       (__do_frame_setup): Register Java classes.
+       * config/alpha/crtend.asm (__JCR_END__): New.
+
 2001-08-09  Zack Weinberg  <zackw@stanford.edu>
 
-        * Makefile.in (HOST_CFLAGS): Take out -DGENERATOR_FILE.
-        (CONFIG_H, TCONFIG_H, TM_P_H): Update.
-        (GEN, STAGESTUFF): Add new files.
-        (insn-constants.h, s-constants, tm-preds.h, s-preds,
-        genconstants, genpreds, genconstants.o, genpreds.o): New rules.
-        (hashtab.o, safe-ctype.o): Add -DGENERATOR_FILE.
-        * mkconfig.sh: Include tm-preds.h in tm_p.h; insn-constants.h
-        as well as insn-codes.h and insn-flags.h in config.h; and no
-        extra headers in tconfig.h and hconfig.h.
-
-        * gencodes.c: Eliminate code to generate predicate declarations
-        or #defines for md-file constants.
-        * genconstants.c, genpreds.c: New files.
-
-        * i386.md: Re-order guard expressions such that TARGET_64BIT
-        comes first, when this permits better optimization.  Add
-        TARGET_64BIT to more x86-64 patterns.  Add comment explaining
-        why this is desirable.
+       * Makefile.in (HOST_CFLAGS): Take out -DGENERATOR_FILE.
+       (CONFIG_H, TCONFIG_H, TM_P_H): Update.
+       (GEN, STAGESTUFF): Add new files.
+       (insn-constants.h, s-constants, tm-preds.h, s-preds,
+       genconstants, genpreds, genconstants.o, genpreds.o): New rules.
+       (hashtab.o, safe-ctype.o): Add -DGENERATOR_FILE.
+       * mkconfig.sh: Include tm-preds.h in tm_p.h; insn-constants.h
+       as well as insn-codes.h and insn-flags.h in config.h; and no
+       extra headers in tconfig.h and hconfig.h.
+
+       * gencodes.c: Eliminate code to generate predicate declarations
+       or #defines for md-file constants.
+       * genconstants.c, genpreds.c: New files.
+
+       * i386.md: Re-order guard expressions such that TARGET_64BIT
+       comes first, when this permits better optimization.  Add
+       TARGET_64BIT to more x86-64 patterns.  Add comment explaining
+       why this is desirable.
 
 2001-08-09  Jakub Jelinek  <jakub@redhat.com>
 
index cbeba99a281d1f3cec7b7cd607aaed14c662f09c..96725b003b5a8e306d51af9baa16c0a0858dc428 100644 (file)
    application's lists.  */
 
 .section .ctors,"aw"
-
        .align 3
 __CTOR_LIST__:
-       .quad -1
+       .quad   -1
 
 .section .dtors,"aw"
-
        .align 3
 __DTOR_LIST__:
-       .quad -1
+       .quad   -1
+
+.section .jcr,"aw"
+       .align 3
+__JCR_LIST__:
 
 .section .eh_frame,"aw"
 __EH_FRAME_BEGIN__:
@@ -96,9 +98,9 @@ __EH_FRAME_BEGIN__:
 
 /* Support recursive calls to exit.  */
        .type dtor_ptr,@object
-       .size dtor_ptr,8
+       .size dtor_ptr,4
 dtor_ptr:
-       .quad   __DTOR_LIST__ + 8
+       .gprel32 __DTOR_LIST__ + 8
 
 /* A globally unique widget for c++ local destructors to hang off.
 
@@ -150,12 +152,13 @@ __do_global_dtors_aux:
 
 0:     lda     $9,dtor_ptr
        br      2f
-1:     stq     $1,0($9)
+1:     stl     $1,0($9)
        jsr     $26,($27)
        ldgp    $29,0($26)
-2:     ldq     $1,0($9)
-       ldq     $27,0($1)
-       addq    $1,8,$1
+2:     ldl     $1,0($9)
+       addq    $1,$29,$2
+       ldq     $27,0($2)
+       addl    $1,8,$1
        bne     $27,1b
 
        /* Remove our frame info.  */
@@ -173,11 +176,9 @@ __do_global_dtors_aux:
        .end __do_global_dtors_aux
 
 /*
- * Install our frame info.
+ * Install our frame info; register java classes, if any.
  */
 
-/* ??? How can we rationally keep this size correct?  */
-
 .section .bss
        .type frame_object,@object
        .size frame_object, 48
@@ -205,8 +206,16 @@ __do_frame_setup:
        jsr     $26,__register_frame_info
        ldgp    $29,0($26)
 
-       ldq     $26,0($30)
-0:     lda     $30,16($30)
+0:     lda     $1,_Jv_RegisterClasses
+       lda     $16,__JCR_LIST__
+       beq     $1,0f
+       ldq     $2,8($16)
+       beq     $2,0f
+       jsr     $26,_Jv_RegisterClasses
+       ldgp    $29,0($26)
+
+0:     ldq     $26,0($30)
+       lda     $30,16($30)
        ret
 
        .end __do_frame_setup
@@ -216,3 +225,4 @@ __do_frame_setup:
 #ifdef SHARED
 .weak __cxa_finalize
 #endif
+.weak _Jv_RegisterClasses
index 662eb22de9cedb66d6a1c05fbbaf18844729cf00..1ffd808bf604ef1ef15f3116428c03c83e0c7522 100644 (file)
    application's lists.  */
 
 .section .ctors,"aw"
-
        .align 3
 __CTOR_END__:
        .quad   0
 
 .section .dtors,"aw"
-
        .align 3
 __DTOR_END__:
        .quad   0
 
+.section .jcr,"aw"
+       .align 3
+__JCR_END__:
+       .quad   0
+
 .section .eh_frame,"aw"
 __FRAME_END__:
        .quad   0