Unified · Split
| @@ -208,6 +208,35 @@ static bool m68k_modes_tieable_p (machine_mode, machine_mode); · 207 unmodified lines | |||
| 208 | static machine_mode m68k_promote_function_mode (const_tree, machine_mode, | 208 | static machine_mode m68k_promote_function_mode (const_tree, machine_mode, |
| 209 | int *, const_tree, int); | 209 | int *, const_tree, int); |
| 210 | static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int); | 210 | static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int); |
| 211 | |||
| 212 | static void | ||
| 213 | m68k_unique_section (tree decl, int reloc) | ||
| 214 | { | ||
| 215 | const char *name; | ||
| 216 | char *section = NULL; | ||
| 217 | tree type, chain; | ||
| 218 | |||
| 219 | /* Detect arrays pointing at labels - computed gotos. */ | ||
| 220 | if (categorize_decl_for_section (decl, reloc) == SECCAT_RODATA | ||
| 221 | && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) | ||
| 222 | { | ||
| 223 | type = TREE_TYPE (TREE_TYPE (decl)); | ||
| 224 | chain = TREE_CHAIN (decl); | ||
| 225 | |||
| 226 | if (type && chain && TREE_CODE (type) == POINTER_TYPE | ||
| 227 | && TREE_CODE (chain) == LABEL_DECL) | ||
| 228 | { | ||
| 229 | name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); | ||
| 230 | name = targetm.strip_name_encoding (name); | ||
| 231 | section | ||
| 232 | = ACONCAT ((".text.", current_function_name (), ".", name, NULL)); | ||
| 233 | set_decl_section_name (decl, section); | ||
| 234 | return; | ||
| 235 | } | ||
| 236 | } | ||
| 237 | |||
| 238 | default_unique_section (decl, reloc); | ||
| 239 | } | ||
| 211 | 240 | ||
| 212 | /* Initialize the GCC target structure. */ | 241 | /* Initialize the GCC target structure. */ |
| 213 | 242 | ||
| @@ -216,6 +245,9 @@ static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int); · 2 unmodified lines | |||
| 216 | #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" | 245 | #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" |
| 217 | #endif | 246 | #endif |
| 218 | 247 | ||
| 248 | #undef TARGET_ASM_UNIQUE_SECTION | ||
| 249 | #define TARGET_ASM_UNIQUE_SECTION m68k_unique_section | ||
| 250 | |||
| 219 | #if INT_OP_GROUP == INT_OP_NO_DOT | 251 | #if INT_OP_GROUP == INT_OP_NO_DOT |
| 220 | #undef TARGET_ASM_BYTE_OP | 252 | #undef TARGET_ASM_BYTE_OP |
| 221 | #define TARGET_ASM_BYTE_OP "\tbyte\t" | 253 | #define TARGET_ASM_BYTE_OP "\tbyte\t" |