This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

m32r symbol_ref_flags usage


Actually, this spills over a bit into select_section etc.  This is
an ELF port; there's no reason we can't use ELF defaults.


r~



        * 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.

Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.396
diff -c -p -d -r1.396 rtl.h
*** rtl.h	17 Apr 2003 01:11:16 -0000	1.396
--- rtl.h	17 Apr 2003 08:43:43 -0000
*************** do {						\
*** 1280,1286 ****
    ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
  
  /* Subsequent bits are available for the target to use.  */
! #define SYMBOL_FLAG_MACH_DEP	(1 << 7)
  
  /* Define a macro to look for REG_INC notes,
     but save time on machines where they never exist.  */
--- 1280,1287 ----
    ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
  
  /* Subsequent bits are available for the target to use.  */
! #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,
     but save time on machines where they never exist.  */
Index: config/m32r/m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.61
diff -c -p -d -r1.61 m32r.c
*** config/m32r/m32r.c	28 Jan 2003 18:08:51 -0000	1.61
--- config/m32r/m32r.c	17 Apr 2003 08:43:44 -0000
*************** enum m32r_sdata m32r_sdata;
*** 60,65 ****
--- 60,73 ----
  /* Scheduler support */
  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.  */
  static void  init_reg_tables			PARAMS ((void));
  static void  block_move_call			PARAMS ((rtx, rtx, rtx));
*************** static int    m32r_sched_reorder   PARAM
*** 76,84 ****
  static int    m32r_variable_issue  PARAMS ((FILE *, int, rtx, int));
  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 const char *m32r_strip_name_encoding PARAMS ((const char *));
  static void init_idents PARAMS ((void));
  static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *));
  
--- 84,91 ----
  static int    m32r_variable_issue  PARAMS ((FILE *, int, rtx, int));
  static int    m32r_issue_rate	   PARAMS ((void));
  
  static void m32r_encode_section_info PARAMS ((tree, int));
! static bool m32r_in_small_data_p PARAMS ((tree));
  static void init_idents PARAMS ((void));
  static bool m32r_rtx_costs PARAMS ((rtx, int, int, int *));
  
*************** static bool m32r_rtx_costs PARAMS ((rtx,
*** 111,118 ****
  
  #undef TARGET_ENCODE_SECTION_INFO
  #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
! #undef TARGET_STRIP_NAME_ENCODING
! #define TARGET_STRIP_NAME_ENCODING m32r_strip_name_encoding
  
  #undef TARGET_RTX_COSTS
  #define TARGET_RTX_COSTS m32r_rtx_costs
--- 118,125 ----
  
  #undef TARGET_ENCODE_SECTION_INFO
  #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
! #undef TARGET_IN_SMALL_DATA_P
! #define TARGET_IN_SMALL_DATA_P m32r_in_small_data_p
  
  #undef TARGET_RTX_COSTS
  #define TARGET_RTX_COSTS m32r_rtx_costs
*************** m32r_handle_model_attribute (node, name,
*** 332,386 ****
    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,
     FUNCTION_DECL, STRING_CST, CONSTRUCTOR, or ???.
  
     For the M32R we want to record:
  
     - 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
-      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
--- 339,351 ----
*************** m32r_encode_section_info (decl, first)
*** 388,511 ****
       tree decl;
       int first;
  {
!   char prefix = 0;
!   tree model = 0;
  
!   if (!first)
      return;
  
!   switch (TREE_CODE (decl))
      {
!     case VAR_DECL :
!     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
!      it hasn't been explicitly marked with a code model.
  
!      The user can explicitly put an object in the small data area with the
!      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 (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd'
! 	  && DECL_SECTION_NAME (decl) != NULL_TREE)
! 	{
! 	  char *name = (char *) TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
! 	  if (! strcmp (name, ".sdata") || ! strcmp (name, ".sbss"))
! 	    {
! #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
! 	{
! 	  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;
! 	    }
! 	}
      }
  
!   /* If data area not decided yet, check for a code model.  */
!   if (prefix == 0)
!     {
!       if (model)
! 	{
! 	  tree id;
! 	  
! 	  init_idents ();
  
! 	  id = TREE_VALUE (TREE_VALUE (model));
  
! 	  if (id == small_ident1 || id == small_ident2)
! 	    ; /* don't mark the symbol specially */
! 	  else if (id == medium_ident1 || id == medium_ident2)
! 	    prefix = MEDIUM_FLAG_CHAR;
! 	  else if (id == large_ident1 || id == large_ident2)
! 	    prefix = LARGE_FLAG_CHAR;
! 	  else
! 	    abort (); /* shouldn't happen */
! 	}
!       else
! 	{
! 	  if (TARGET_MODEL_SMALL)
! 	    ; /* 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)
!     {
!       rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd'
!                  ? TREE_CST_RTL (decl) : DECL_RTL (decl));
!       const char *str = XSTR (XEXP (rtl, 0), 0);
!       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;
      }
! }
  
! /* Undo the effects of the above.  */
  
! static const char *
! 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.  */
--- 353,443 ----
       tree decl;
       int first;
  {
!   int extra_flags = 0;
!   tree model_attr;
!   enum m32r_model model;
  
!   default_encode_section_info (decl, first);
! 
!   if (!DECL_P (decl))
      return;
  
!   model_attr = lookup_attribute ("model", DECL_ATTRIBUTES (decl));
!   if (model_attr)
      {
!       tree id;
  
!       init_idents ();
  
!       id = TREE_VALUE (TREE_VALUE (model_attr));
  
!       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 (TARGET_MODEL_SMALL)
! 	model = M32R_MODEL_SMALL;
!       else if (TARGET_MODEL_MEDIUM)
! 	model = M32R_MODEL_MEDIUM;
!       else if (TARGET_MODEL_LARGE)
! 	model = M32R_MODEL_LARGE;
        else
! 	abort (); /* shouldn't happen */
      }
+   extra_flags |= model << SYMBOL_FLAG_MODEL_SHIFT;
  
!   if (extra_flags)
!     SYMBOL_REF_FLAGS (XEXP (DECL_RTL (decl), 0)) |= extra_flags;
! }
  
! /* Only mark the object as being small data area addressable if
!    it hasn't been explicitly marked with a code model.
  
!    The user can explicitly put an object in the small data area with the
!    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.  */
  
! static bool
! m32r_in_small_data_p (decl)
!      tree decl;
! {
!   tree section;
  
!   if (TREE_CODE (decl) != VAR_DECL)
!     return false;
  
!   if (lookup_attribute ("model", DECL_ATTRIBUTES (decl)))
!     return false;
! 
!   section = DECL_SECTION_NAME (decl);
!   if (section)
!     {
!       char *name = (char *) TREE_STRING_POINTER (section);
!       if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0)
! 	return true;
      }
!   else
!     {
!       if (! TREE_READONLY (decl) && ! TARGET_SDATA_NONE)
! 	{
! 	  int size = int_size_in_bytes (TREE_TYPE (decl));
  
! 	  if (size > 0 && size <= g_switch_value)
! 	    return true;
! 	}
!     }
  
!   return false;
  }
  
  /* Do anything needed before RTL is emitted for each function.  */
*************** small_data_operand (op, mode)
*** 571,584 ****
      return 0;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     return SDATA_NAME_P (XSTR (op, 0));
  
    if (GET_CODE (op) == CONST
        && GET_CODE (XEXP (op, 0)) == PLUS
        && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
        && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
        && INT16_P (INTVAL (XEXP (XEXP (op, 0), 1))))
!     return SDATA_NAME_P (XSTR (XEXP (XEXP (op, 0), 0), 0));
  
    return 0;
  }
--- 503,516 ----
      return 0;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     return SYMBOL_REF_SMALL_P (op);
  
    if (GET_CODE (op) == CONST
        && GET_CODE (XEXP (op, 0)) == PLUS
        && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
        && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT
        && INT16_P (INTVAL (XEXP (XEXP (op, 0), 1))))
!     return SYMBOL_REF_SMALL_P (XEXP (XEXP (op, 0), 0));
  
    return 0;
  }
*************** addr24_operand (op, mode)
*** 590,616 ****
       rtx op;
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
    if (GET_CODE (op) == LABEL_REF)
      return TARGET_ADDR24;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     return (SMALL_NAME_P (XSTR (op, 0))
! 	    || (TARGET_ADDR24
! 		&& (CONSTANT_POOL_ADDRESS_P (op)
! 		    || LIT_NAME_P (XSTR (op, 0)))));
  
!   if (GET_CODE (op) == CONST
!       && GET_CODE (XEXP (op, 0)) == PLUS
!       && 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))))
!     {
!       rtx sym = XEXP (XEXP (op, 0), 0);
!       return (SMALL_NAME_P (XSTR (sym, 0))
! 	      || (TARGET_ADDR24
! 		  && (CONSTANT_POOL_ADDRESS_P (sym)
! 		      || LIT_NAME_P (XSTR (sym, 0)))));
!     }
  
    return 0;
  }
--- 522,550 ----
       rtx op;
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
+   rtx sym;
+ 
    if (GET_CODE (op) == LABEL_REF)
      return TARGET_ADDR24;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     sym = op;
!   else if (GET_CODE (op) == CONST
! 	   && GET_CODE (XEXP (op, 0)) == PLUS
! 	   && 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 (SYMBOL_REF_MODEL (sym) == M32R_MODEL_SMALL)
!     return 1;
! 
!   if (TARGET_ADDR24
!       && (CONSTANT_POOL_ADDRESS_P (sym)
! 	  || LIT_NAME_P (XSTR (sym, 0))))
!     return 1;
  
    return 0;
  }
*************** addr32_operand (op, mode)
*** 622,644 ****
       rtx op;
       enum machine_mode mode;
  {
    if (GET_CODE (op) == LABEL_REF)
      return TARGET_ADDR32;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     return (! addr24_operand (op, mode)
! 	    && ! small_data_operand (op, mode));
! 
!   if (GET_CODE (op) == CONST
!       && GET_CODE (XEXP (op, 0)) == PLUS
!       && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
!       && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
!     {
!       return (! addr24_operand (op, mode)
! 	      && ! small_data_operand (op, mode));
!     }
  
!   return 0;
  }
  
  /* Return 1 if OP is a function that can be called with the `bl' insn.  */
--- 556,578 ----
       rtx op;
       enum machine_mode mode;
  {
+   rtx sym;
+ 
    if (GET_CODE (op) == LABEL_REF)
      return TARGET_ADDR32;
  
    if (GET_CODE (op) == SYMBOL_REF)
!     sym = op;
!   else if (GET_CODE (op) == CONST
! 	   && GET_CODE (XEXP (op, 0)) == PLUS
! 	   && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
! 	   && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
!     sym = XEXP (XEXP (op, 0), 0);
!   else
!     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.  */
*************** call26_operand (op, mode)
*** 649,655 ****
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
    if (GET_CODE (op) == SYMBOL_REF)
!     return ! LARGE_NAME_P (XSTR (op, 0));
  
    return TARGET_CALL26;
  }
--- 583,589 ----
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
    if (GET_CODE (op) == SYMBOL_REF)
!     return SYMBOL_REF_MODEL (op) != M32R_MODEL_LARGE;
  
    return TARGET_CALL26;
  }
*************** m32r_print_operand (file, x, code)
*** 2384,2395 ****
  
  	    split_double (x, &first, &second);
  	    x = WORDS_BIG_ENDIAN ? second : first;
! 	    fprintf (file,
! #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
! 		     "0x%x",
! #else
! 		     "0x%lx",
! #endif
  		     (code == 'B'
  		      ? INTVAL (x) & 0xffff
  		      : (INTVAL (x) >> 16) & 0xffff));
--- 2318,2324 ----
  
  	    split_double (x, &first, &second);
  	    x = WORDS_BIG_ENDIAN ? second : first;
! 	    fprintf (file, HOST_WIDE_INT_PRINT_HEX,
  		     (code == 'B'
  		      ? INTVAL (x) & 0xffff
  		      : (INTVAL (x) >> 16) & 0xffff));
*************** m32r_print_operand (file, x, code)
*** 2441,2453 ****
      case 'X' :
        /* Print a const_int in hex.  Used in comments.  */
        if (GET_CODE (x) == CONST_INT)
! 	fprintf (file,
! #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
! 		 "0x%x",
! #else
! 		 "0x%lx",
! #endif
! 		 INTVAL (x));
        return;
  
      case '#' :
--- 2370,2376 ----
      case 'X' :
        /* Print a const_int in hex.  Used in comments.  */
        if (GET_CODE (x) == CONST_INT)
! 	fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
        return;
  
      case '#' :
Index: config/m32r/m32r.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.h,v
retrieving revision 1.79
diff -c -p -d -r1.79 m32r.h
*** config/m32r/m32r.h	28 Mar 2003 08:07:02 -0000	1.79
--- config/m32r/m32r.h	17 Apr 2003 08:43:44 -0000
*************** do {									\
*** 1468,1563 ****
  
  #define TEXT_SECTION_ASM_OP	"\t.section .text"
  #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 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
     output in the text section, along with the assembler instructions.
     Otherwise, the readonly data section is used.
     This macro is irrelevant if there is no separate readonly data 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 */
  
--- 1468,1480 ----
*************** sbss_section ()								\
*** 1621,1632 ****
  
  /* Globalizing directive for a label.  */
  #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
     the word; we still want the assembler to try to put things in parallel,
--- 1538,1543 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]