utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes.

ada/
	* ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES
	with targetm.calls.promote_prototypes.

	gcc/
	* config/cris/cris.h: Replace PROMOTE_PROTOTYPES with
	TARGET_PROMOTE_PROTOTYPES.

	cp/
	* call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
	targetm.calls.promote_prototypes.

	java/
	* Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
	Depend on target.h.
	* decl.c: Include target.h.
	(start_java_method): Replace PROMOTE_PROTOTYPES with
	targetm.calls.promote_prototypes.
	* expr.c: Include target.h.
	(pop_arguments): Replace PROMOTE_PROTOTYPES with
	targetm.calls.promote_prototypes.
	* parse.y: Include target.h.
	(start_complete_expand_method): Replace PROMOTE_PROTOTYPES
	with targetm.calls.promote_prototypes.

From-SVN: r77345
This commit is contained in:
Kazu Hirata 2004-02-05 22:07:33 +00:00 committed by Kazu Hirata
parent 839ee4bc57
commit 136e64db5e
11 changed files with 46 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* config/cris/cris.h: Replace PROMOTE_PROTOTYPES with
TARGET_PROMOTE_PROTOTYPES.
2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR middle-end/13750

View File

@ -1,3 +1,8 @@
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES
with targetm.calls.promote_prototypes.
2004-02-04 Robert Dewar <dewar@gnat.com>
* 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb,

View File

@ -1540,11 +1540,11 @@ create_param_decl (tree param_name, tree param_type, int readonly)
{
tree param_decl = build_decl (PARM_DECL, param_name, param_type);
/* Honor the PROMOTE_PROTOTYPES target macro, as not doing so can
/* Honor targetm.calls.promote_prototypes(), as not doing so can
lead to various ABI violations. */
#ifdef PROMOTE_PROTOTYPES
if ((TREE_CODE (param_type) == INTEGER_TYPE
|| TREE_CODE (param_type) == ENUMERAL_TYPE)
if (targetm.calls.promote_prototypes (param_type)
&& (TREE_CODE (param_type) == INTEGER_TYPE
|| TREE_CODE (param_type) == ENUMERAL_TYPE)
&& TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
{
/* We have to be careful about biased types here. Make a subtype
@ -1562,7 +1562,6 @@ create_param_decl (tree param_name, tree param_type, int readonly)
else
param_type = integer_type_node;
}
#endif
DECL_ARG_TYPE (param_decl) = param_type;
DECL_ARG_TYPE_AS_WRITTEN (param_decl) = param_type;

View File

@ -479,7 +479,7 @@ extern int target_flags;
/* A combination of defining PROMOTE_MODE,
TARGET_PROMOTE_FUNCTION_ARGS that always returns true,
PROMOTE_FOR_CALL_ONLY and *not* defining PROMOTE_PROTOTYPES gives the
PROMOTE_FOR_CALL_ONLY and *not* defining TARGET_PROMOTE_PROTOTYPES gives the
best code size and speed for gcc, ipps and products in gcc-2.7.2. */
#define CRIS_PROMOTED_MODE(MODE, UNSIGNEDP, TYPE) \
(GET_MODE_CLASS (MODE) == MODE_INT && GET_MODE_SIZE (MODE) < 4) \

View File

@ -1,3 +1,8 @@
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR middle-end/13750

View File

@ -4245,7 +4245,7 @@ type_passed_as (tree type)
/* Pass classes with copy ctors by invisible reference. */
if (TREE_ADDRESSABLE (type))
type = build_reference_type (type);
else if (PROMOTE_PROTOTYPES
else if (targetm.calls.promote_prototypes (type)
&& INTEGRAL_TYPE_P (type)
&& COMPLETE_TYPE_P (type)
&& INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
@ -4265,7 +4265,7 @@ convert_for_arg_passing (tree type, tree val)
/* Pass classes with copy ctors by invisible reference. */
else if (TREE_ADDRESSABLE (type))
val = build1 (ADDR_EXPR, build_reference_type (type), val);
else if (PROMOTE_PROTOTYPES
else if (targetm.calls.promote_prototypes (type)
&& INTEGRAL_TYPE_P (type)
&& COMPLETE_TYPE_P (type)
&& INT_CST_LT_UNSIGNED (TYPE_SIZE (type),

View File

@ -1,3 +1,17 @@
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
Depend on target.h.
* decl.c: Include target.h.
(start_java_method): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* expr.c: Include target.h.
(pop_arguments): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* parse.y: Include target.h.
(start_complete_expand_method): Replace PROMOTE_PROTOTYPES
with targetm.calls.promote_prototypes.
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Update copyright.

View File

@ -292,14 +292,15 @@ java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-constants.h
java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \
toplev.h flags.h $(SYSTEM_H) coretypes.h $(TM_H) function.h expr.h \
libfuncs.h except.h java/java-except.h $(GGC_H) real.h gt-java-decl.h
libfuncs.h except.h java/java-except.h $(GGC_H) real.h gt-java-decl.h \
target.h
java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
$(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \
toplev.h $(SYSTEM_H) coretypes.h $(TM_H) function.h
java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
$(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \
java/java-except.h java/java-except.h java/parse.h toplev.h \
$(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h
$(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h target.h
java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) java/jcf.h
java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \
@ -336,7 +337,7 @@ java/parse-scan.o: java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) toplev.h $(JAVA_LEX_C) java/parse.h java/lex.h input.h
java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h \
java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h
java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h target.h
# jcf-io.o needs $(ZLIBINC) added to cflags.
java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \

View File

@ -45,6 +45,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "ggc.h"
#include "timevar.h"
#include "tree-inline.h"
#include "target.h"
#if defined (DEBUG_JAVA_BINDING_LEVELS)
extern void indent (void);
@ -1758,7 +1759,7 @@ start_java_method (tree fndecl)
parm_decl = build_decl (PARM_DECL, parm_name, parm_type);
DECL_CONTEXT (parm_decl) = fndecl;
if (PROMOTE_PROTOTYPES
if (targetm.calls.promote_prototypes (parm_type)
&& TYPE_PRECISION (parm_type) < TYPE_PRECISION (integer_type_node)
&& INTEGRAL_TYPE_P (parm_type))
parm_type = integer_type_node;

View File

@ -43,6 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "toplev.h"
#include "except.h"
#include "ggc.h"
#include "target.h"
static void flush_quick_stack (void);
static void push_value (tree);
@ -1674,7 +1675,7 @@ pop_arguments (tree arg_types)
tree tail = pop_arguments (TREE_CHAIN (arg_types));
tree type = TREE_VALUE (arg_types);
tree arg = pop_value (type);
if (PROMOTE_PROTOTYPES
if (targetm.calls.promote_prototypes (type)
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
&& INTEGRAL_TYPE_P (type))
arg = convert (integer_type_node, arg);

View File

@ -72,6 +72,7 @@ definitions and other extensions. */
#include "debug.h"
#include "tree-inline.h"
#include "cgraph.h"
#include "target.h"
/* Local function prototypes */
static char *java_accstring_lookup (int);
@ -7990,7 +7991,7 @@ start_complete_expand_method (tree mdecl)
/* TREE_CHAIN (tem) will change after pushdecl. */
tree next = TREE_CHAIN (tem);
tree type = TREE_TYPE (tem);
if (PROMOTE_PROTOTYPES
if (targetm.calls.promote_prototypes (type)
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)
&& INTEGRAL_TYPE_P (type))
type = integer_type_node;