config.gcc (i?86-*-darwin): Add 64-bit HWI support.

2006-09-08  Eric Christopher  <echristo@apple.com>

        * config.gcc (i?86-*-darwin): Add 64-bit HWI support.
        * config/t-slibgcc-darwin: Support x86_64 multilib.
        * config/i386/i386.h (JUMP_TABLES_IN_TEXT_SECTION):
        Return 1 for x86_64-darwin.
        * config/i386/t-darwin: Add m64 multilib.
        (LIB2_SIDITI_CONV_FUNCS): Use.
        (LIB2FUNCS_EXTRA): Ditto.
        * config/i386/darwin.h: Support x86_64.
        * config/i386/i386.c (override_options): Turn on flag_pic
        for x86_64-darwin. Disable flag_omit_pointer.
        (get_pc_thunk_name): Assert !TARGET_64BIT.
        (legitimate_address_p): Disable machopic addressing for
        x86_64.
        (legitimize_pic_address): Ditto.
        (ix86_expand_move): Ditto.
        (ix86_expand_call): Ditto.
        (machopic_output_stub): Ditto.
        * config/darwin.c (machopic_select_section): Support literal16.
        (machopic_select_rtx_section): Ditto.
        * config/darwin-sections.def: Ditto.
        * config/darwin-64.c: New.

2006-09-08  Eric Christopher  <echristo@apple.com>

        * gcc.target/i386/20060512-3.c: Run test on ilp32 only.
        * gcc.target/i386/memcpy-1.c: Ditto.
        * gcc.target/i386/asm-1.c: Ditto.
        * gcc.target/i386/20060512-4.c: Ditto.
        * gcc.target/i386/compress-float-387.c: Ditto.
        * gcc.target/i386/20060512-1.c: Ditto.
        * gcc.target/i386/compress-float-sse.c: Ditto.
        * gcc.target/i386/20060512-2.c: Ditto.
        * gcc.target/i386/compress-float-sse-pic.c: Ditto.
        * gcc.target/i386/stack-prot-kernel.c: Ditto.
        * gcc.target/i386/compress-float-387-pic.c: Ditto.
        * gcc.dg/pr26449.c: Ditto.
        * gcc.dg/attr-ms_struct-2.c: Ditto.
        * gcc.dg/attr-ms_struct-1.c: Ditto.
        * gcc.misc-tests/linkage.exp: Fix 64-bit darwin support.

2006-09-08  Eric Christopher  <echristo@apple.com>

        * configure.ac: Add 64-bit HWI support for i?86-darwin.

From-SVN: r116795
This commit is contained in:
Eric Christopher 2006-09-09 00:27:47 +00:00
parent c467c5ddd6
commit f728889939
29 changed files with 348 additions and 100 deletions

View File

@ -1,3 +1,27 @@
2006-09-08 Eric Christopher <echristo@apple.com>
* config.gcc (i?86-*-darwin): Add 64-bit HWI support.
* config/t-slibgcc-darwin: Support x86_64 multilib.
* config/i386/i386.h (JUMP_TABLES_IN_TEXT_SECTION):
Return 1 for x86_64-darwin.
* config/i386/t-darwin: Add m64 multilib.
(LIB2_SIDITI_CONV_FUNCS): Use.
(LIB2FUNCS_EXTRA): Ditto.
* config/i386/darwin.h: Support x86_64.
* config/i386/i386.c (override_options): Turn on flag_pic
for x86_64-darwin. Disable flag_omit_pointer.
(get_pc_thunk_name): Assert !TARGET_64BIT.
(legitimate_address_p): Disable machopic addressing for
x86_64.
(legitimize_pic_address): Ditto.
(ix86_expand_move): Ditto.
(ix86_expand_call): Ditto.
(machopic_output_stub): Ditto.
* config/darwin.c (machopic_select_section): Support literal16.
(machopic_select_rtx_section): Ditto.
* config/darwin-sections.def: Ditto.
* config/darwin-64.c: New.
2006-09-08 Joseph S. Myers <joseph@codesourcery.com>
PR c/28504

View File

@ -1001,7 +1001,7 @@ hppa[12]*-*-hpux11*)
gas=yes
;;
i[34567]86-*-darwin*)
# All the configuration is presently done generically.
need_64bit_hwint=yes
;;
i[34567]86-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"

77
gcc/config/darwin-64.c Normal file
View File

@ -0,0 +1,77 @@
/* Functions shipped in the ppc64 and x86_64 version of libgcc_s.1.dylib
in older Mac OS X versions, preserved for backwards compatibility.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
#if defined (__ppc64__) || defined (__x86_64__)
/* Many of these functions have probably never been used by anyone
anywhere on these targets, but it's hard to prove this, so they're defined
here. None are actually necessary, as demonstrated below by defining
each function using the operation it implements. */
typedef long DI;
typedef unsigned long uDI;
typedef int SI;
typedef unsigned int uSI;
typedef int word_type __attribute__ ((mode (__word__)));
DI __ashldi3 (DI x, word_type c);
DI __ashrdi3 (DI x, word_type c);
int __clzsi2 (uSI x);
word_type __cmpdi2 (DI x, DI y);
int __ctzsi2 (uSI x);
DI __divdi3 (DI x, DI y);
uDI __lshrdi3 (uDI x, word_type c);
DI __moddi3 (DI x, DI y);
DI __muldi3 (DI x, DI y);
DI __negdi2 (DI x);
int __paritysi2 (uSI x);
int __popcountsi2 (uSI x);
word_type __ucmpdi2 (uDI x, uDI y);
uDI __udivdi3 (uDI x, uDI y);
uDI __udivmoddi4 (uDI x, uDI y, uDI *r);
uDI __umoddi3 (uDI x, uDI y);
DI __ashldi3 (DI x, word_type c) { return x << c; }
DI __ashrdi3 (DI x, word_type c) { return x >> c; }
int __clzsi2 (uSI x) { return __builtin_clz (x); }
word_type __cmpdi2 (DI x, DI y) { return x < y ? 0 : x == y ? 1 : 2; }
int __ctzsi2 (uSI x) { return __builtin_ctz (x); }
DI __divdi3 (DI x, DI y) { return x / y; }
uDI __lshrdi3 (uDI x, word_type c) { return x >> c; }
DI __moddi3 (DI x, DI y) { return x % y; }
DI __muldi3 (DI x, DI y) { return x * y; }
DI __negdi2 (DI x) { return -x; }
int __paritysi2 (uSI x) { return __builtin_parity (x); }
int __popcountsi2 (uSI x) { return __builtin_popcount (x); }
word_type __ucmpdi2 (uDI x, uDI y) { return x < y ? 0 : x == y ? 1 : 2; }
uDI __udivdi3 (uDI x, uDI y) { return x / y; }
uDI __udivmoddi4 (uDI x, uDI y, uDI *r) { *r = x % y; return x / y; }
uDI __umoddi3 (uDI x, uDI y) { return x % y; }
#endif /* __ppc64__ || __x86_64__ */

View File

@ -14,6 +14,7 @@ DEF_SECTION (data_coal_section, SECTION_WRITE,
DEF_SECTION (cstring_section, SECTION_MERGE, ".cstring", 0)
DEF_SECTION (literal4_section, SECTION_MERGE, ".literal4", 0)
DEF_SECTION (literal8_section, SECTION_MERGE, ".literal8", 0)
DEF_SECTION (literal16_section, SECTION_MERGE, ".literal16", 0)
DEF_SECTION (constructor_section, 0, ".constructor", 0)
DEF_SECTION (mod_init_section, 0, ".mod_init_func", 0)
DEF_SECTION (mod_term_section, 0, ".mod_term_func", 0)

View File

@ -1136,6 +1136,11 @@ machopic_select_section (tree exp, int reloc,
TREE_INT_CST_LOW (size) == 8 &&
TREE_INT_CST_HIGH (size) == 0)
return darwin_sections[literal8_section];
else if (TARGET_64BIT
&& TREE_CODE (size) == INTEGER_CST
&& TREE_INT_CST_LOW (size) == 16
&& TREE_INT_CST_HIGH (size) == 0)
return darwin_sections[literal16_section];
else
return base_section;
}
@ -1234,6 +1239,10 @@ machopic_select_rtx_section (enum machine_mode mode, rtx x,
&& (GET_CODE (x) == CONST_INT
|| GET_CODE (x) == CONST_DOUBLE))
return darwin_sections[literal4_section];
else if (GET_MODE_SIZE (mode) == 16
&& (GET_CODE (x) == CONST_INT
|| GET_CODE (x) == CONST_DOUBLE))
return darwin_sections[literal16_section];
else if (MACHOPIC_INDIRECT
&& (GET_CODE (x) == SYMBOL_REF
|| GET_CODE (x) == CONST

View File

@ -25,18 +25,41 @@ Boston, MA 02110-1301, USA. */
#define TARGET_VERSION fprintf (stderr, " (i686 Darwin)");
#undef TARGET_64BIT
#define TARGET_64BIT (target_flags & MASK_64BIT)
#ifdef IN_LIBGCC2
#undef TARGET_64BIT
#ifdef __x86_64__
#define TARGET_64BIT 1
#else
#define TARGET_64BIT 0
#endif
#endif
#undef TARGET_FPMATH_DEFAULT
#define TARGET_FPMATH_DEFAULT (TARGET_SSE ? FPMATH_SSE : FPMATH_387)
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__i386__"); \
builtin_define ("__LITTLE_ENDIAN__"); \
darwin_cpp_builtins (pfile); \
} \
while (0)
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#undef MAX_BITS_PER_WORD
#define MAX_BITS_PER_WORD 64
#undef FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN
#define FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN (0)
@ -48,13 +71,16 @@ Boston, MA 02110-1301, USA. */
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
#undef ASM_SPEC
#define ASM_SPEC "-arch i386 -force_cpusubtype_ALL"
#define ASM_SPEC "-arch %(darwin_arch) -force_cpusubtype_ALL"
#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}"
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "darwin_arch", "i386" }, \
{ "darwin_crt2", "" }, \
{ "darwin_subarch", "i386" },
#define SUBTARGET_EXTRA_SPECS \
{ "darwin_arch", DARWIN_ARCH_SPEC }, \
{ "darwin_crt2", "" }, \
{ "darwin_subarch", DARWIN_SUBARCH_SPEC },
/* Use the following macro for any Darwin/x86-specific command-line option
translation. */
@ -85,7 +111,7 @@ extern void darwin_x86_file_end (void);
/* By default, target has a 80387, uses IEEE compatible arithmetic,
and returns float values in the 387. */
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE | MASK_ALIGN_DOUBLE)
#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE)
/* For now, disable dynamic-no-pic. We'll need to go through i386.c
with a fine-tooth comb looking for refs to flag_pic! */
@ -109,7 +135,7 @@ extern void darwin_x86_file_end (void);
#define ASM_BYTE_OP "\t.byte\t"
#define ASM_SHORT "\t.word\t"
#define ASM_LONG "\t.long\t"
/* Darwin as doesn't do ".quad". */
#define ASM_QUAD "\t.quad\t"
#define SUBTARGET_ENCODE_SECTION_INFO darwin_encode_section_info
@ -144,7 +170,7 @@ extern void darwin_x86_file_end (void);
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do { \
if (MACHOPIC_INDIRECT) \
if (MACHOPIC_INDIRECT && !TARGET_64BIT) \
{ \
const char *name = machopic_mcount_stub_name (); \
fprintf (FILE, "\tcall %s\n", name+1); /* skip '&' */ \
@ -153,6 +179,10 @@ extern void darwin_x86_file_end (void);
else fprintf (FILE, "\tcall mcount\n"); \
} while (0)
/* Darwin on x86_64 uses dwarf-2 by default. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE (TARGET_64BIT ? DWARF2_DEBUG : DBX_DEBUG)
/* Darwin uses the standard DWARF register numbers but the default
register numbers for STABS. Fortunately for 64-bit code the
default and the standard are the same. */
@ -224,6 +254,30 @@ __enable_execute_stack (void *addr) \
#undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES darwin_set_default_type_attributes
/* For 64-bit, we need to add 4 because @GOTPCREL is relative to the
end of the instruction, but without the 4 we'd only have the right
address for the start of the instruction. */
#undef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX
#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
if (TARGET_64BIT) \
{ \
if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_pcrel) \
{ \
fputs (ASM_LONG, FILE); \
assemble_name (FILE, XSTR (ADDR, 0)); \
fputs ("+4@GOTPCREL", FILE); \
goto DONE; \
} \
} \
else \
{ \
if (ENCODING == ASM_PREFERRED_EH_DATA_FORMAT (2, 1)) \
{ \
darwin_non_lazy_pcrel (FILE, ADDR); \
goto DONE; \
} \
}
/* This needs to move since i386 uses the first flag and other flags are
used in Mach-O. */
#undef MACHO_SYMBOL_FLAG_VARIABLE

View File

@ -1538,12 +1538,17 @@ override_options (void)
SUBTARGET_OVERRIDE_OPTIONS;
#endif
/* -fPIC is the default for x86_64. */
if (TARGET_MACHO && TARGET_64BIT)
flag_pic = 2;
/* Set the default values for switches whose default depends on TARGET_64BIT
in case they weren't overwritten by command line options. */
if (TARGET_64BIT)
{
/* Mach-O doesn't support omitting the frame pointer for now. */
if (flag_omit_frame_pointer == 2)
flag_omit_frame_pointer = 1;
flag_omit_frame_pointer = (TARGET_MACHO ? 0 : 1);
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 1;
if (flag_pcc_struct_return == 2)
@ -4788,6 +4793,8 @@ static int pic_labels_used;
static void
get_pc_thunk_name (char name[32], unsigned int regno)
{
gcc_assert (!TARGET_64BIT);
if (USE_HIDDEN_LINKONCE)
sprintf (name, "__i686.get_pc_thunk.%s", reg_names[regno]);
else
@ -6174,7 +6181,7 @@ legitimate_pic_address_disp_p (rtx disp)
if (GET_CODE (op1) != CONST_INT
|| INTVAL (op1) >= 16*1024*1024
|| INTVAL (op1) < -16*1024*1024)
break;
break;
if (GET_CODE (op0) == LABEL_REF)
return true;
if (GET_CODE (op0) != SYMBOL_REF)
@ -6426,12 +6433,16 @@ legitimate_address_p (enum machine_mode mode, rtx addr, int strict)
goto report_error;
}
else if (flag_pic && (SYMBOLIC_CONST (disp)
else if (SYMBOLIC_CONST (disp)
&& (flag_pic
|| (TARGET_MACHO
#if TARGET_MACHO
&& !machopic_operand_p (disp)
&& MACHOPIC_INDIRECT
&& !machopic_operand_p (disp)
#endif
))
)))
{
is_legitimate_pic:
if (TARGET_64BIT && (index || base))
{
@ -6544,10 +6555,13 @@ legitimize_pic_address (rtx orig, rtx reg)
rtx base;
#if TARGET_MACHO
if (reg == 0)
reg = gen_reg_rtx (Pmode);
/* Use the generic Mach-O PIC machinery. */
return machopic_legitimize_pic_address (orig, GET_MODE (orig), reg);
if (TARGET_MACHO && !TARGET_64BIT)
{
if (reg == 0)
reg = gen_reg_rtx (Pmode);
/* Use the generic Mach-O PIC machinery. */
return machopic_legitimize_pic_address (orig, GET_MODE (orig), reg);
}
#endif
if (TARGET_64BIT && legitimate_pic_address_disp_p (addr))
@ -8909,27 +8923,32 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
if (flag_pic && mode == Pmode && symbolic_operand (op1, Pmode))
{
#if TARGET_MACHO
if (MACHOPIC_PURE)
if (TARGET_MACHO && !TARGET_64BIT)
{
rtx temp = ((reload_in_progress
|| ((op0 && GET_CODE (op0) == REG)
&& mode == Pmode))
? op0 : gen_reg_rtx (Pmode));
op1 = machopic_indirect_data_reference (op1, temp);
op1 = machopic_legitimize_pic_address (op1, mode,
temp == op1 ? 0 : temp);
#if TARGET_MACHO
if (MACHOPIC_PURE)
{
rtx temp = ((reload_in_progress
|| ((op0 && GET_CODE (op0) == REG)
&& mode == Pmode))
? op0 : gen_reg_rtx (Pmode));
op1 = machopic_indirect_data_reference (op1, temp);
op1 = machopic_legitimize_pic_address (op1, mode,
temp == op1 ? 0 : temp);
}
else if (MACHOPIC_INDIRECT)
op1 = machopic_indirect_data_reference (op1, 0);
if (op0 == op1)
return;
#endif
}
else if (MACHOPIC_INDIRECT)
op1 = machopic_indirect_data_reference (op1, 0);
if (op0 == op1)
return;
#else
if (GET_CODE (op0) == MEM)
op1 = force_reg (Pmode, op1);
else
op1 = legitimize_address (op1, op1, Pmode);
#endif /* TARGET_MACHO */
{
if (GET_CODE (op0) == MEM)
op1 = force_reg (Pmode, op1);
else
op1 = legitimize_address (op1, op1, Pmode);
}
}
else
{
@ -13329,15 +13348,21 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
pop = NULL;
gcc_assert (!TARGET_64BIT || !pop);
if (TARGET_MACHO && !TARGET_64BIT)
{
#if TARGET_MACHO
if (flag_pic && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF)
fnaddr = machopic_indirect_call_target (fnaddr);
#else
/* Static functions and indirect calls don't need the pic register. */
if (! TARGET_64BIT && flag_pic
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& ! SYMBOL_REF_LOCAL_P (XEXP (fnaddr, 0)))
use_reg (&use, pic_offset_table_rtx);
if (flag_pic && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF)
fnaddr = machopic_indirect_call_target (fnaddr);
#endif
}
else
{
/* Static functions and indirect calls don't need the pic register. */
if (! TARGET_64BIT && flag_pic
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& ! SYMBOL_REF_LOCAL_P (XEXP (fnaddr, 0)))
use_reg (&use, pic_offset_table_rtx);
}
if (TARGET_64BIT && INTVAL (callarg2) >= 0)
{
@ -13345,7 +13370,6 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
emit_move_insn (al, callarg2);
use_reg (&use, al);
}
#endif /* TARGET_MACHO */
if (! call_insn_operand (XEXP (fnaddr, 0), Pmode))
{
@ -17249,6 +17273,9 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
char *binder_name, *symbol_name, lazy_ptr_name[32];
int label = ++current_machopic_label_num;
/* For 64-bit we shouldn't get here. */
gcc_assert (!TARGET_64BIT);
/* Lose our funky encoding stuff so it doesn't contaminate the stub. */
symb = (*targetm.strip_name_encoding) (symb);

View File

@ -2011,11 +2011,13 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
ix86_output_addr_diff_elt ((FILE), (VALUE), (REL))
/* Under some conditions we need jump tables in the text section, because
the assembler cannot handle label differences between sections. */
/* Under some conditions we need jump tables in the text section,
because the assembler cannot handle label differences between
sections. This is the case for x86_64 on Mach-O for example. */
#define JUMP_TABLES_IN_TEXT_SECTION \
(!TARGET_64BIT && flag_pic && !HAVE_AS_GOTOFF_IN_DATA)
(flag_pic && ((TARGET_MACHO && TARGET_64BIT) \
|| (!TARGET_64BIT && !HAVE_AS_GOTOFF_IN_DATA)))
/* Switch to init or fini section via SECTION_OP, emit a call to FUNC,
and switch back. For x86 we do this only to save a few bytes that

View File

@ -1 +1,5 @@
SHLIB_VERPFX = $(srcdir)/config/i386/darwin-libgcc
MULTILIB_OPTIONS = m64
MULTILIB_DIRNAMES = x86_64
LIB2_SIDITI_CONV_FUNCS=yes
LIB2FUNCS_EXTRA = $(srcdir)/config/darwin-64.c

View File

@ -92,5 +92,10 @@ install-darwin-libgcc-stubs : $(INSTALL_FILES) installdirs
else true; fi
$(LN_S) libgcc_s.1.dylib \
$(DESTDIR)$(slibdir)/libgcc_s_ppc64.1.dylib
if [ -f $(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib ]; then \
rm -f $(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib; \
else true; fi
$(LN_S) libgcc_s.1.dylib \
$(DESTDIR)$(slibdir)/libgcc_s_x86_64.1.dylib
INSTALL_LIBGCC = install-darwin-libgcc-stubs install-multilib

View File

@ -1,3 +1,21 @@
2006-09-08 Eric Christopher <echristo@apple.com>
* gcc.target/i386/20060512-3.c: Run test on ilp32 only.
* gcc.target/i386/memcpy-1.c: Ditto.
* gcc.target/i386/asm-1.c: Ditto.
* gcc.target/i386/20060512-4.c: Ditto.
* gcc.target/i386/compress-float-387.c: Ditto.
* gcc.target/i386/20060512-1.c: Ditto.
* gcc.target/i386/compress-float-sse.c: Ditto.
* gcc.target/i386/20060512-2.c: Ditto.
* gcc.target/i386/compress-float-sse-pic.c: Ditto.
* gcc.target/i386/stack-prot-kernel.c: Ditto.
* gcc.target/i386/compress-float-387-pic.c: Ditto.
* gcc.dg/pr26449.c: Ditto.
* gcc.dg/attr-ms_struct-2.c: Ditto.
* gcc.dg/attr-ms_struct-1.c: Ditto.
* gcc.misc-tests/linkage.exp: Fix 64-bit darwin support.
2006-09-08 Joseph S. Myers <joseph@codesourcery.com>
PR c/28504

View File

@ -1,5 +1,6 @@
/* Test for MS structure sizes. */
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } }
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-std=gnu99" } */
extern void abort ();

View File

@ -1,5 +1,6 @@
/* Test for MS structure sizes. */
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } }
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-std=gnu99" } */
extern void abort ();

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O1 -ftree-vectorize -march=pentium4 -std=c99" } */
void matmul_i4 (int bbase_yn, int xcount)
@ -12,4 +13,3 @@ void matmul_i4 (int bbase_yn, int xcount)
dest_y[x] += abase_n[x] * bbase_yn;
}
}

View File

@ -73,7 +73,14 @@ if [isnative] then {
} elseif [ string match "*32-bit*" $file_string ] {
set native_cflags "-m32"
}
}
} elseif [istarget "*-*-darwin*"] {
set file_string [exec file "linkage-x.o"]
if [ string match "*64-bit*" $file_string ] {
set native_cflags "-m64"
} elseif [ string match "*32-bit*" $file_string ] {
set native_cflags "-m32"
}
}
if [file exists "linkage-y.o"] then {
file delete "linkage-y.o"

View File

@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-std=gnu99 -msse2" } */
#include <emmintrin.h>
__m128i __attribute__ ((__noinline__))

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-std=gnu99" } */
int
outer_function (int x, int y)

View File

@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-std=gnu99 -msse2 -mstackrealign" } */
#include <emmintrin.h>
__m128i __attribute__ ((__noinline__))

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-mstackrealign" } */
int
outer_function (int x, int y)

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-m32" } */
register unsigned int EAX asm ("r14"); /* { dg-error "register name" } */

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86*-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=387 -fpic" } */
double foo (double x) {
return x + 1.75;

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86*-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=387" } */
double foo (double x) {
return x + 1.75;

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86*-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=sse -fpic" } */
double foo (double x) {
return x + 1.75;

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86*-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -march=pentium4 -mtune=prescott -mfpmath=sse" } */
double foo (double x) {
return x + 1.75;

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target i?86-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -march=pentiumpro -minline-all-stringops" } */
/* { dg-final { scan-assembler "rep" } } */
/* { dg-final { scan-assembler "movs" } } */

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target lp64 } } */
/* { dg-skip-if "darwin x86_64 is pic" { *-*-darwin* } { "-m64" } { "" } } */
/* { dg-options "-O2 -fstack-protector-all -mcmodel=kernel" } */
void test1 (int x)

View File

@ -1,3 +1,7 @@
2006-09-08 Eric Christopher <echristo@apple.com>
* configure.ac: Add 64-bit HWI support for i?86-darwin.
2006-08-14 Steve Ellcey <sje@cup.hp.com>
PR c++/28288

6
libcpp/configure vendored
View File

@ -7264,8 +7264,9 @@ INCINTL=
XGETTEXT=
GMSGFMT=
POSUB=
if test -f ../intl/config.intl; then
. ../intl/config.intl
if test -f ../intl/config.intl; then
. ../intl/config.intl
fi
echo "$as_me:$LINENO: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
@ -8233,6 +8234,7 @@ case $target in
x86_64-*-* | \
ia64-*-* | \
hppa*64*-*-* | parisc*64*-*-* | \
i[34567]86-*-darwin[0-9]* | \
i[34567]86-*-solaris2.1[0-9]* | \
mips*-*-* | \
mmix-*-* | \

View File

@ -118,6 +118,7 @@ case $target in
x86_64-*-* | \
ia64-*-* | \
hppa*64*-*-* | parisc*64*-*-* | \
i[34567]86-*-darwin[0-9]* | \
i[34567]86-*-solaris2.1[0-9]* | \
mips*-*-* | \
mmix-*-* | \