mirror of git://gcc.gnu.org/git/gcc.git
encoding.c (_darwin_rs6000_special_round_type_align): New.
libobjc: * encoding.c (_darwin_rs6000_special_round_type_align): New. (darwin_rs6000_special_round_type_align): Adjust to use new routine. testsuite: * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: Adjust XFAILs. From-SVN: r167741
This commit is contained in:
parent
b403760c3e
commit
f436d2ff95
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-12-13 Iain Sandoe <iains@gcc.gnu.org>
|
||||||
|
|
||||||
|
* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c:
|
||||||
|
Adjust XFAILs.
|
||||||
|
|
||||||
2010-12-13 Alexandre Oliva <aoliva@redhat.com>
|
2010-12-13 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
PR debug/46576
|
PR debug/46576
|
||||||
|
|
|
||||||
|
|
@ -221,9 +221,9 @@ switchfiles (int fields)
|
||||||
fputs ("failed to create test files\n", stderr);
|
fputs ("failed to create test files\n", stderr);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
/* FIXME: these tests should not be xfailed on PowerPC darwin or aix
|
/* FIXME: these tests should not be xfailed on aix but they are because
|
||||||
but they are because libobjc uses GCC's headers for trying to find
|
libobjc uses GCC's headers for trying to find the struct layout but it
|
||||||
the struct layout but it gets it wrong. */
|
gets it wrong. */
|
||||||
if (filecnt == 2
|
if (filecnt == 2
|
||||||
|| filecnt == 3
|
|| filecnt == 3
|
||||||
|| filecnt == 4
|
|| filecnt == 4
|
||||||
|
|
@ -236,7 +236,7 @@ switchfiles (int fields)
|
||||||
|| filecnt == 22)
|
|| filecnt == 22)
|
||||||
{
|
{
|
||||||
fprintf (outfile, "\
|
fprintf (outfile, "\
|
||||||
/* { dg-do run { xfail { { \"powerpc*-*-darwin*\" && { ! lp64 } } || { \"powerpc*-*-aix*\" } } } } */\n\
|
/* { dg-do run { xfail { \"powerpc*-*-aix*\" } } } */\n\
|
||||||
/* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
|
/* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
|
||||||
}
|
}
|
||||||
/* FIXME: these should not be xfailed but they are because
|
/* FIXME: these should not be xfailed but they are because
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-12-13 Iain Sandoe <iains@gcc.gnu.org>
|
||||||
|
|
||||||
|
* encoding.c (_darwin_rs6000_special_round_type_align): New.
|
||||||
|
(darwin_rs6000_special_round_type_align): Adjust to use new routine.
|
||||||
|
|
||||||
2010-12-11 Nicola Pero <nicola.pero@meta-innovation.com>
|
2010-12-11 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
* sendmsg.c (selector_resolveClassMethod): New.
|
* sendmsg.c (selector_resolveClassMethod): New.
|
||||||
|
|
|
||||||
|
|
@ -117,27 +117,55 @@ static int __attribute__ ((__unused__)) not_target_flags = 0;
|
||||||
to a static variable, initialized by target overrides. This is reset
|
to a static variable, initialized by target overrides. This is reset
|
||||||
in linux64.h but not in darwin64.h. The macro is not used by *86*. */
|
in linux64.h but not in darwin64.h. The macro is not used by *86*. */
|
||||||
|
|
||||||
#if __MACH__ && __LP64__
|
#if __MACH__
|
||||||
# undef TARGET_ALIGN_NATURAL
|
# if __LP64__
|
||||||
# define TARGET_ALIGN_NATURAL 1
|
# undef TARGET_ALIGN_NATURAL
|
||||||
|
# define TARGET_ALIGN_NATURAL 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* On Darwin32, we need to recurse until we find the starting stuct type. */
|
||||||
|
static int
|
||||||
|
_darwin_rs6000_special_round_type_align (const char *struc, int comp, int spec)
|
||||||
|
{
|
||||||
|
const char *_stp , *_fields = TYPE_FIELDS (struc);
|
||||||
|
if (!_fields)
|
||||||
|
return MAX (comp, spec);
|
||||||
|
_stp = strip_array_types (_fields);
|
||||||
|
if (TYPE_MODE(_stp) == _C_COMPLEX)
|
||||||
|
_stp++;
|
||||||
|
switch (TYPE_MODE(_stp))
|
||||||
|
{
|
||||||
|
case RECORD_TYPE:
|
||||||
|
case UNION_TYPE:
|
||||||
|
return MAX (MAX (comp, spec), objc_alignof_type (_stp) * BITS_PER_UNIT);
|
||||||
|
break;
|
||||||
|
case DFmode:
|
||||||
|
case _C_LNG_LNG:
|
||||||
|
case _C_ULNG_LNG:
|
||||||
|
return MAX (MAX (comp, spec), 64);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return MAX (comp, spec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* See comment below. */
|
||||||
|
#define darwin_rs6000_special_round_type_align(S,C,S2) \
|
||||||
|
(_darwin_rs6000_special_round_type_align ((char*)(S), (int)(C), (int)(S2)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FIXME: while this file has no business including tm.h, this
|
/* FIXME: while this file has no business including tm.h, this
|
||||||
definitely has no business defining this macro but it
|
definitely has no business defining this macro but it
|
||||||
is only way around without really rewritting this file,
|
is only way around without really rewritting this file,
|
||||||
should look after the branch of 3.4 to fix this.
|
should look after the branch of 3.4 to fix this. */
|
||||||
FIXME1: It's also out of date, darwin no longer has the same alignment
|
|
||||||
'special' as aix - this is probably the origin of the m32 breakage. */
|
|
||||||
#define rs6000_special_round_type_align(STRUCT, COMPUTED, SPECIFIED) \
|
#define rs6000_special_round_type_align(STRUCT, COMPUTED, SPECIFIED) \
|
||||||
({ const char *_fields = TYPE_FIELDS (STRUCT); \
|
({ const char *_fields = TYPE_FIELDS (STRUCT); \
|
||||||
((_fields != 0 \
|
((_fields != 0 \
|
||||||
&& TYPE_MODE (strip_array_types (TREE_TYPE (_fields))) == DFmode) \
|
&& TYPE_MODE (strip_array_types (TREE_TYPE (_fields))) == DFmode) \
|
||||||
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
|
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
|
||||||
: MAX (COMPUTED, SPECIFIED));})
|
: MAX (COMPUTED, SPECIFIED));})
|
||||||
/* FIXME: The word 'fixme' is insufficient to explain the wrong-ness
|
|
||||||
of this next macro definition. */
|
|
||||||
#define darwin_rs6000_special_round_type_align(S,C,S2) \
|
|
||||||
rs6000_special_round_type_align(S,C,S2)
|
|
||||||
|
|
||||||
|
|
||||||
/* Skip a variable name, enclosed in quotes ("). */
|
/* Skip a variable name, enclosed in quotes ("). */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue