This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: IA64 patch / build question
- To: sje at cup dot hp dot com
- Subject: Re: IA64 patch / build question
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Mon, 2 Jul 2001 12:42:05 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: Cygnus Solutions, CA
Your analysis is correct. The only thing you didn't mention is that
mklibgcc.in is newer than t-ia64. So t-ia64 was correct when written,
but the later mklibgcc.in file added a feature that solves the original
problem, and hence we no longer need the L__divdi3 workaround.
Your patch does not delete the now obsolete comment in t-ia64. Also, there
was an obsolete comment in ia64.h that needed to be deleted. Here is
the patch I checked in.
2001-07-02 Jim Wilson <wilson@redhat.com>
* config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment.
2001-07-02 Steve Ellcey <sje@cup.hp.com>
* config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore.
* config/ia64/lib1funcs.asm: Change macro names to match t-ia64.
Index: ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.70
diff -p -r1.70 ia64.h
*** ia64.h 2001/06/26 18:08:52 1.70
--- ia64.h 2001/07/02 19:29:55
*************** do { \
*** 1698,1709 ****
/* Implicit Calls to Library Routines */
- /* ??? The ia64 linux kernel requires that we use the standard names for
- divide and modulo routines. However, if we aren't careful, lib1funcs.asm
- will be overridden by libgcc2.c. We avoid this by using different names
- for lib1funcs.asm modules, e.g. __divdi3 vs _divdi3. Since lib1funcs.asm
- goes into libgcc.a first, the linker will find it first. */
-
/* Define this macro if GNU CC should generate calls to the System V (and ANSI
C) library functions `memcpy' and `memset' rather than the BSD functions
`bcopy' and `bzero'. */
--- 1698,1703 ----
Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/lib1funcs.asm,v
retrieving revision 1.13
diff -p -r1.13 lib1funcs.asm
*** lib1funcs.asm 2001/05/14 17:47:07 1.13
--- lib1funcs.asm 2001/07/02 19:29:55
***************
*** 1,4 ****
! #ifdef L__divtf3
// Compute a 80-bit IEEE double-extended quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 1,4 ----
! #ifdef L_divtf3
// Compute a 80-bit IEEE double-extended quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divtf3:
*** 40,46 ****
.endp __divtf3
#endif
! #ifdef L__divdf3
// Compute a 64-bit IEEE double quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 40,46 ----
.endp __divtf3
#endif
! #ifdef L_divdf3
// Compute a 64-bit IEEE double quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divdf3:
*** 82,88 ****
.endp __divdf3
#endif
! #ifdef L__divsf3
// Compute a 32-bit IEEE float quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 82,88 ----
.endp __divdf3
#endif
! #ifdef L_divsf3
// Compute a 32-bit IEEE float quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divsf3:
*** 118,124 ****
.endp __divsf3
#endif
! #ifdef L__divdi3
// Compute a 64-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 118,124 ----
.endp __divsf3
#endif
! #ifdef L_divdi3
// Compute a 64-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divdi3:
*** 168,174 ****
.endp __divdi3
#endif
! #ifdef L__moddi3
// Compute a 64-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 168,174 ----
.endp __divdi3
#endif
! #ifdef L_moddi3
// Compute a 64-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __moddi3:
*** 222,228 ****
.endp __moddi3
#endif
! #ifdef L__udivdi3
// Compute a 64-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 222,228 ----
.endp __moddi3
#endif
! #ifdef L_udivdi3
// Compute a 64-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __udivdi3:
*** 272,278 ****
.endp __udivdi3
#endif
! #ifdef L__umoddi3
// Compute a 64-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 272,278 ----
.endp __udivdi3
#endif
! #ifdef L_umoddi3
// Compute a 64-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __umoddi3:
*** 327,333 ****
.endp __umoddi3
#endif
! #ifdef L__divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 327,333 ----
.endp __umoddi3
#endif
! #ifdef L_divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divsi3:
*** 370,376 ****
.endp __divsi3
#endif
! #ifdef L__modsi3
// Compute a 32-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 370,376 ----
.endp __divsi3
#endif
! #ifdef L_modsi3
// Compute a 32-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __modsi3:
*** 417,423 ****
.endp __modsi3
#endif
! #ifdef L__udivsi3
// Compute a 32-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 417,423 ----
.endp __modsi3
#endif
! #ifdef L_udivsi3
// Compute a 32-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __udivsi3:
*** 460,466 ****
.endp __udivsi3
#endif
! #ifdef L__umodsi3
// Compute a 32-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 460,466 ----
.endp __udivsi3
#endif
! #ifdef L_umodsi3
// Compute a 32-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __umodsi3:
*** 507,513 ****
.endp __umodsi3
#endif
! #ifdef L__save_stack_nonlocal
// Notes on save/restore stack nonlocal: We read ar.bsp but write
// ar.bspstore. This is because ar.bsp can be read at all times
// (independent of the RSE mode) but since it's read-only we need to
--- 507,513 ----
.endp __umodsi3
#endif
! #ifdef L_save_stack_nonlocal
// Notes on save/restore stack nonlocal: We read ar.bsp but write
// ar.bspstore. This is because ar.bsp can be read at all times
// (independent of the RSE mode) but since it's read-only we need to
*************** __ia64_save_stack_nonlocal:
*** 556,562 ****
.endp __ia64_save_stack_nonlocal
#endif
! #ifdef L__nonlocal_goto
// void __ia64_nonlocal_goto(void *target_label, void *save_area,
// void *static_chain);
--- 556,562 ----
.endp __ia64_save_stack_nonlocal
#endif
! #ifdef L_nonlocal_goto
// void __ia64_nonlocal_goto(void *target_label, void *save_area,
// void *static_chain);
*************** __ia64_nonlocal_goto:
*** 609,615 ****
.endp __ia64_nonlocal_goto
#endif
! #ifdef L__restore_stack_nonlocal
// This is mostly the same as nonlocal_goto above.
// ??? This has not been tested yet.
--- 609,615 ----
.endp __ia64_nonlocal_goto
#endif
! #ifdef L_restore_stack_nonlocal
// This is mostly the same as nonlocal_goto above.
// ??? This has not been tested yet.
*************** __ia64_restore_stack_nonlocal:
*** 662,668 ****
.endp __ia64_restore_stack_nonlocal
#endif
! #ifdef L__trampoline
// Implement the nested function trampoline. This is out of line
// so that we don't have to bother with flushing the icache, as
// well as making the on-stack trampoline smaller.
--- 662,668 ----
.endp __ia64_restore_stack_nonlocal
#endif
! #ifdef L_trampoline
// Implement the nested function trampoline. This is out of line
// so that we don't have to bother with flushing the icache, as
// well as making the on-stack trampoline smaller.
Index: t-ia64
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/t-ia64,v
retrieving revision 1.10
diff -p -r1.10 t-ia64
*** t-ia64 2001/06/22 21:35:25 1.10
--- t-ia64 2001/07/02 19:29:56
***************
*** 1,12 ****
LIB1ASMSRC = ia64/lib1funcs.asm
! # ??? We change the names of the DImode div/mod files so that they won't
! # accidentally be overridden by libgcc2.c files. We used to use __ia64 as
! # a prefix, now we use __ as the prefix.
! LIB1ASMFUNCS = __divtf3 __divdf3 __divsf3 \
! __divdi3 __moddi3 __udivdi3 __umoddi3 \
! __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
! __nonlocal_goto __restore_stack_nonlocal __trampoline
# ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
# assembler does not accept # line number as a comment.
--- 1,9 ----
LIB1ASMSRC = ia64/lib1funcs.asm
! LIB1ASMFUNCS = _divtf3 _divdf3 _divsf3 \
! _divdi3 _moddi3 _udivdi3 _umoddi3 \
! _divsi3 _modsi3 _udivsi3 _umodsi3 _save_stack_nonlocal \
! _nonlocal_goto _restore_stack_nonlocal _trampoline
# ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
# assembler does not accept # line number as a comment.