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> 2006-09-08 Joseph S. Myers <joseph@codesourcery.com>
PR c/28504 PR c/28504

View File

@ -438,7 +438,7 @@ case ${target} in
;; ;;
esac esac
;; ;;
*) *)
echo 'Unknown thread configuration for FreeBSD' echo 'Unknown thread configuration for FreeBSD'
exit 1 exit 1
;; ;;
@ -693,13 +693,13 @@ arm*-*-netbsd*)
use_collect2=yes use_collect2=yes
;; ;;
arm*-*-linux*) # ARM GNU/Linux with ELF arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
tmake_file="${tmake_file} t-linux arm/t-arm" tmake_file="${tmake_file} t-linux arm/t-arm"
case ${target} in case ${target} in
arm*-*-linux-*eabi) arm*-*-linux-*eabi)
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
# The BPABI long long divmod functions return a 128-bit value in # The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of # registers r0-r3. Correctly modeling that requires the use of
# TImode. # TImode.
need_64bit_hwint=yes need_64bit_hwint=yes
@ -721,7 +721,7 @@ arm*-*-ecos-elf)
tmake_file="arm/t-arm arm/t-arm-elf" tmake_file="arm/t-arm arm/t-arm-elf"
;; ;;
arm*-*-eabi* | arm*-*-symbianelf* ) arm*-*-eabi* | arm*-*-symbianelf* )
# The BPABI long long divmod functions return a 128-bit value in # The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of # registers r0-r3. Correctly modeling that requires the use of
# TImode. # TImode.
need_64bit_hwint=yes need_64bit_hwint=yes
@ -965,7 +965,7 @@ hppa*64*-*-hpux11*)
libgcc_stub.a" libgcc_stub.a"
case x${enable_threads} in case x${enable_threads} in
xyes | xposix ) xyes | xposix )
thread_file=posix thread_file=posix
;; ;;
esac esac
gas=yes gas=yes
@ -994,14 +994,14 @@ hppa[12]*-*-hpux11*)
fi fi
case x${enable_threads} in case x${enable_threads} in
xyes | xposix ) xyes | xposix )
thread_file=posix thread_file=posix
;; ;;
esac esac
use_collect2=yes use_collect2=yes
gas=yes gas=yes
;; ;;
i[34567]86-*-darwin*) i[34567]86-*-darwin*)
# All the configuration is presently done generically. need_64bit_hwint=yes
;; ;;
i[34567]86-*-elf*) i[34567]86-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
@ -1192,7 +1192,7 @@ i[34567]86-*-solaris2*)
exit 1 exit 1
;; ;;
esac esac
# Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as # Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
# part of the base system. # part of the base system.
extra_parts="gmon.o crtbegin.o crtend.o" extra_parts="gmon.o crtbegin.o crtend.o"
;; ;;
@ -1540,7 +1540,7 @@ mips*-*-openbsd*)
target_cpu_default="MASK_ABICALLS" target_cpu_default="MASK_ABICALLS"
tm_file="mips/mips.h openbsd.h mips/openbsd.h mips/sdb.h" tm_file="mips/mips.h openbsd.h mips/openbsd.h mips/sdb.h"
case ${target} in case ${target} in
mips*el-*-openbsd*) mips*el-*-openbsd*)
tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";; tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
*) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";; *) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
esac esac
@ -1688,7 +1688,7 @@ powerpc-*-darwin*)
extra_parts="crt2.o" extra_parts="crt2.o"
case ${target} in case ${target} in
*-darwin1[0-9]* | *-darwin[8-9]*) *-darwin1[0-9]* | *-darwin[8-9]*)
tmake_file="${tmake_file} rs6000/t-darwin8" tmake_file="${tmake_file} rs6000/t-darwin8"
tm_file="${tm_file} rs6000/darwin8.h" tm_file="${tm_file} rs6000/darwin8.h"
;; ;;
*-darwin7*) *-darwin7*)
@ -2001,7 +2001,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h" tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h"
extra_objs="symbian.o" extra_objs="symbian.o"
extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o" extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
;; ;;
esac esac
# sed el/eb endian suffixes away to avoid confusion with sh[23]e # sed el/eb endian suffixes away to avoid confusion with sh[23]e
case `echo ${target} | sed 's/e[lb]-/-/'` in case `echo ${target} | sed 's/e[lb]-/-/'` in

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 (cstring_section, SECTION_MERGE, ".cstring", 0)
DEF_SECTION (literal4_section, SECTION_MERGE, ".literal4", 0) DEF_SECTION (literal4_section, SECTION_MERGE, ".literal4", 0)
DEF_SECTION (literal8_section, SECTION_MERGE, ".literal8", 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 (constructor_section, 0, ".constructor", 0)
DEF_SECTION (mod_init_section, 0, ".mod_init_func", 0) DEF_SECTION (mod_init_section, 0, ".mod_init_func", 0)
DEF_SECTION (mod_term_section, 0, ".mod_term_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_LOW (size) == 8 &&
TREE_INT_CST_HIGH (size) == 0) TREE_INT_CST_HIGH (size) == 0)
return darwin_sections[literal8_section]; 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 else
return base_section; 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_INT
|| GET_CODE (x) == CONST_DOUBLE)) || GET_CODE (x) == CONST_DOUBLE))
return darwin_sections[literal4_section]; 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 else if (MACHOPIC_INDIRECT
&& (GET_CODE (x) == SYMBOL_REF && (GET_CODE (x) == SYMBOL_REF
|| GET_CODE (x) == CONST || GET_CODE (x) == CONST

View File

@ -25,18 +25,41 @@ Boston, MA 02110-1301, USA. */
#define TARGET_VERSION fprintf (stderr, " (i686 Darwin)"); #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 #undef TARGET_FPMATH_DEFAULT
#define TARGET_FPMATH_DEFAULT (TARGET_SSE ? FPMATH_SSE : FPMATH_387) #define TARGET_FPMATH_DEFAULT (TARGET_SSE ? FPMATH_SSE : FPMATH_387)
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
{ \ { \
builtin_define ("__i386__"); \
builtin_define ("__LITTLE_ENDIAN__"); \ builtin_define ("__LITTLE_ENDIAN__"); \
darwin_cpp_builtins (pfile); \ darwin_cpp_builtins (pfile); \
} \ } \
while (0) 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 #undef FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN
#define FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN (0) #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 }}" %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
#undef ASM_SPEC #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 #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
{ "darwin_arch", "i386" }, \ { "darwin_arch", DARWIN_ARCH_SPEC }, \
{ "darwin_crt2", "" }, \ { "darwin_crt2", "" }, \
{ "darwin_subarch", "i386" }, { "darwin_subarch", DARWIN_SUBARCH_SPEC },
/* Use the following macro for any Darwin/x86-specific command-line option /* Use the following macro for any Darwin/x86-specific command-line option
translation. */ translation. */
@ -85,7 +111,7 @@ extern void darwin_x86_file_end (void);
/* By default, target has a 80387, uses IEEE compatible arithmetic, /* By default, target has a 80387, uses IEEE compatible arithmetic,
and returns float values in the 387. */ 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 /* 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! */ 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_BYTE_OP "\t.byte\t"
#define ASM_SHORT "\t.word\t" #define ASM_SHORT "\t.word\t"
#define ASM_LONG "\t.long\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 #define SUBTARGET_ENCODE_SECTION_INFO darwin_encode_section_info
@ -144,7 +170,7 @@ extern void darwin_x86_file_end (void);
#undef FUNCTION_PROFILER #undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \ #define FUNCTION_PROFILER(FILE, LABELNO) \
do { \ do { \
if (MACHOPIC_INDIRECT) \ if (MACHOPIC_INDIRECT && !TARGET_64BIT) \
{ \ { \
const char *name = machopic_mcount_stub_name (); \ const char *name = machopic_mcount_stub_name (); \
fprintf (FILE, "\tcall %s\n", name+1); /* skip '&' */ \ 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"); \ else fprintf (FILE, "\tcall mcount\n"); \
} while (0) } 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 /* Darwin uses the standard DWARF register numbers but the default
register numbers for STABS. Fortunately for 64-bit code the register numbers for STABS. Fortunately for 64-bit code the
default and the standard are the same. */ default and the standard are the same. */
@ -224,6 +254,30 @@ __enable_execute_stack (void *addr) \
#undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES #undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES darwin_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 /* This needs to move since i386 uses the first flag and other flags are
used in Mach-O. */ used in Mach-O. */
#undef MACHO_SYMBOL_FLAG_VARIABLE #undef MACHO_SYMBOL_FLAG_VARIABLE

View File

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

View File

@ -2011,11 +2011,13 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
ix86_output_addr_diff_elt ((FILE), (VALUE), (REL)) ix86_output_addr_diff_elt ((FILE), (VALUE), (REL))
/* Under some conditions we need jump tables in the text section, because /* Under some conditions we need jump tables in the text section,
the assembler cannot handle label differences between sections. */ 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 \ #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, /* 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 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 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 else true; fi
$(LN_S) libgcc_s.1.dylib \ $(LN_S) libgcc_s.1.dylib \
$(DESTDIR)$(slibdir)/libgcc_s_ppc64.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 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> 2006-09-08 Joseph S. Myers <joseph@codesourcery.com>
PR c/28504 PR c/28504
@ -127,7 +145,7 @@
* g++.dg/template/typedef4.C: Adjust error markers. * g++.dg/template/typedef4.C: Adjust error markers.
* g++.dg/template/typedef5.C: Likewise. * g++.dg/template/typedef5.C: Likewise.
2006-09-02 Jakub Jelinek <jakub@redhat.com> 2006-09-02 Jakub Jelinek <jakub@redhat.com>
PR c++/28878 PR c++/28878
@ -244,8 +262,8 @@
2006-08-27 Lee Millward <lee.millward@codesourcery.com> 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
PR c++/26573 PR c++/26573
* g++.dg/other/static2.C: New test. * g++.dg/other/static2.C: New test.
2006-08-26 Roger Sayle <roger@eyesopen.com> 2006-08-26 Roger Sayle <roger@eyesopen.com>
* gcc.dg/Wswitch-enum-2.c: New test case. * gcc.dg/Wswitch-enum-2.c: New test case.
@ -270,7 +288,7 @@
* g++.dg/template/void4.C: Likewise. * g++.dg/template/void4.C: Likewise.
* g++.dg/template/crash55.C: Likewise. * g++.dg/template/crash55.C: Likewise.
* g++.dg/template/void7.C: Likewise * g++.dg/template/void7.C: Likewise
2006-08-26 Mark Mitchell <mark@codesourcery.com> 2006-08-26 Mark Mitchell <mark@codesourcery.com>
PR c++/28588 PR c++/28588
@ -375,7 +393,7 @@
2006-08-23 Danny Smith <dannysmith@users.sourceforge.net> 2006-08-23 Danny Smith <dannysmith@users.sourceforge.net>
gcc.dg/attr-invalid.c: Insert an " |directive" substitution into gcc.dg/attr-invalid.c: Insert an " |directive" substitution into
dg-warning strings for dllimport. dg-warning strings for dllimport.
2006-08-22 Andrew Pinski <pinskia@physics.uc.edu> 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
@ -413,17 +431,17 @@
* g++.dg/parse/ctor8.C: Likewise. * g++.dg/parse/ctor8.C: Likewise.
PR c++/28741 PR c++/28741
* g++.dg/template/void7.C: New test. * g++.dg/template/void7.C: New test.
2006-08-21 Olivier Hainque <hainque@adacore.com> 2006-08-21 Olivier Hainque <hainque@adacore.com>
* gnat.dg/self_aggregate_with_zeros.adb: New test. * gnat.dg/self_aggregate_with_zeros.adb: New test.
* gnat.dg/self_aggregate_with_array.adb: New test. * gnat.dg/self_aggregate_with_array.adb: New test.
2006-08-21 Mark Shinwell <shinwell@codesourcery.com> 2006-08-21 Mark Shinwell <shinwell@codesourcery.com>
* g++.dg/eh/arm-vfp-unwind.C: New test. * g++.dg/eh/arm-vfp-unwind.C: New test.
2006-08-20 Mark Mitchell <mark@codesourcery.com> 2006-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/28341 PR c++/28341
@ -462,7 +480,7 @@
* gfortran.dg/array_initializer_2.f90: New test. * gfortran.dg/array_initializer_2.f90: New test.
PR fortran/18111 PR fortran/18111
* gfortran.dg/unused_artificial_dummies_1.f90: New test. * gfortran.dg/unused_artificial_dummies_1.f90: New test.
PR fortran/28600 PR fortran/28600
* gfortran.dg/assumed_charlen_function_4.f90: New test. * gfortran.dg/assumed_charlen_function_4.f90: New test.
@ -562,7 +580,7 @@
PR c++/28594 PR c++/28594
* g++.dg/template/void6.C: New test. * g++.dg/template/void6.C: New test.
2006-08-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-08-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/28649 PR c/28649
@ -658,7 +676,7 @@
PR c++/28640 PR c++/28640
* g++.dg/template/void5.C: New test. * g++.dg/template/void5.C: New test.
2006-08-07 Danny Smith <dannysmith@users.sourceforge.net> 2006-08-07 Danny Smith <dannysmith@users.sourceforge.net>
* g++.dg/ext/visibility/class1.C (dg-require-visibility): Move * g++.dg/ext/visibility/class1.C (dg-require-visibility): Move
@ -725,7 +743,7 @@
2006-08-03 Lee Millward <lee.millward@codesourcery.com> 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
PR c++/28347 PR c++/28347
* g++.dg/ext/typedef-init.C: Add new test for typedef * g++.dg/ext/typedef-init.C: Add new test for typedef
initialization inside templates. Adjust existing error markers. initialization inside templates. Adjust existing error markers.
2006-08-03 Mark Mitchell <mark@codesourcery.com> 2006-08-03 Mark Mitchell <mark@codesourcery.com>
@ -736,14 +754,14 @@
2006-08-03 Dorit Nuzman <dorit@il.ibm.com> 2006-08-03 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/27770 PR tree-optimization/27770
* lib/target-support.exp: New target keyword "section_anchors". * lib/target-support.exp: New target keyword "section_anchors".
* gcc.dg/vect/vect.exp: Add -fsection-anchors to compilation of some * gcc.dg/vect/vect.exp: Add -fsection-anchors to compilation of some
tests. tests.
* gcc.dg/vect/section-anchors-pr27770.c: New test. * gcc.dg/vect/section-anchors-pr27770.c: New test.
* gcc.dg/vect/vect-69.c: Removed. Replaced by: * gcc.dg/vect/vect-69.c: Removed. Replaced by:
* gcc.dg/vect/section-anchors-vect-69.c: New test. * gcc.dg/vect/section-anchors-vect-69.c: New test.
* gcc.dg/vect/no-section-anchors-vect-69.c: New test. * gcc.dg/vect/no-section-anchors-vect-69.c: New test.
2006-08-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2006-08-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* gcc.dg/20060801-1.c: Add missing '}'. * gcc.dg/20060801-1.c: Add missing '}'.
@ -863,7 +881,7 @@
* g++.dg/template/void2.C: Adjust error markers. * g++.dg/template/void2.C: Adjust error markers.
* g++.dg/template/nontype5.C: Adjust error markers. * g++.dg/template/nontype5.C: Adjust error markers.
2006-07-27 Arjan van de Ven <arjan@linux.intel.com> 2006-07-27 Arjan van de Ven <arjan@linux.intel.com>
* gcc.target/i386/stack-prot-kernel.c: New test. * gcc.target/i386/stack-prot-kernel.c: New test.
@ -921,7 +939,7 @@
* gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to * gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to
avoid memcpy optimization. avoid memcpy optimization.
2006-07-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2006-07-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25289 PR fortran/25289
@ -1004,7 +1022,7 @@
PR c++/28260 PR c++/28260
* g++.dg/template/friend44.C: New test. * g++.dg/template/friend44.C: New test.
2006-07-18 Steve Ellcey <sje@cup.hp.com> 2006-07-18 Steve Ellcey <sje@cup.hp.com>
PR c++/27495 PR c++/27495
@ -1014,7 +1032,7 @@
* gnat.dg/outer_agg_bitfield_constructor.adb: New test. * gnat.dg/outer_agg_bitfield_constructor.adb: New test.
* gnat.dg/nested_agg_bitfield_constructor.adb: New test. * gnat.dg/nested_agg_bitfield_constructor.adb: New test.
2006-07-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-07-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/28286 PR c/28286
@ -1087,7 +1105,7 @@
PR c++/28269 PR c++/28269
* g++.dg/template/crash54.C: New test. * g++.dg/template/crash54.C: New test.
2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28249 PR c++/28249
@ -1143,7 +1161,7 @@
PR c++/27820 PR c++/27820
* g++.dg/other/label1.C: New test. * g++.dg/other/label1.C: New test.
2006-07-07 Richard Guenther <rguenther@suse.de> 2006-07-07 Richard Guenther <rguenther@suse.de>
PR middle-end/28268 PR middle-end/28268
@ -1289,7 +1307,7 @@
PR c++/28054 PR c++/28054
* g++.dg/other/incomplete3.C: New test. * g++.dg/other/incomplete3.C: New test.
2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr> 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/28081 PR fortran/28081
@ -1305,7 +1323,7 @@
* gnat.dg/scalar_mode_agg_compare_loop.adb: New test. * gnat.dg/scalar_mode_agg_compare_loop.adb: New test.
* gnat.dg/scalar_mode_agg_compare.adb: New test. * gnat.dg/scalar_mode_agg_compare.adb: New test.
2006-06-23 Janis Johnson <janis187@us.ibm.com> 2006-06-23 Janis Johnson <janis187@us.ibm.com>
* gcc.dg/dfp/usual-arith-conv-bad.c: New test. * gcc.dg/dfp/usual-arith-conv-bad.c: New test.
@ -1318,7 +1336,7 @@
2006-06-23 Lee Millward <lee.millward@gmail.com> 2006-06-23 Lee Millward <lee.millward@gmail.com>
* g++.dg/template/error22.C: Fix typo. * g++.dg/template/error22.C: Fix typo.
2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28112 PR c++/28112
@ -1327,7 +1345,7 @@
2006-06-23 Olivier Hainque <hainque@adacore.com> 2006-06-23 Olivier Hainque <hainque@adacore.com>
* gnat.dg/varsize_temp.adb: New test. * gnat.dg/varsize_temp.adb: New test.
2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/11468 PR c++/11468
@ -1361,7 +1379,7 @@
PR c++/27821 PR c++/27821
* g++.dg/template/error22.C: New test. * g++.dg/template/error22.C: New test.
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28111 PR c++/28111
@ -1475,7 +1493,7 @@
* g++.dg/template/static26.C: New test. * g++.dg/template/static26.C: New test.
PR c++/27979 PR c++/27979
* g++.dg/expr/bitfield2.C: New test. * g++.dg/expr/bitfield2.C: New test.
PR c++/27884 PR c++/27884
* g++.dg/parse/linkage2.C: New test. * g++.dg/parse/linkage2.C: New test.
@ -1531,7 +1549,7 @@
PR c++/26559 PR c++/26559
* g++.dg/template/builtin1.C: New test. * g++.dg/template/builtin1.C: New test.
* g++.dg/gomp/tpl-atomic-2.C: Remove XFAIL. * g++.dg/gomp/tpl-atomic-2.C: Remove XFAIL.
PR c++/28018 PR c++/28018
* g++.old-deja/g++.benjamin/14664-2.C: Expect error for array * g++.old-deja/g++.benjamin/14664-2.C: Expect error for array
assignment. assignment.
@ -1560,7 +1578,7 @@
2006-06-13 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> 2006-06-13 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* gcc.c-torture/compile/20060609-1.c: New test. * gcc.c-torture/compile/20060609-1.c: New test.
PR target/27863 PR target/27863
* gcc.c-torture/compile/pr27863.c: New test. * gcc.c-torture/compile/pr27863.c: New test.

View File

@ -1,5 +1,6 @@
/* Test for MS structure sizes. */ /* 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" } */ /* { dg-options "-std=gnu99" } */
extern void abort (); extern void abort ();

View File

@ -1,5 +1,6 @@
/* Test for MS structure sizes. */ /* 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" } */ /* { dg-options "-std=gnu99" } */
extern void abort (); extern void abort ();

View File

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

View File

@ -4,15 +4,15 @@
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# This file used to be gcc.c-torture/special/special.exp, which # This file used to be gcc.c-torture/special/special.exp, which
# was written by Rob Savoye. (rob@cygnus.com) # was written by Rob Savoye. (rob@cygnus.com)
@ -73,7 +73,14 @@ if [isnative] then {
} elseif [ string match "*32-bit*" $file_string ] { } elseif [ string match "*32-bit*" $file_string ] {
set native_cflags "-m32" 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 { if [file exists "linkage-y.o"] then {
file delete "linkage-y.o" file delete "linkage-y.o"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
/* { dg-do compile { target lp64 } } */ /* { dg-do compile { target lp64 } } */
/* { dg-skip-if "darwin x86_64 is pic" { *-*-darwin* } { "-m64" } { "" } } */
/* { dg-options "-O2 -fstack-protector-all -mcmodel=kernel" } */ /* { dg-options "-O2 -fstack-protector-all -mcmodel=kernel" } */
void test1 (int x) 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> 2006-08-14 Steve Ellcey <sje@cup.hp.com>
PR c++/28288 PR c++/28288
@ -120,7 +124,7 @@
2005-11-09 Per Bothner <per@bothner.com> 2005-11-09 Per Bothner <per@bothner.com>
Uros Bizjak <uros@kss-loka.si> Uros Bizjak <uros@kss-loka.si>
PR c/24101 PR c/24101
* init.c (read_original_filename): Temporarily set * init.c (read_original_filename): Temporarily set
state.in_directive before calling _cpp_lex_direct for state.in_directive before calling _cpp_lex_direct for
@ -162,7 +166,7 @@
Use in print_dep assignment. Use in print_dep assignment.
* init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file. * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
* internal.h (_cpp_find_file): Add new parm to declaration. * internal.h (_cpp_find_file): Add new parm to declaration.
2005-10-08 Kazu Hirata <kazu@codesourcery.com> 2005-10-08 Kazu Hirata <kazu@codesourcery.com>
* configure.ac: Require 64-bit int for arm*-*-*eabi*. * configure.ac: Require 64-bit int for arm*-*-*eabi*.

6
libcpp/configure vendored
View File

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

View File

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