sh64 and mulilibs
Joern Rennecke
joern.rennecke@superh.com
Fri Sep 17 12:36:00 GMT 2004
>
>
> > > but t-sh64 has $(ML_m5_compact:m5_compact=compact) so it will never
> > > see a set value.
> >
> > No it hasn't. Make sure you are looking at version 1.7 .
>
> I did a cvs update before reporting this. t-sh64 is at 1.7.
I think I must have mis-read your message originally.
$(ML_m5_compact:m5_compact=compact) is not present as a line of itself,
but it was part of MULTILIB_CPU_DIRS.
An inspection of the nightly sh64-elf build also showed that multilibbing
didn't extend beyond endianness.
I have applied the following patch:
2004-09-17 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (sh_gimplify_va_arg_expr): Don't call pass_by_reference.
(sh_pass_by_reference): Work around std_gimplify_va_arg_expr bug.
* t-sh (MULTILIB_CPUS): s/ML_m/ML_sh/g .
* t-sh64 (MULTILIB_CPU_DIRS): Likewise. Match dashes and trailing
slashes in substitutions.
(MULTILIB_DIRNAMES): Remove defunct removal of /media32.
Index: sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.297
diff -p -r1.297 sh.c
*** sh.c 8 Sep 2004 18:45:18 -0000 1.297
--- sh.c 17 Sep 2004 11:50:49 -0000
*************** sh_gimplify_va_arg_expr (tree valist, tr
*** 6382,6388 ****
HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node;
tree addr, lab_over, result = NULL;
! int pass_by_ref = pass_by_reference (NULL, TYPE_MODE (type), type, false);
if (pass_by_ref)
type = build_pointer_type (type);
--- 6382,6388 ----
HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node;
tree addr, lab_over, result = NULL;
! int pass_by_ref = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
if (pass_by_ref)
type = build_pointer_type (type);
*************** sh_pass_by_reference (CUMULATIVE_ARGS *c
*** 6604,6609 ****
--- 6604,6615 ----
if (targetm.calls.must_pass_in_stack (mode, type))
return true;
+ /* ??? std_gimplify_va_arg_expr passes NULL for cum. That function
+ wants to know about pass-by-reference semantics for incoming
+ arguments. */
+ if (! cum)
+ return false;
+
if (TARGET_SHCOMPACT)
{
cum->byref = shcompact_byref (cum, mode, type, named);
Index: t-sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-sh,v
retrieving revision 1.20
diff -p -r1.20 t-sh
*** t-sh 29 Jul 2004 06:10:03 -0000 1.20
--- t-sh 17 Sep 2004 11:50:49 -0000
*************** fp-bit.c: $(srcdir)/config/fp-bit.c
*** 22,28 ****
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
MULTILIB_ENDIAN = ml/mb
! MULTILIB_CPUS= $(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_single)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_only)$(ML_sh4_single)$(ML_sh4)$(ML_sh4a_nofpu)$(ML_sh4a_single_only)$(ML_sh4a_single)$(ML_sh4a)$(ML_m5_32media)$(ML_m5_32media_nofpu)$(ML_m5_compact)$(ML_m5_compact_nofpu)$(ML_m5_64media)$(ML_m5_64media_nofpu)
MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
MULTILIB_DIRNAMES=
--- 22,28 ----
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
MULTILIB_ENDIAN = ml/mb
! MULTILIB_CPUS= $(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_single)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_only)$(ML_sh4_single)$(ML_sh4)$(ML_sh4a_nofpu)$(ML_sh4a_single_only)$(ML_sh4a_single)$(ML_sh4a)$(ML_sh5_32media)$(ML_sh5_32media_nofpu)$(ML_sh5_compact)$(ML_sh5_compact_nofpu)$(ML_sh5_64media)$(ML_sh5_64media_nofpu)
MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
MULTILIB_DIRNAMES=
Index: t-sh64
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-sh64,v
retrieving revision 1.7
diff -p -r1.7 t-sh64
*** t-sh64 21 Jun 2004 18:18:40 -0000 1.7
--- t-sh64 17 Sep 2004 11:50:49 -0000
*************** LIB1ASMFUNCS = \
*** 7,13 ****
_push_pop_shmedia_regs \
_udivdi3 _divdi3 _umoddi3 _moddi3
! MULTILIB_CPU_DIRS= $(ML_sh1) $(ML_sh2e) $(ML_sh2) $(ML_sh3e) $(ML_sh3) $(ML_sh4_nofpu) $(ML_sh4_single_only) $(ML_sh4_single) $(ML_sh4) $(ML_m5_32media:m5_32media=media32) $(ML_m5_32media_nofpu:m5_32media_nofpu=nofpu/media32) $(ML_m5_compact:m5_compact=compact) $(ML_m5_compact_nofpu:m5_compact_nofpu=nofpu/compact) $(ML_m5_64media:m5_64media=media64) $(ML_m5_64media_nofpu:m5_64media_nofpu=nofpu/media64)
MULTILIB_RAW_DIRNAMES= $(MULTILIB_ENDIAN:/mb= mb) $(MULTILIB_CPU_DIRS:/=)
! MULTILIB_DIRNAMES= $(MULTILIB_RAW_DIRNAMES:/media32=)
--- 7,13 ----
_push_pop_shmedia_regs \
_udivdi3 _divdi3 _umoddi3 _moddi3
! MULTILIB_CPU_DIRS= $(ML_sh1) $(ML_sh2e) $(ML_sh2) $(ML_sh3e) $(ML_sh3) $(ML_sh4_nofpu) $(ML_sh4_single_only) $(ML_sh4_single) $(ML_sh4) $(ML_sh5_32media:m5-32media/=media32) $(ML_sh5_32media_nofpu:m5-32media-nofpu/=nofpu/media32) $(ML_sh5_compact:m5-compact/=compact) $(ML_sh5_compact_nofpu:m5-compact-nofpu/=nofpu/compact) $(ML_sh5_64media:m5-64media/=media64) $(ML_sh5_64media_nofpu:m5-64media-nofpu/=nofpu/media64)
MULTILIB_RAW_DIRNAMES= $(MULTILIB_ENDIAN:/mb= mb) $(MULTILIB_CPU_DIRS:/=)
! MULTILIB_DIRNAMES= $(MULTILIB_RAW_DIRNAMES)
More information about the Gcc
mailing list