* opts.c (decode_options): Set max-fields-for-field-sensitive to
100 for optimize >= 2.
-2008-07-04 Kai Tietz <kai.tietz@onevision.com>
-
- * config.gcc (extra_headers): Add cross-stdarg.h for target
- x86_64-*-* and i?86-*-*.
- * config/i386/cross-stdarg.h: New.
- * builtins.c (std_fn_abi_va_list): New.
- (std_canonical_va_list_type): New.
- (stabilize_va_list): Replace va_list_type_node use by
- mtarget.canonical_va_list_type.
- (gimplify_va_arg_expr): Likewise.
- (expand_builtin_va_copy): Replace va_list_type_node use by
- mtarget.fn_abi_va_list.
- * tree-sra.c (is_va_list_type): New helper.
- (decl_can_be_decomposed_p): Replace
- va_list_type_node use by is_va_list_type.
- * tree-ssa-ccp.c (optimize_stdarg_builtin): Likewise.
- * tree-stdarg.c (execute_optimize_stdarg): Likewise.
- * c-common.c (c_common_nodes_and_builtins): Use TARGET_ENUM_VA_LIST.
- * config/i386/i386-protos.h (ix86_get_valist_type): New.
- (ix86_enum_va_list): New.
- * config/i386/i386.c (sysv_va_list_type_node): New.
- (ms_va_list_type_node): New.
- (ix86_function_type_abi): Remove sorry.
- (ix86_build_builtin_va_list_abi): New.
- (ix86_build_builtin_va_list): Call ix86_build_builtin_va_list_abi
- for 64-bit targets.
- (ix86_va_start): Replace va_list_type_node by sysv_va_list_type_node.
- (ix86_init_builtins_va_builtins_abi): New.
- (ix86_init_builtins): Use ix86_init_builtins_va_builtins_abi
- for 64-bit targets.
- (ix86_handle_abi_attribute): New.
- (attribute_spec): Add sysv_abi and ms_abi.
- (ix86_fn_abi_va_list): New.
- (ix86_canonical_va_list_type): New.
- (ix86_enum_va_list): New.
- (TARGET_FN_ABI_VA_LIST): New.
- (TARGET_CANONICAL_VA_LIST_TYPE): New.
- * config/i386/i386.h (TARGET_ENUM_VA_LIST): New.
- * doc/tm.texi (TARGET_FN_ABI_VA_LIST): New.
- (TARGET_CANONICAL_VA_LIST_TYPE): New.
- (TARGET_ENUM_VA_LIST): New.
- * expr.h (std_fn_abi_va_list): New.
- (std_canonical_va_list_type): New.
- * target-def.h (TARGET_FN_ABI_VA_LIST): New.
- (TARGET_CANONICAL_VA_LIST_TYPE): New.
- (TARGET_INITIALIZER): Add TARGET_FN_ABI_VA_LIST and
- TARGET_CANONICAL_VA_LIST_TYPE.
- * target.h (struct gcc_target): Add fn_abi_va_list hook
- and canonical_va_list_type hook.
-
2008-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* ggc-zone.c (lookup_page_table_if_allocated,
+++ /dev/null
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
- 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.
-
- 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. */
-
-/* As a special exception, if you include this header file into source
- files compiled by GCC, this header file does not by itself cause
- the resulting executable to be covered by the GNU General Public
- License. This exception does not however invalidate any other
- reasons why the executable file might be covered by the GNU General
- Public License. */
-
-#ifndef __CROSS_STDARG_H_INCLUDED
-#define __CROSS_STDARG_H_INCLUDED
-
-/* Make sure that for non x64 targets cross builtins are defined. */
-#ifndef __x86_64__
-/* Call abi ms_abi. */
-#define __builtin_ms_va_list __builtin_va_list
-#define __builtin_ms_va_copy __builtin_va_copy
-#define __builtin_ms_va_start __builtin_va_start
-#define __builtin_ms_va_end __builtin_va_end
-
-/* Call abi sysv_abi. */
-#define __builtin_sysv_va_list __builtin_va_list
-#define __builtin_sysv_va_copy __builtin_va_copy
-#define __builtin_sysv_va_start __builtin_va_start
-#define __builtin_sysv_va_end __builtin_va_end
-#endif
-
-#define __ms_va_copy(__d,__s) __builtin_ms_va_copy(__d,__s)
-#define __ms_va_start(__v,__l) __builtin_ms_va_start(__v,__l)
-#define __ms_va_arg(__v,__l) __builtin_va_arg(__v,__l)
-#define __ms_va_end(__v) __builtin_ms_va_end(__v)
-
-#define __sysv_va_copy(__d,__s) __builtin_sysv_va_copy(__d,__s)
-#define __sysv_va_start(__v,__l) __builtin_sysv_va_start(__v,__l)
-#define __sysv_va_arg(__v,__l) __builtin_va_arg(__v,__l)
-#define __sysv_va_end(__v) __builtin_sysv_va_end(__v)
-
-#ifndef __GNUC_SYSV_VA_LIST
-#define __GNUC_SYSV_VA_LIST
- typedef __builtin_sysv_va_list __gnuc_sysv_va_list;
-#endif
-
-#ifndef _SYSV_VA_LIST_DEFINED
-#define _SYSV_VA_LIST_DEFINED
- typedef __gnuc_sysv_va_list sysv_va_list;
-#endif
-
-#ifndef __GNUC_MS_VA_LIST
-#define __GNUC_MS_VA_LIST
- typedef __builtin_ms_va_list __gnuc_ms_va_list;
-#endif
-
-#ifndef _MS_VA_LIST_DEFINED
-#define _MS_VA_LIST_DEFINED
- typedef __gnuc_ms_va_list ms_va_list;
-#endif
-
-#endif /* __CROSS_STDARG_H_INCLUDED */
* gcc.dg/tree-ssa/pta-callused.c: New testcase.
-2008-07-04 Kai Tietz <kai.tietz@onevision.com>
-
- * gcc.dg/callabi/callabi.h: New.
- * gcc.dg/callabi/vaarg-1.c: New.
- * gcc.dg/callabi/vaarg-2.c: New.
- * gcc.dg/callabi/vaarg-3.c: New.
- * gcc.dg/callabi/func-1.c: New.
-
2008-07-04 Richard Sandiford <richard@codesourcery.com>
* gcc.target/m68k/interrupt-2.c: New file.
+++ /dev/null
-/* First the default target definition. */
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
- typedef __builtin_va_list __gnuc_va_list;
-#endif
-
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
- typedef __gnuc_va_list va_list;
-#endif
-
-#define __va_copy(d,s) __builtin_va_copy(d,s)
-#define __va_start(v,l) __builtin_va_start(v,l)
-#define __va_arg(v,l) __builtin_va_arg(v,l)
-#define __va_end(v) __builtin_va_end(v)
-
-#define __ms_va_copy(d,s) __builtin_ms_va_copy(d,s)
-#define __ms_va_start(v,l) __builtin_ms_va_start(v,l)
-#define __ms_va_arg(v,l) __builtin_va_arg(v,l)
-#define __ms_va_end(v) __builtin_ms_va_end(v)
-
-#define __sysv_va_copy(d,s) __builtin_sysv_va_copy(d,s)
-#define __sysv_va_start(v,l) __builtin_sysv_va_start(v,l)
-#define __sysv_va_arg(v,l) __builtin_va_arg(v,l)
-#define __sysv_va_end(v) __builtin_sysv_va_end(v)
-
-#define CALLABI_NATIVE
-
-#ifdef _WIN64
-#define CALLABI_CROSS __attribute__ ((sysv_abi))
-
-#define CROSS_VA_LIST __builtin_sysv_va_list
-
-#define CROSS_VA_COPY(d,s) __sysv_va_copy(d,s)
-#define CROSS_VA_START(v,l) __sysv_va_start(v,l)
-#define CROSS_VA_ARG(v,l) __sysv_va_arg(v,l)
-#define CROSS_VA_END(v) __sysv_va_end(v)
-
-#else
-
-#define CALLABI_CROSS __attribute__ ((ms_abi))
-
-#define CROSS_VA_LIST __builtin_ms_va_list
-
-#define CROSS_VA_COPY(d,s) __ms_va_copy(d,s)
-#define CROSS_VA_START(v,l) __ms_va_start(v,l)
-#define CROSS_VA_ARG(v,l) __ms_va_arg(v,l)
-#define CROSS_VA_END(v) __ms_va_end(v)
-
-#endif
\ No newline at end of file
+++ /dev/null
-/* Test for cross x86_64<->w64 abi standard calls.
-*/
-/* Origin: Kai Tietz <kai.tietz@onevision.com> */
-/* { dg-do run { target { x86_64-*-* } } } */
-/* { dg-options "-std=gnu99 -ffast-math" } */
-#include "callabi.h"
-
-extern void abort (void);
-
-long double
-CALLABI_CROSS func_cross (long double a, double b, float c, long d, int e,
- char f)
-{
- long double ret;
- ret = a + (long double) b + (long double) c;
- ret *= (long double) (d + (long) e);
- if (f>0)
- ret += func_cross (a,b,c,d,e,-f);
- return ret;
-}
-
-long double
-CALLABI_NATIVE func_native (long double a, double b, float c, long d, int e,
- char f)
-{
- long double ret;
- ret = a + (long double) b + (long double) c;
- ret *= (long double) (d + (long) e);
- if (f>0)
- ret += func_native (a,b,c,d,e,-f);
- return ret;
-}
-
-int main ()
-{
- if (func_cross (1.0,2.0,3.0,1,2,3)
- != func_native (1.0,2.0,3.0,1,2,3))
- abort ();
- return 0;
-}
\ No newline at end of file
+++ /dev/null
-/* Test for cross x86_64<->w64 abi va_list calls.
-*/
-/* Origin: Kai Tietz <kai.tietz@onevision.com> */
-/* { dg-do run { target { x86_64-*-* } } } */
-/* { dg-options "-std=gnu99" } */
-#include "callabi.h"
-
-extern __SIZE_TYPE__ strlen (const char *);
-extern int sprintf (char *,const char *, ...);
-extern void abort (void);
-
-static
-void CALLABI_CROSS vdo_cpy (char *s, CROSS_VA_LIST argp)
-{
- __SIZE_TYPE__ len;
- char *r = s;
- char *e;
- *r = 0;
- for (;;) {
- e = CROSS_VA_ARG (argp,char *);
- if (*e == 0) break;
- sprintf (r,"%s", e);
- r += strlen (r);
- }
-}
-
-static
-void CALLABI_CROSS do_cpy (char *s, ...)
-{
- CROSS_VA_LIST argp;
- CROSS_VA_START (argp, s);
- vdo_cpy (s, argp);
- CROSS_VA_END (argp);
-}
-
-int main ()
-{
- char s[256];
-
- do_cpy (s, "1","2","3","4", "5", "6", "7", "");
-
- if (s[0] != '1' || s[1] !='2' || s[2] != '3' || s[3] != '4'
- || s[4] != '5' || s[5] != '6' || s[6] != '7' || s[7] != 0)
- abort ();
-
- return 0;
-}
+++ /dev/null
-/* Test for cross x86_64<->w64 abi va_list calls.
-*/
-/* Origin: Kai Tietz <kai.tietz@onevision.com> */
-/* { dg-do run { target { x86_64-*-* } } } */
-/* { dg-options "-std=gnu99" } */
-#include "callabi.h"
-
-extern void abort (void);
-
-#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
-
-static
-int CALLABI_CROSS fct1 (va_list argp, ...)
-{
- long long p1,p2;
- int ret = 1;
- CROSS_VA_LIST argp_2;
- CROSS_VA_START (argp_2,argp);
-
- do {
- p1 = CROSS_VA_ARG (argp_2, long long);
- p2 = __va_arg (argp, long long);
- if (p1 != p2)
- ret = 0;
- } while (ret && p1 != 0);
- CROSS_VA_END (argp_2);
- return ret;
-}
-
-static
-int fct2 (int dummy, ...)
-{
- va_list argp;
- int ret = dummy;
-
- __va_start (argp, dummy);
- ret += fct1 (argp, SZ_ARGS);
- __va_end (argp);
- return ret;
-}
-
-int main()
-{
- if (fct2 (-1, SZ_ARGS) != 0)
- abort ();
- return 0;
-}
+++ /dev/null
-/* Test for cross x86_64<->w64 abi va_list calls.
-*/
-/* Origin: Kai Tietz <kai.tietz@onevision.com> */
-/* { dg-do run { target { x86_64-*-* } } } */
-/* { dg-options "-std=gnu99" } */
-#include "callabi.h"
-
-extern void abort (void);
-
-#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
-
-static
-int fct1 (CROSS_VA_LIST argp, ...)
-{
- long long p1,p2;
- int ret = 1;
- va_list argp_2;
-
- __va_start (argp_2,argp);
- do {
- p1 = __va_arg (argp_2, long long);
- p2 = CROSS_VA_ARG (argp, long long);
- if (p1 != p2)
- ret = 0;
- } while (ret && p1 != 0);
- __va_end (argp_2);
- return ret;
-}
-
-static
-int CALLABI_CROSS fct2 (int dummy, ...)
-{
- CROSS_VA_LIST argp;
- int ret = dummy;
-
- CROSS_VA_START (argp, dummy);
- ret += fct1 (argp, SZ_ARGS);
- CROSS_VA_END (argp);
- return ret;
-}
-
-int main()
-{
- if (fct2 (-1, SZ_ARGS) != 0)
- abort ();
- return 0;
-}