c4x symbol_ref_flags usage
Richard Henderson
rth@twiddle.net
Thu Apr 17 05:11:00 GMT 2003
Yet another target that only marked whether the symbol
referred to a function.
Plus a small compile fix, in the form of an awful hack.
I seem to recall Zack and Eric iterating on some change
to the flags related to inlining, so I thought I'd not
do anything more complex for the nonce.
r~
* config/c4x/c4x.c (c4x_encode_section_info): Remove.
(c4x_T_constraint): Use SYMBOL_REF_FUNCTION_P.
* config/c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): Declare
flag_inline_trees.
Index: c4x.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.c,v
retrieving revision 1.123
diff -c -p -d -u -r1.123 c4x.c
--- c4x.c 24 Mar 2003 17:53:30 -0000 1.123
+++ c4x.c 17 Apr 2003 05:05:56 -0000
@@ -195,7 +195,6 @@ const struct attribute_spec c4x_attribut
static void c4x_insert_attributes PARAMS ((tree, tree *));
static void c4x_asm_named_section PARAMS ((const char *, unsigned int));
static int c4x_adjust_cost PARAMS ((rtx, rtx, rtx, int));
-static void c4x_encode_section_info PARAMS ((tree, int));
static void c4x_globalize_label PARAMS ((FILE *, const char *));
static bool c4x_rtx_costs PARAMS ((rtx, int, int, int *));
static int c4x_address_cost PARAMS ((rtx));
@@ -223,9 +222,6 @@ static int c4x_address_cost PARAMS ((rtx
#undef TARGET_SCHED_ADJUST_COST
#define TARGET_SCHED_ADJUST_COST c4x_adjust_cost
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO c4x_encode_section_info
-
#undef TARGET_ASM_GLOBALIZE_LABEL
#define TARGET_ASM_GLOBALIZE_LABEL c4x_globalize_label
@@ -1455,19 +1451,6 @@ c4x_emit_libcall_mulhi (libcall, code, m
}
-/* Set the SYMBOL_REF_FLAG for a function decl. However, wo do not
- yet use this info. */
-
-static void
-c4x_encode_section_info (decl, first)
- tree decl;
- int first ATTRIBUTE_UNUSED;
-{
- if (TREE_CODE (decl) == FUNCTION_DECL)
- SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
-}
-
-
int
c4x_check_legit_addr (mode, addr, strict)
enum machine_mode mode;
@@ -2909,7 +2892,7 @@ c4x_T_constraint (op)
/* Allow call operands. */
return GET_CODE (op) == SYMBOL_REF
&& GET_MODE (op) == Pmode
- && SYMBOL_REF_FLAG (op);
+ && SYMBOL_REF_FUNCTION_P (op);
}
/* HImode and HFmode are not offsettable. */
Index: c4x.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.h,v
retrieving revision 1.124
diff -c -p -d -u -r1.124 c4x.h
--- c4x.h 13 Mar 2003 04:06:50 -0000 1.124
+++ c4x.h 17 Apr 2003 05:05:56 -0000
@@ -29,6 +29,8 @@
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
+ /* ??? HACK. We shouldn't have flag_inline_trees at all. */ \
+ extern int flag_inline_trees; \
if (!TARGET_SMALL) \
builtin_define ("_BIGMODEL"); \
if (!TARGET_MEMPARM) \
More information about the Gcc-patches
mailing list