Skip to content

Commit c817133

Browse files
committed
@b support named sections
1 parent 99216a3 commit c817133

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

gcc/config/m68k/amigaos.c

100755100644
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,3 +771,11 @@ amigaos_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno,
771771
}
772772

773773

774+
/* Output assembly to switch to section NAME with attribute FLAGS. */
775+
776+
extern void
777+
amiga_named_section (const char *name, unsigned int flags, tree decl ATTRIBUTE_UNUSED)
778+
{
779+
fprintf (asm_out_file, "\t.section\t%s\n", name);
780+
}
781+

gcc/config/m68k/amigaos.h

100755100644
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,15 @@ Boston, MA 02111-1307, USA. */
113113
N_("Restore a4 in all functions") }, \
114114
{ "no-always-restore-a4", - MASK_ALWAYS_RESTORE_A4, \
115115
N_("Do not restore a4 in all functions") }
116-
116+
117+
118+
/* Support sections in chip memory, currently '.datachip' only. */
119+
extern void
120+
amiga_named_section (const char *name, unsigned int flags, tree decl);
121+
122+
#undef TARGET_ASM_NAMED_SECTION
123+
#define TARGET_ASM_NAMED_SECTION amiga_named_section
124+
117125
#if 0
118126
/* Various ABI issues. */
119127

@@ -139,9 +147,6 @@ Boston, MA 02111-1307, USA. */
139147
#undef PIC_OFFSET_TABLE_REGNUM
140148
#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM)
141149

142-
#undef PIC_REG
143-
#define PIC_REG 12
144-
145150
/* Use A5 as framepointer instead of A6, since the AmigaOS ABI requires A6
146151
to be used as a shared library base pointer in direct library calls. */
147152

@@ -182,9 +187,7 @@ Boston, MA 02111-1307, USA. */
182187

183188
/* XXX: section support */
184189
#if 0
185-
/* Support sections in chip memory, currently '.datachip' only. */
186-
#undef TARGET_ASM_NAMED_SECTION
187-
#define TARGET_ASM_NAMED_SECTION amiga_named_section
190+
188191

189192
/* We define TARGET_ASM_NAMED_SECTION, but we don't support arbitrary sections,
190193
including '.gcc_except_table', so we emulate the standard behaviour. */

0 commit comments

Comments
 (0)