This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: i960 ASM_OUTPUT_SECTION_NAME
- To: gcc-patches at gcc dot gnu dot org
- Subject: patch: i960 ASM_OUTPUT_SECTION_NAME
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: 14 Jun 2001 20:36:33 +0100
here is a patch to change sections on the i960 port.
ok for branch?
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.
2001-06-14 Aldy Hernandez <aldyh@redhat.com>
* config/i960/i960.h (ASM_OUTPUT_SECTION_NAME): New macro.
Index: i960.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i960/i960.h,v
retrieving revision 1.41
diff -c -p -r1.41 i960.h
*** i960.h 2001/03/15 16:33:02 1.41
--- i960.h 2001/06/14 19:32:27
*************** extern struct rtx_def *i960_compare_op0,
*** 1383,1388 ****
--- 1383,1398 ----
#define ASM_OUTPUT_LABEL(FILE,NAME) \
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
+ /* A C statement to output something to the assembler file to switch to section
+ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
+ NULL_TREE. Some target formats do not support arbitrary sections. Do not
+ define this macro in such cases. */
+
+ #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
+ fprintf((FILE), ".section\t%s,\"%c\"\n", (NAME), \
+ (DECL) && (TREE_CODE (DECL) == FUNCTION_DECL || \
+ DECL_READONLY_SECTION (DECL, RELOC)) ? 'x' : 'd')
+
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */