mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-28 14:31:50 +00:00
make --mac-strip-macsbug (mostly) work again, see #32
This commit is contained in:
parent
2283f16fa1
commit
bb894a87c5
@ -101,4 +101,4 @@ extern rtx m68k_legitimize_call_address (rtx);
|
||||
extern rtx m68k_legitimize_sibcall_address (rtx);
|
||||
extern int m68k_hard_regno_rename_ok(unsigned int, unsigned int);
|
||||
|
||||
extern void m68k_write_macsbug_name(FILE *, const char *);
|
||||
extern void m68k_write_macsbug_name(FILE *, const char *, tree decl);
|
||||
|
@ -6770,13 +6770,15 @@ m68k_excess_precision (enum excess_precision_type type)
|
||||
extern int retro68_hack_asm_rts_counter;
|
||||
|
||||
void
|
||||
m68k_write_macsbug_name(FILE *file, const char *name)
|
||||
m68k_write_macsbug_name(FILE *file, const char *name, tree decl)
|
||||
{
|
||||
int len = strlen(name);
|
||||
if(len > 255)
|
||||
len = 255;
|
||||
//if(flag_function_sections)
|
||||
// fprintf(file, "\t.section .text.%s.macsbug,\"ax\",@progbits\n",name);
|
||||
|
||||
const char *section_name = DECL_SECTION_NAME (decl);
|
||||
if(flag_function_sections)
|
||||
fprintf(file, "\t.section %s.macsbug,\"ax\",@progbits\n", section_name);
|
||||
fprintf(file, "# macsbug symbol\n");
|
||||
if(!retro68_hack_asm_rts_counter)
|
||||
fprintf(file, "\trts\n");
|
||||
@ -6787,8 +6789,8 @@ m68k_write_macsbug_name(FILE *file, const char *name)
|
||||
|
||||
ASM_OUTPUT_ASCII(file, name, len);
|
||||
fprintf(file, "\t.align 2,0\n\t.short 0\n");
|
||||
//if(flag_function_sections)
|
||||
// fprintf(file, "\t.section .text.%s,\"ax\",@progbits\n",name);
|
||||
if(flag_function_sections && section_name)
|
||||
fprintf(file, "\t.section %s,\"ax\",@progbits\n", section_name);
|
||||
}
|
||||
|
||||
static tree
|
||||
|
@ -995,7 +995,7 @@ extern int m68k_sched_indexed_address_bypass_p (rtx_insn *, rtx_insn *);
|
||||
{ \
|
||||
if (!flag_inhibit_size_directive) \
|
||||
ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
|
||||
m68k_write_macsbug_name(FILE, FNAME); \
|
||||
m68k_write_macsbug_name(FILE, FNAME, DECL); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user