(frame_dummy, __frame_dummy): Do java registration here ...
(__do_global_ctors_aux): ... not here.
+ * config/ia64/crtbegin.asm (dtor_ptr): Make gp-relative.
+ (__do_global_dtors_aux): Update to match.
+ (__JCR_LIST__, __do_jv_register_classes): New.
+ (.init): Call it.
+ * config/ia64/crtend.asm (__JCR_END__): New.
+ (__do_global_ctors_aux): Use a GPREL64I reloc to __CTOR_END__
+ instead of an indirect LTOFF22 reloc.
+
2001-08-18 Richard Henderson <rth@redhat.com>
* flow.c (mark_regs_live_at_end): Use regs_invalidated_by_call.
__DTOR_LIST__:
data8 -1
+.section .jcr,"aw","progbits"
+ .align 8
+__JCR_LIST__:
+
.section .sdata
.type dtor_ptr#,@object
.size dtor_ptr#,8
dtor_ptr:
- data8 __DTOR_LIST__# + 8
+ data8 @gprel(__DTOR_LIST__# + 8)
/* A handle for __cxa_finalize to manage c++ local destructors. */
.global __dso_handle#
;;
}
+/* Likewise for _init. */
+
+.section .init,"ax","progbits"
+ { .mlx
+ movl r2 = @pcrel(__do_jv_register_classes# - 16)
+ }
+ { .mii
+ mov r3 = ip
+ ;;
+ add r2 = r2, r3
+ ;;
+ }
+ { .mib
+ mov b6 = r2
+ br.call.sptk.many b0 = b6
+ ;;
+ }
+
.section .text
.align 16
.proc __do_global_dtors_aux#
{ .mmi
ld8 r15 = [loc0]
;;
- ld8 r16 = [r15], 8
+ add r16 = r15, gp
+ adds r15 = 8, r15
;;
}
- { .mfb
- cmp.ne p6, p0 = r0, r16
-(p6) br.cond.sptk.few 0b
- }
- { .mii
+ { .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#
+__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#
+
#ifdef SHARED
.weak __cxa_finalize#
#endif
+.weak _Jv_RegisterClasses
__DTOR_END__:
data8 0
+.section .jcr,"aw","progbits"
+ .align 8
+__JCR_END__:
+ data8 0
+
/*
* Fragment of the ELF _init routine that invokes our dtor cleanup.
*
for (loc0 = __CTOR_END__-1; *p != -1; --p)
(*p) ();
*/
- { .mii
+ { .mlx
alloc loc4 = ar.pfs, 0, 5, 0, 0
- addl loc0 = @ltoff(__CTOR_END__# - 8), gp
- mov loc1 = b0
+ movl loc0 = @gprel(__CTOR_END__# - 8)
;;
}
{ .mmi
- ld8 loc0 = [loc0]
+ add loc0 = loc0, gp
+ mov loc1 = b0
;;
+ }
+ {
+ .mmi
ld8 loc3 = [loc0], -8
mov loc2 = gp
;;