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]

[committed] Patch to frv_in_small_data_p


Anything within the -G limit was assumed to be small data, even if it
was in an unrecognised user-defined section.  Tested on frv-elf,
committed as obvious.

Richard


	* config/frv/frv.c (frv_in_small_data_p): Return false for unknown
	section names.

Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.36
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.36 frv.c
*** config/frv/frv.c	6 Nov 2003 10:54:08 -0000	1.36
--- config/frv/frv.c	14 Nov 2003 09:54:49 -0000
*************** frv_in_small_data_p (decl)
*** 9784,9793 ****
    if (TREE_CODE (decl) != VAR_DECL || DECL_ARTIFICIAL (decl))
      return false;
  
-   size = int_size_in_bytes (TREE_TYPE (decl));
-   if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
-     return true;
- 
    /* If we already know which section the decl should be in, see if
       it's a small data section.  */
    section_name = DECL_SECTION_NAME (decl);
--- 9784,9789 ----
*************** frv_in_small_data_p (decl)
*** 9799,9805 ****
--- 9795,9806 ----
  	return true;
        if (frv_string_begins_with (section_name, ".sbss"))
  	return true;
+       return false;
      }
+ 
+   size = int_size_in_bytes (TREE_TYPE (decl));
+   if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value)
+     return true;
  
    return false;
  }


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