Commit 89e6b702 by Richard Henderson Committed by Richard Henderson

rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New.

        * rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New.

        * config/m32r/m32r.c (SYMBOL_FLAG_MODEL_SHIFT): New.
        (SYMBOL_REF_MODEL): New.
        (LIT_NAME_P): Move from m32r.h.
        (m32r_select_section): Remove.
        (m32r_encode_section_info): Use SYMBOL_REF_FLAGS.
        (m32r_strip_name_encoding): Remove.
        (m32r_in_small_data_p): New.
        (small_data_operand): Use SYMBOL_REF_SMALL_P.
        (addr24_operand): Use SYMBOL_REF_MODEL.
        (call26_operand): Likewise.
        (addr32_operand): Tidy.
        (m32r_print_operand): Use HOST_WIDE_INT_PRINT_HEX.
        * config/m32r/m32r.h (RODATA_SECTION_ASM_OP): Remove.
        (SDATA_SECTION_ASM_OP, SBSS_SECTION_ASM_OP): Remove.
        (READONLY_DATA_SECTION_ASM_OP): Remove.
        (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
        (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Remove.
        (TARGET_ASM_SELECT_SECTION): Remove.
        (SDATA_FLAG_CHAR, MEDIUM_FLAG_CHAR, LARGE_FLAG_CHAR): Remove.
        (SDATA_NAME_P, SMALL_NAME_P, MEDIUM_NAME_P): Remove.
        (LARGE_NAME_P, ENCODED_NAME_P): Remove.
        (ASM_OUTPUT_LABELREF): Remove.

From-SVN: r65731
parent ec94fc00
2003-04-17 Richard Henderson <rth@redhat.com> 2003-04-17 Richard Henderson <rth@redhat.com>
* rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New.
* config/m32r/m32r.c (SYMBOL_FLAG_MODEL_SHIFT): New.
(SYMBOL_REF_MODEL): New.
(LIT_NAME_P): Move from m32r.h.
(m32r_select_section): Remove.
(m32r_encode_section_info): Use SYMBOL_REF_FLAGS.
(m32r_strip_name_encoding): Remove.
(m32r_in_small_data_p): New.
(small_data_operand): Use SYMBOL_REF_SMALL_P.
(addr24_operand): Use SYMBOL_REF_MODEL.
(call26_operand): Likewise.
(addr32_operand): Tidy.
(m32r_print_operand): Use HOST_WIDE_INT_PRINT_HEX.
* config/m32r/m32r.h (RODATA_SECTION_ASM_OP): Remove.
(SDATA_SECTION_ASM_OP, SBSS_SECTION_ASM_OP): Remove.
(READONLY_DATA_SECTION_ASM_OP): Remove.
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
(SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Remove.
(TARGET_ASM_SELECT_SECTION): Remove.
(SDATA_FLAG_CHAR, MEDIUM_FLAG_CHAR, LARGE_FLAG_CHAR): Remove.
(SDATA_NAME_P, SMALL_NAME_P, MEDIUM_NAME_P): Remove.
(LARGE_NAME_P, ENCODED_NAME_P): Remove.
(ASM_OUTPUT_LABELREF): Remove.
2003-04-17 Richard Henderson <rth@redhat.com>
* config/ip2k/ip2k.c (is_regfile_address): Use SYMBOL_REF_FUNCTION_P. * config/ip2k/ip2k.c (is_regfile_address): Use SYMBOL_REF_FUNCTION_P.
(encode_section_info): Remove. (encode_section_info): Remove.
* config/ip2k/ip2k-protos.h: Update. * config/ip2k/ip2k-protos.h: Update.
......
...@@ -60,6 +60,14 @@ enum m32r_sdata m32r_sdata; ...@@ -60,6 +60,14 @@ enum m32r_sdata m32r_sdata;
/* Scheduler support */ /* Scheduler support */
static int m32r_sched_odd_word_p; static int m32r_sched_odd_word_p;
/* Machine-specific symbol_ref flags. */
#define SYMBOL_FLAG_MODEL_SHIFT SYMBOL_FLAG_MACH_DEP_SHIFT
#define SYMBOL_REF_MODEL(X) \
((enum m32r_model) ((SYMBOL_REF_FLAGS (X) >> SYMBOL_FLAG_MODEL_SHIFT) & 3))
/* For string literals, etc. */
#define LIT_NAME_P(NAME) ((NAME)[0] == '*' && (NAME)[1] == '.')
/* Forward declaration. */ /* Forward declaration. */
static void init_reg_tables PARAMS ((void)); static void init_reg_tables PARAMS ((void));
static void block_move_call PARAMS ((rtx, rtx, rtx)); static void block_move_call PARAMS ((rtx, rtx, rtx));
...@@ -76,9 +84,8 @@ static int m32r_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); ...@@ -76,9 +84,8 @@ static int m32r_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int));
static int m32r_variable_issue PARAMS ((FILE *, int, rtx, int)); static int m32r_variable_issue PARAMS ((FILE *, int, rtx, int));
static int m32r_issue_rate PARAMS ((void)); static int m32r_issue_rate PARAMS ((void));
static void m32r_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT));
static void m32r_encode_section_info PARAMS ((tree, int)); static void m32r_encode_section_info PARAMS ((tree, int));
static const char *m32r_strip_name_encoding PARAMS ((const char *)); static bool m32r_in_small_data_p PARAMS ((tree));
static void init_idents PARAMS ((void)); static void init_idents PARAMS ((void));
static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *)); static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *));
...@@ -111,8 +118,8 @@ static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *)); ...@@ -111,8 +118,8 @@ static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *));
#undef TARGET_ENCODE_SECTION_INFO #undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING #undef TARGET_IN_SMALL_DATA_P
#define TARGET_STRIP_NAME_ENCODING m32r_strip_name_encoding #define TARGET_IN_SMALL_DATA_P m32r_in_small_data_p
#undef TARGET_RTX_COSTS #undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS m32r_rtx_costs #define TARGET_RTX_COSTS m32r_rtx_costs
...@@ -332,55 +339,13 @@ m32r_handle_model_attribute (node, name, args, flags, no_add_attrs) ...@@ -332,55 +339,13 @@ m32r_handle_model_attribute (node, name, args, flags, no_add_attrs)
return NULL_TREE; return NULL_TREE;
} }
/* A C statement or statements to switch to the appropriate
section for output of DECL. DECL is either a `VAR_DECL' node
or a constant of some sort. RELOC indicates whether forming
the initial value of DECL requires link-time relocations. */
static void
m32r_select_section (decl, reloc, align)
tree decl;
int reloc;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{
if (TREE_CODE (decl) == STRING_CST)
{
if (! flag_writable_strings)
readonly_data_section ();
else
data_section ();
}
else if (TREE_CODE (decl) == VAR_DECL)
{
if (SDATA_NAME_P (XSTR (XEXP (DECL_RTL (decl), 0), 0)))
sdata_section ();
else if ((flag_pic && reloc)
|| !TREE_READONLY (decl)
|| TREE_SIDE_EFFECTS (decl)
|| !DECL_INITIAL (decl)
|| (DECL_INITIAL (decl) != error_mark_node
&& !TREE_CONSTANT (DECL_INITIAL (decl))))
data_section ();
else
readonly_data_section ();
}
else
readonly_data_section ();
}
/* Encode section information of DECL, which is either a VAR_DECL, /* Encode section information of DECL, which is either a VAR_DECL,
FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???. FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???.
For the M32R we want to record: For the M32R we want to record:
- whether the object lives in .sdata/.sbss. - whether the object lives in .sdata/.sbss.
objects living in .sdata/.sbss are prefixed with SDATA_FLAG_CHAR
- what code model should be used to access the object - what code model should be used to access the object
small: recorded with no flag - for space efficiency since they'll
be the most common
medium: prefixed with MEDIUM_FLAG_CHAR
large: prefixed with LARGE_FLAG_CHAR
*/ */
static void static void
...@@ -388,124 +353,91 @@ m32r_encode_section_info (decl, first) ...@@ -388,124 +353,91 @@ m32r_encode_section_info (decl, first)
tree decl; tree decl;
int first; int first;
{ {
char prefix = 0; int extra_flags = 0;
tree model = 0; tree model_attr;
enum m32r_model model;
default_encode_section_info (decl, first);
if (!first) if (!DECL_P (decl))
return; return;
switch (TREE_CODE (decl)) model_attr = lookup_attribute ("model", DECL_ATTRIBUTES (decl));
if (model_attr)
{ {
case VAR_DECL : tree id;
case FUNCTION_DECL :
model = lookup_attribute ("model", DECL_ATTRIBUTES (decl));
break;
case STRING_CST :
case CONSTRUCTOR :
/* ??? document all others that can appear here */
default :
return;
}
/* Only mark the object as being small data area addressable if init_idents ();
it hasn't been explicitly marked with a code model.
The user can explicitly put an object in the small data area with the id = TREE_VALUE (TREE_VALUE (model_attr));
section attribute. If the object is in sdata/sbss and marked with a
code model do both [put the object in .sdata and mark it as being
addressed with a specific code model - don't mark it as being addressed
with an SDA reloc though]. This is ok and might be useful at times. If
the object doesn't fit the linker will give an error. */
if (! model) if (id == small_ident1 || id == small_ident2)
model = M32R_MODEL_SMALL;
else if (id == medium_ident1 || id == medium_ident2)
model = M32R_MODEL_MEDIUM;
else if (id == large_ident1 || id == large_ident2)
model = M32R_MODEL_LARGE;
else
abort (); /* shouldn't happen */
}
else
{ {
if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd' if (TARGET_MODEL_SMALL)
&& DECL_SECTION_NAME (decl) != NULL_TREE) model = M32R_MODEL_SMALL;
{ else if (TARGET_MODEL_MEDIUM)
char *name = (char *) TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); model = M32R_MODEL_MEDIUM;
if (! strcmp (name, ".sdata") || ! strcmp (name, ".sbss")) else if (TARGET_MODEL_LARGE)
{ model = M32R_MODEL_LARGE;
#if 0 /* ??? There's no reason to disallow this, is there? */
if (TREE_READONLY (decl))
error_with_decl (decl, "const objects cannot go in .sdata/.sbss");
#endif
prefix = SDATA_FLAG_CHAR;
}
}
else else
{ abort (); /* shouldn't happen */
if (TREE_CODE (decl) == VAR_DECL
&& ! TREE_READONLY (decl)
&& ! TARGET_SDATA_NONE)
{
int size = int_size_in_bytes (TREE_TYPE (decl));
if (size > 0 && size <= g_switch_value)
prefix = SDATA_FLAG_CHAR;
}
}
} }
extra_flags |= model << SYMBOL_FLAG_MODEL_SHIFT;
/* If data area not decided yet, check for a code model. */ if (extra_flags)
if (prefix == 0) SYMBOL_REF_FLAGS (XEXP (DECL_RTL (decl), 0)) |= extra_flags;
{ }
if (model)
{
tree id;
init_idents ();
id = TREE_VALUE (TREE_VALUE (model)); /* Only mark the object as being small data area addressable if
it hasn't been explicitly marked with a code model.
if (id == small_ident1 || id == small_ident2) The user can explicitly put an object in the small data area with the
; /* don't mark the symbol specially */ section attribute. If the object is in sdata/sbss and marked with a
else if (id == medium_ident1 || id == medium_ident2) code model do both [put the object in .sdata and mark it as being
prefix = MEDIUM_FLAG_CHAR; addressed with a specific code model - don't mark it as being addressed
else if (id == large_ident1 || id == large_ident2) with an SDA reloc though]. This is ok and might be useful at times. If
prefix = LARGE_FLAG_CHAR; the object doesn't fit the linker will give an error. */
else
abort (); /* shouldn't happen */ static bool
} m32r_in_small_data_p (decl)
else tree decl;
{ {
if (TARGET_MODEL_SMALL) tree section;
; /* don't mark the symbol specially */
else if (TARGET_MODEL_MEDIUM)
prefix = MEDIUM_FLAG_CHAR;
else if (TARGET_MODEL_LARGE)
prefix = LARGE_FLAG_CHAR;
else
abort (); /* shouldn't happen */
}
}
if (prefix != 0) if (TREE_CODE (decl) != VAR_DECL)
return false;
if (lookup_attribute ("model", DECL_ATTRIBUTES (decl)))
return false;
section = DECL_SECTION_NAME (decl);
if (section)
{ {
rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd' char *name = (char *) TREE_STRING_POINTER (section);
? TREE_CST_RTL (decl) : DECL_RTL (decl)); if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
const char *str = XSTR (XEXP (rtl, 0), 0); return true;
int len = strlen (str);
char *newstr = ggc_alloc (len + 2);
strcpy (newstr + 1, str);
*newstr = prefix;
/* Note - we cannot leave the string in the ggc_alloc'ed space.
It must reside in the stringtable's domain. */
newstr = (char *) ggc_alloc_string (newstr, len + 2);
XSTR (XEXP (rtl, 0), 0) = newstr;
} }
} else
{
if (! TREE_READONLY (decl) && ! TARGET_SDATA_NONE)
{
int size = int_size_in_bytes (TREE_TYPE (decl));
/* Undo the effects of the above. */ if (size > 0 && size <= g_switch_value)
return true;
}
}
static const char * return false;
m32r_strip_name_encoding (str)
const char *str;
{
str += ENCODED_NAME_P (str);
str += *str == '*';
return str;
} }
/* Do anything needed before RTL is emitted for each function. */ /* Do anything needed before RTL is emitted for each function. */
...@@ -571,14 +503,14 @@ small_data_operand (op, mode) ...@@ -571,14 +503,14 @@ small_data_operand (op, mode)
return 0; return 0;
if (GET_CODE (op) == SYMBOL_REF) if (GET_CODE (op) == SYMBOL_REF)
return SDATA_NAME_P (XSTR (op, 0)); return SYMBOL_REF_SMALL_P (op);
if (GET_CODE (op) == CONST if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (op, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
&& INT16_P (INTVAL (XEXP (XEXP (op, 0), 1)))) && INT16_P (INTVAL (XEXP (XEXP (op, 0), 1))))
return SDATA_NAME_P (XSTR (XEXP (XEXP (op, 0), 0), 0)); return SYMBOL_REF_SMALL_P (XEXP (XEXP (op, 0), 0));
return 0; return 0;
} }
...@@ -590,27 +522,29 @@ addr24_operand (op, mode) ...@@ -590,27 +522,29 @@ addr24_operand (op, mode)
rtx op; rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx sym;
if (GET_CODE (op) == LABEL_REF) if (GET_CODE (op) == LABEL_REF)
return TARGET_ADDR24; return TARGET_ADDR24;
if (GET_CODE (op) == SYMBOL_REF) if (GET_CODE (op) == SYMBOL_REF)
return (SMALL_NAME_P (XSTR (op, 0)) sym = op;
|| (TARGET_ADDR24 else if (GET_CODE (op) == CONST
&& (CONSTANT_POOL_ADDRESS_P (op) && GET_CODE (XEXP (op, 0)) == PLUS
|| LIT_NAME_P (XSTR (op, 0))))); && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
&& UINT24_P (INTVAL (XEXP (XEXP (op, 0), 1))))
sym = XEXP (XEXP (op, 0), 0);
else
return 0;
if (GET_CODE (op) == CONST if (SYMBOL_REF_MODEL (sym) == M32R_MODEL_SMALL)
&& GET_CODE (XEXP (op, 0)) == PLUS return 1;
&& GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT if (TARGET_ADDR24
&& UINT24_P (INTVAL (XEXP (XEXP (op, 0), 1)))) && (CONSTANT_POOL_ADDRESS_P (sym)
{ || LIT_NAME_P (XSTR (sym, 0))))
rtx sym = XEXP (XEXP (op, 0), 0); return 1;
return (SMALL_NAME_P (XSTR (sym, 0))
|| (TARGET_ADDR24
&& (CONSTANT_POOL_ADDRESS_P (sym)
|| LIT_NAME_P (XSTR (sym, 0)))));
}
return 0; return 0;
} }
...@@ -622,23 +556,23 @@ addr32_operand (op, mode) ...@@ -622,23 +556,23 @@ addr32_operand (op, mode)
rtx op; rtx op;
enum machine_mode mode; enum machine_mode mode;
{ {
rtx sym;
if (GET_CODE (op) == LABEL_REF) if (GET_CODE (op) == LABEL_REF)
return TARGET_ADDR32; return TARGET_ADDR32;
if (GET_CODE (op) == SYMBOL_REF) if (GET_CODE (op) == SYMBOL_REF)
return (! addr24_operand (op, mode) sym = op;
&& ! small_data_operand (op, mode)); else if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == PLUS
if (GET_CODE (op) == CONST && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
&& GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
&& GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF sym = XEXP (XEXP (op, 0), 0);
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) else
{ return 0;
return (! addr24_operand (op, mode)
&& ! small_data_operand (op, mode));
}
return 0; return (! addr24_operand (sym, mode)
&& ! small_data_operand (sym, mode));
} }
/* Return 1 if OP is a function that can be called with the `bl' insn. */ /* Return 1 if OP is a function that can be called with the `bl' insn. */
...@@ -649,7 +583,7 @@ call26_operand (op, mode) ...@@ -649,7 +583,7 @@ call26_operand (op, mode)
enum machine_mode mode ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) == SYMBOL_REF) if (GET_CODE (op) == SYMBOL_REF)
return ! LARGE_NAME_P (XSTR (op, 0)); return SYMBOL_REF_MODEL (op) != M32R_MODEL_LARGE;
return TARGET_CALL26; return TARGET_CALL26;
} }
...@@ -2384,12 +2318,7 @@ m32r_print_operand (file, x, code) ...@@ -2384,12 +2318,7 @@ m32r_print_operand (file, x, code)
split_double (x, &first, &second); split_double (x, &first, &second);
x = WORDS_BIG_ENDIAN ? second : first; x = WORDS_BIG_ENDIAN ? second : first;
fprintf (file, fprintf (file, HOST_WIDE_INT_PRINT_HEX,
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
"0x%x",
#else
"0x%lx",
#endif
(code == 'B' (code == 'B'
? INTVAL (x) & 0xffff ? INTVAL (x) & 0xffff
: (INTVAL (x) >> 16) & 0xffff)); : (INTVAL (x) >> 16) & 0xffff));
...@@ -2441,13 +2370,7 @@ m32r_print_operand (file, x, code) ...@@ -2441,13 +2370,7 @@ m32r_print_operand (file, x, code)
case 'X' : case 'X' :
/* Print a const_int in hex. Used in comments. */ /* Print a const_int in hex. Used in comments. */
if (GET_CODE (x) == CONST_INT) if (GET_CODE (x) == CONST_INT)
fprintf (file, fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
"0x%x",
#else
"0x%lx",
#endif
INTVAL (x));
return; return;
case '#' : case '#' :
......
...@@ -1468,96 +1468,13 @@ do { \ ...@@ -1468,96 +1468,13 @@ do { \
#define TEXT_SECTION_ASM_OP "\t.section .text" #define TEXT_SECTION_ASM_OP "\t.section .text"
#define DATA_SECTION_ASM_OP "\t.section .data" #define DATA_SECTION_ASM_OP "\t.section .data"
#define RODATA_SECTION_ASM_OP "\t.section .rodata"
#define BSS_SECTION_ASM_OP "\t.section .bss" #define BSS_SECTION_ASM_OP "\t.section .bss"
#define SDATA_SECTION_ASM_OP "\t.section .sdata"
#define SBSS_SECTION_ASM_OP "\t.section .sbss"
/* This one is for svr4.h. */
#undef READONLY_DATA_SECTION_ASM_OP
#define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata"
/* A list of names for sections other than the standard two, which are
`in_text' and `in_data'. You need not define this macro
on a system with no other sections (that GCC needs to use). */
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_sdata, in_sbss
/* One or more functions to be defined in "varasm.c". These
functions should do jobs analogous to those of `text_section' and
`data_section', for your additional sections. Do not define this
macro if you do not define `EXTRA_SECTIONS'. */
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
SDATA_SECTION_FUNCTION \
SBSS_SECTION_FUNCTION
#define SDATA_SECTION_FUNCTION \
void \
sdata_section () \
{ \
if (in_section != in_sdata) \
{ \
fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
in_section = in_sdata; \
} \
} \
#define SBSS_SECTION_FUNCTION \
void \
sbss_section () \
{ \
if (in_section != in_sbss) \
{ \
fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \
in_section = in_sbss; \
} \
} \
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION m32r_select_section
/* Define this macro if jump tables (for tablejump insns) should be /* Define this macro if jump tables (for tablejump insns) should be
output in the text section, along with the assembler instructions. output in the text section, along with the assembler instructions.
Otherwise, the readonly data section is used. Otherwise, the readonly data section is used.
This macro is irrelevant if there is no separate readonly data section. */ This macro is irrelevant if there is no separate readonly data section. */
/*#define JUMP_TABLES_IN_TEXT_SECTION*/ /*#define JUMP_TABLES_IN_TEXT_SECTION*/
/* Define this macro if references to a symbol must be treated
differently depending on something about the variable or
function named by the symbol (such as what section it is in).
The macro definition, if any, is executed immediately after the
rtl for DECL or other node is created.
The value of the rtl will be a `mem' whose address is a
`symbol_ref'.
The usual thing for this macro to do is to store a flag in the
`symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
name string in the `symbol_ref' (if one bit is not enough
information). */
#define SDATA_FLAG_CHAR '@'
/* Small objects are recorded with no prefix for space efficiency since
they'll be the most common. This isn't the case if the user passes
-mmodel={medium|large} and one could choose to not mark symbols that
are the default, but that complicates things. */
/*#define SMALL_FLAG_CHAR '#'*/
#define MEDIUM_FLAG_CHAR '%'
#define LARGE_FLAG_CHAR '&'
#define SDATA_NAME_P(NAME) (*(NAME) == SDATA_FLAG_CHAR)
/*#define SMALL_NAME_P(NAME) (*(NAME) == SMALL_FLAG_CHAR)*/
#define SMALL_NAME_P(NAME) (! ENCODED_NAME_P (NAME) && ! LIT_NAME_P (NAME))
#define MEDIUM_NAME_P(NAME) (*(NAME) == MEDIUM_FLAG_CHAR)
#define LARGE_NAME_P(NAME) (*(NAME) == LARGE_FLAG_CHAR)
/* For string literals, etc. */
#define LIT_NAME_P(NAME) ((NAME)[0] == '*' && (NAME)[1] == '.')
#define ENCODED_NAME_P(SYMBOL_NAME) \
(SDATA_NAME_P (SYMBOL_NAME) \
/*|| SMALL_NAME_P (SYMBOL_NAME)*/ \
|| MEDIUM_NAME_P (SYMBOL_NAME) \
|| LARGE_NAME_P (SYMBOL_NAME))
/* PIC */ /* PIC */
...@@ -1622,12 +1539,6 @@ sbss_section () \ ...@@ -1622,12 +1539,6 @@ sbss_section () \
/* Globalizing directive for a label. */ /* Globalizing directive for a label. */
#define GLOBAL_ASM_OP "\t.global\t" #define GLOBAL_ASM_OP "\t.global\t"
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME))
/* If -Os, don't force line number labels to begin at the beginning of /* If -Os, don't force line number labels to begin at the beginning of
the word; we still want the assembler to try to put things in parallel, the word; we still want the assembler to try to put things in parallel,
should that be possible. should that be possible.
......
...@@ -1280,7 +1280,8 @@ do { \ ...@@ -1280,7 +1280,8 @@ do { \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0) ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
/* Subsequent bits are available for the target to use. */ /* Subsequent bits are available for the target to use. */
#define SYMBOL_FLAG_MACH_DEP (1 << 7) #define SYMBOL_FLAG_MACH_DEP_SHIFT 7
#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
/* Define a macro to look for REG_INC notes, /* Define a macro to look for REG_INC notes,
but save time on machines where they never exist. */ but save time on machines where they never exist. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment