diff options
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.c | 273 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.h | 664 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/doc/invoke.texi | 68 |
3 files changed, 163 insertions, 842 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c index c2eae6a0d11..622f8c1fdd7 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c @@ -43,11 +43,13 @@ Boston, MA 02111-1307, USA. */ #include "target.h" #include "target-def.h" -const char *m88k_register_prefix = ""; /* Either # for SVR4 or empty for SVR3 */ +#ifdef REGISTER_PREFIX +const char *m88k_register_prefix = REGISTER_PREFIX; +#else +const char *m88k_register_prefix = ""; +#endif char m88k_volatile_code; -int m88k_prologue_done = 0; /* Ln directives can now be emitted */ -int m88k_function_number = 0; /* Counter unique to each function */ int m88k_fp_offset = 0; /* offset of frame pointer if used */ int m88k_stack_size = 0; /* size of allocated stack (including frame) */ int m88k_case_index; @@ -59,14 +61,7 @@ rtx m88k_compare_op1; /* cmpsi operand 1 */ enum processor_type m88k_cpu; /* target cpu */ static void m88k_frame_related PARAMS ((rtx, rtx, int)); -static void m88k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void m88k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); -static void m88k_output_function_end_prologue PARAMS ((FILE *)); -static void m88k_output_function_begin_epilogue PARAMS ((FILE *)); -#if defined (CTOR_LIST_BEGIN) && !defined (OBJECT_FORMAT_ELF) -static void m88k_svr3_asm_out_constructor PARAMS ((rtx, int)); -static void m88k_svr3_asm_out_destructor PARAMS ((rtx, int)); -#endif static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); /* Initialize the GCC target structure. */ @@ -83,12 +78,6 @@ static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int)); #define TARGET_ASM_UNALIGNED_SI_OP "\tuaword\t" #endif -#undef TARGET_ASM_FUNCTION_PROLOGUE -#define TARGET_ASM_FUNCTION_PROLOGUE m88k_output_function_prologue -#undef TARGET_ASM_FUNCTION_END_PROLOGUE -#define TARGET_ASM_FUNCTION_END_PROLOGUE m88k_output_function_end_prologue -#undef TARGET_ASM_FUNCTION_BEGIN_EPILOGUE -#define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE m88k_output_function_begin_epilogue #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE m88k_output_function_epilogue @@ -535,11 +524,6 @@ expand_block_move (dest_mem, src_mem, operands) int target = (int) m88k_cpu; #endif - if (! (PROCESSOR_M88100 == 0 - && PROCESSOR_M88110 == 1 - && PROCESSOR_M88000 == 2)) - abort (); - if (constp && bytes <= 0) return; @@ -927,13 +911,8 @@ output_call (operands, addr) occurs accessing the delay slot. So don't use jsr.n form when jumping thru r1. */ -#ifdef AS_BUG_IMMEDIATE_LABEL /* The assembler restricts immediate values. */ - if (optimize < 2 - || ! ADD_INTVAL (delta * 2) -#else if (optimize < 2 || ! ADD_INTVAL (delta) -#endif || (REG_P (addr) && REGNO (addr) == 1)) { operands[1] = dest; @@ -1526,16 +1505,13 @@ void output_file_start (file) FILE *file; { - ASM_FIRST_LINE (file); - if (TARGET_88110 - && TARGET_SVR4) + if (TARGET_88110) fprintf (file, "%s\n", REQUIRES_88110_ASM_OP); + output_file_directive (file, main_input_filename); - /* Switch to the data section so that the coffsem symbol - isn't in the text section. */ - ASM_COFFSEM (file); } +#ifndef OBJECT_FORMAT_ELF /* Output an ascii string. */ void @@ -1603,6 +1579,7 @@ output_ascii (file, opcode, max, p, size) } fprintf (file, "\"\n"); } +#endif /* Output a label (allows insn-output.c to be compiled without including m88k.c or needing to include stdio.h). */ @@ -1686,21 +1663,12 @@ output_label (label_number) static rtx emit_add PARAMS ((rtx, rtx, int)); static void preserve_registers PARAMS ((int, int)); static void emit_ldst PARAMS ((int, int, enum machine_mode, int)); -static void output_tdesc PARAMS ((FILE *, int)); static int nregs; static int nxregs; static char save_regs[FIRST_PSEUDO_REGISTER]; static int frame_laid_out; static int frame_size; -static int epilogue_marked; -static int prologue_marked; - -#define FIRST_OCS_PRESERVE_REGISTER 14 -#define LAST_OCS_PRESERVE_REGISTER 30 - -#define FIRST_OCS_EXTENDED_PRESERVE_REGISTER (32 + 22) -#define LAST_OCS_EXTENDED_PRESERVE_REGISTER (32 + 31) #define STACK_UNIT_BOUNDARY (STACK_BOUNDARY / BITS_PER_UNIT) #define ROUND_CALL_BLOCK_SIZE(BYTES) \ @@ -1731,7 +1699,7 @@ m88k_layout_frame () /* If we are producing debug information, store r1 and r30 where the debugger wants to find them (r30 at r30+0, r1 at r30+4). Space has already been reserved for r1/r30 in STARTING_FRAME_OFFSET. */ - if (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION) + if (write_symbols != NO_DEBUG) save_regs[1] = 1; /* If we are producing PIC, save the addressing base register and r1. */ @@ -1824,40 +1792,6 @@ null_prologue () && m88k_stack_size == 0); } -static void -m88k_output_function_prologue (stream, size) - FILE *stream ATTRIBUTE_UNUSED; - HOST_WIDE_INT size ATTRIBUTE_UNUSED; -{ - if (TARGET_OMIT_LEAF_FRAME_POINTER && ! quiet_flag && leaf_function_p ()) - fprintf (stderr, "$"); - - m88k_prologue_done = 1; /* it's ok now to put out ln directives */ -} - -static void -m88k_output_function_end_prologue (stream) - FILE *stream; -{ - if (TARGET_OCS_DEBUG_INFO && !prologue_marked) - { - PUT_OCS_FUNCTION_START (stream); - prologue_marked = 1; - - /* If we've already passed the start of the epilogue, say that - it starts here. This marks the function as having a null body, - but at a point where the return address is in a known location. - - Originally, I thought this couldn't happen, but the pic prologue - for leaf functions ends with the instruction that restores the - return address from the temporary register. If the temporary - register is never used, that instruction can float all the way - to the end of the function. */ - if (epilogue_marked) - PUT_OCS_FUNCTION_END (stream); - } -} - /* Add to 'insn' a note which is PATTERN (INSN) but with REG replaced with (plus:P (reg 31) VAL). It would be nice if dwarf2out_frame_debug_expr could deduce these equivalences by itself so it wasn't necessary to hold @@ -1945,19 +1879,26 @@ m88k_expand_prologue () { rtx return_reg = gen_rtx_REG (SImode, 1); rtx label = gen_label_rtx (); +#if 0 rtx temp_reg = NULL_RTX; + int save_r1 = regs_ever_live[1]; - if (! save_regs[1]) + if (save_r1) { temp_reg = gen_rtx_REG (SImode, TEMP_REGNUM); emit_move_insn (temp_reg, return_reg); } +#endif + emit_insn (gen_locate1 (pic_offset_table_rtx, label)); emit_insn (gen_locate2 (pic_offset_table_rtx, label)); emit_insn (gen_addsi3 (pic_offset_table_rtx, pic_offset_table_rtx, return_reg)); - if (! save_regs[1]) + +#if 0 + if (save_r1) emit_move_insn (return_reg, temp_reg); +#endif } if (current_function_profile) emit_insn (gen_blockage ()); @@ -1972,26 +1913,12 @@ m88k_expand_prologue () omit stack adjustments before returning. */ static void -m88k_output_function_begin_epilogue (stream) - FILE *stream; -{ - if (TARGET_OCS_DEBUG_INFO && !epilogue_marked && prologue_marked) - { - PUT_OCS_FUNCTION_END (stream); - } - epilogue_marked = 1; -} - -static void m88k_output_function_epilogue (stream, size) FILE *stream; HOST_WIDE_INT size ATTRIBUTE_UNUSED; { rtx insn = get_last_insn (); - if (TARGET_OCS_DEBUG_INFO && !epilogue_marked) - PUT_OCS_FUNCTION_END (stream); - /* If the last insn isn't a BARRIER, we must write a return insn. This should only happen if the function has no prologue and no body. */ if (GET_CODE (insn) == NOTE) @@ -2015,14 +1942,7 @@ m88k_output_function_epilogue (stream, size) fprintf (stream, "\n"); - if (TARGET_OCS_DEBUG_INFO) - output_tdesc (stream, m88k_fp_offset + 4); - - m88k_function_number++; - m88k_prologue_done = 0; /* don't put out ln directives */ frame_laid_out = 0; - epilogue_marked = 0; - prologue_marked = 0; } void @@ -2088,7 +2008,8 @@ preserve_registers (base, store_p) if (nregs > 2 && !save_regs[FRAME_POINTER_REGNUM]) offset -= 4; /* Do not reload r1 in the epilogue unless really necessary */ - if (store_p || regs_ever_live[1]) + if (store_p || regs_ever_live[1] + || (flag_pic && save_regs[PIC_OFFSET_TABLE_REGNUM])) emit_ldst (store_p, 1, SImode, offset); offset -= 4; base = offset; @@ -2219,104 +2140,6 @@ m88k_debugger_offset (reg, offset) return offset; } - -/* Output the 88open OCS proscribed text description information. - The information is: - 0 8: zero - 0 22: info-byte-length (16 or 20 bytes) - 0 2: info-alignment (word 2) - 1 32: info-protocol (version 1 or 2(pic)) - 2 32: starting-address (inclusive, not counting prologue) - 3 32: ending-address (exclusive, not counting epilog) - 4 8: info-variant (version 1 or 3(extended registers)) - 4 17: register-save-mask (from register 14 to 30) - 4 1: zero - 4 1: return-address-info-discriminant - 4 5: frame-address-register - 5 32: frame-address-offset - 6 32: return-address-info - 7 32: register-save-offset - 8 16: extended-register-save-mask (x16 - x31) - 8 16: extended-register-save-offset (WORDS from register-save-offset) */ - -static void -output_tdesc (file, offset) - FILE *file; - int offset; -{ - int regno, i, j; - long mask, return_address_info, register_save_offset; - long xmask, xregister_save_offset; - char buf[256]; - - for (mask = 0, i = 0, regno = FIRST_OCS_PRESERVE_REGISTER; - regno <= LAST_OCS_PRESERVE_REGISTER; - regno++) - { - mask <<= 1; - if (save_regs[regno]) - { - mask |= 1; - i++; - } - } - - for (xmask = 0, j = 0, regno = FIRST_OCS_EXTENDED_PRESERVE_REGISTER; - regno <= LAST_OCS_EXTENDED_PRESERVE_REGISTER; - regno++) - { - xmask <<= 1; - if (save_regs[regno]) - { - xmask |= 1; - j++; - } - } - - if (save_regs[1]) - { - if ((nxregs > 0 || nregs > 2) && !save_regs[FRAME_POINTER_REGNUM]) - offset -= 4; - return_address_info = - m88k_stack_size + offset; - register_save_offset = return_address_info - i*4; - } - else - { - return_address_info = 1; - register_save_offset = - m88k_stack_size + offset + 4 - i*4; - } - - xregister_save_offset = - (j * 2 + ((register_save_offset >> 2) & 1)); - - tdesc_section (); - - /* 8:0,22:(20 or 16),2:2 */ - fprintf (file, "%s%d,%d", integer_asm_op (4, TRUE), - (((xmask != 0) ? 20 : 16) << 2) | 2, - flag_pic ? 2 : 1); - - ASM_GENERATE_INTERNAL_LABEL (buf, OCS_START_PREFIX, m88k_function_number); - fprintf (file, ",%s%s", buf+1, flag_pic ? "#rel" : ""); - ASM_GENERATE_INTERNAL_LABEL (buf, OCS_END_PREFIX, m88k_function_number); - fprintf (file, ",%s%s", buf+1, flag_pic ? "#rel" : ""); - - fprintf (file, ",0x%x,0x%x,0x%lx,0x%lx", - /* 8:1,17:0x%.3x,1:0,1:%d,5:%d */ - (int)(((xmask ? 3 : 1) << (17+1+1+5)) - | (mask << (1+1+5)) - | ((!!save_regs[1]) << 5) - | (frame_pointer_needed - ? FRAME_POINTER_REGNUM - : STACK_POINTER_REGNUM)), - (m88k_stack_size - (frame_pointer_needed ? m88k_fp_offset : 0)), - return_address_info, - register_save_offset); - if (xmask) - fprintf (file, ",0x%lx%04lx", xmask, (0xffff & xregister_save_offset)); - fputc ('\n', file); - - text_section (); -} /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. NAME is the mcount function name @@ -3029,7 +2852,8 @@ print_operand (file, x, code) return; case 'B': /* bcnd branch values */ - fputs (m88k_register_prefix, file); + if (0) /* SVR4 */ + fputs (m88k_register_prefix, file); switch (xc) { case EQ: fputs ("eq0", file); return; @@ -3042,7 +2866,8 @@ print_operand (file, x, code) } case 'C': /* bb0/bb1 branch values for comparisons */ - fputs (m88k_register_prefix, file); + if (0) /* SVR4 */ + fputs (m88k_register_prefix, file); switch (xc) { case EQ: fputs ("eq", file); return; @@ -3063,8 +2888,11 @@ print_operand (file, x, code) { case EQ: fputs ("0xa", file); return; case NE: fputs ("0x5", file); return; - case GT: fputs (m88k_register_prefix, file); - fputs ("gt0", file); return; + case GT: + if (0) /* SVR4 */ + fputs (m88k_register_prefix, file); + fputs ("gt0", file); + return; case LE: fputs ("0xe", file); return; case LT: fputs ("0x4", file); return; case GE: fputs ("0xb", file); return; @@ -3278,37 +3106,6 @@ symbolic_operand (op, mode) } } -#if defined (CTOR_LIST_BEGIN) && !defined (OBJECT_FORMAT_ELF) -static void -m88k_svr3_asm_out_constructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; -{ - const char *name = XSTR (symbol, 0); - - init_section (); - fprintf (asm_out_file, "\tor.u\t r13,r0,hi16("); - assemble_name (asm_out_file, name); - fprintf (asm_out_file, ")\n\tor\t r13,r13,lo16("); - assemble_name (asm_out_file, name); - fprintf (asm_out_file, ")\n\tsubu\t r31,r31,%d\n\tst\t r13,r31,%d\n", - STACK_BOUNDARY / BITS_PER_UNIT, REG_PARM_STACK_SPACE (0)); -} - -static void -m88k_svr3_asm_out_destructor (symbol, priority) - rtx symbol; - int priority ATTRIBUTE_UNUSED; -{ - int i; - - fini_section (); - assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1); - for (i = 1; i < 4; i++) - assemble_integer (constm1_rtx, UNITS_PER_WORD, BITS_PER_WORD, 1); -} -#endif /* INIT_SECTION_ASM_OP && ! OBJECT_FORMAT_ELF */ - /* Adjust the cost of INSN based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. @@ -3354,16 +3151,6 @@ m88k_override_options () if ((target_flags & MASK_EITHER_LARGE_SHIFT) == MASK_EITHER_LARGE_SHIFT) error ("-mtrap-large-shift and -mhandle-large-shift are incompatible"); - if (TARGET_SVR4) - { - m88k_register_prefix = "#"; - } - else - { - target_flags |= MASK_SVR3; - target_flags &= ~MASK_SVR4; - } - if (TARGET_OMIT_LEAF_FRAME_POINTER) /* keep nonleaf frame pointers */ flag_omit_frame_pointer = 1; } diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h index e8f948b5d8a..018fd6305f8 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h @@ -55,16 +55,6 @@ Boston, MA 02111-1307, USA. */ System V ABI Implementation Guide for the M88000 Processor, Release 1.0, January 1991 A companion ABI document from 88open. */ - -/* Other *.h files in config/m88k include this one and override certain items. - Currently these are sysv3.h, sysv4.h, dgux.h, dolph.h, tekXD88.h, and luna.h. - Additionally, sysv4.h and dgux.h include svr4.h first. All other - m88k targets except luna.h are based on svr3.h. */ - -/* Choose SVR3 as the default. */ -#if !defined(DBX_DEBUGGING_INFO) && !defined(DWARF_DEBUGGING_INFO) -#include "svr3.h" -#endif /* External types used. */ @@ -96,8 +86,6 @@ enum processor_type { extern char m88k_volatile_code; -extern int m88k_prologue_done; -extern int m88k_function_number; extern int m88k_fp_offset; extern int m88k_stack_size; extern int m88k_case_index; @@ -121,17 +109,10 @@ extern int target_flags; /* -m compiler switches */ #undef CPP_SPEC #define CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \ %{!m88000:%{!m88110:-D__m88100__}}" - -/* LIB_SPEC, LINK_SPEC, and STARTFILE_SPEC defined in svr3.h. - ASM_SPEC, ASM_FINAL_SPEC, LIB_SPEC, LINK_SPEC, and STARTFILE_SPEC redefined - in svr4.h. - CPP_SPEC, ASM_SPEC, ASM_FINAL_SPEC, LIB_SPEC, LINK_SPEC, and - STARTFILE_SPEC redefined in dgux.h. */ /*** Run-time Target Specification ***/ -/* Names to predefine in the preprocessor for this target machine. - Redefined in sysv3.h, sysv4.h, dgux.h, and luna.h. */ +/* Names to predefine in the preprocessor for this target machine. */ #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -D__CLASSIFY_TYPE__=2" #define TARGET_VERSION fprintf (stderr, " (%s)", VERSION_INFO) @@ -150,31 +131,21 @@ extern int target_flags; /* -m compiler switches */ #define MASK_88110 0x00000002 /* Target m88110 */ #define MASK_88000 (MASK_88100 | MASK_88110) -#define MASK_OCS_DEBUG_INFO 0x00000004 /* Emit .tdesc info */ -#define MASK_OCS_FRAME_POSITION 0x00000008 /* Debug frame = CFA, not r30 */ -#define MASK_SVR4 0x00000010 /* Target is AT&T System V.4 */ -#define MASK_SVR3 0x00000020 /* Target is AT&T System V.3 */ -#define MASK_NO_UNDERSCORES 0x00000040 /* Don't emit a leading `_' */ #define MASK_TRAP_LARGE_SHIFT 0x00000100 /* Trap if shift not <= 31 */ #define MASK_HANDLE_LARGE_SHIFT 0x00000200 /* Handle shift count >= 32 */ #define MASK_CHECK_ZERO_DIV 0x00000400 /* Check for int div. by 0 */ #define MASK_USE_DIV 0x00000800 /* No signed div. checks */ -#define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ -#define MASK_MEMCPY 0x00010000 /* Always use memcpy for movstr */ +#define MASK_NO_SERIALIZE_VOLATILE 0x00001000 /* Serialize volatile refs */ +#define MASK_MEMCPY 0x00002000 /* Always use memcpy for movstr */ #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) -#define MASK_OMIT_LEAF_FRAME_POINTER 0x00020000 /* omit leaf frame pointers */ +#define MASK_OMIT_LEAF_FRAME_POINTER 0x00004000 /* omit leaf frame pointers */ #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100) #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110) #define TARGET_88000 ((target_flags & MASK_88000) == MASK_88000) -#define TARGET_OCS_DEBUG_INFO (target_flags & MASK_OCS_DEBUG_INFO) -#define TARGET_OCS_FRAME_POSITION (target_flags & MASK_OCS_FRAME_POSITION) -#define TARGET_SVR4 (target_flags & MASK_SVR4) -#define TARGET_SVR3 (target_flags & MASK_SVR3) -#define TARGET_NO_UNDERSCORES (target_flags & MASK_NO_UNDERSCORES) #define TARGET_TRAP_LARGE_SHIFT (target_flags & MASK_TRAP_LARGE_SHIFT) #define TARGET_HANDLE_LARGE_SHIFT (target_flags & MASK_HANDLE_LARGE_SHIFT) #define TARGET_CHECK_ZERO_DIV (target_flags & MASK_CHECK_ZERO_DIV) @@ -185,7 +156,6 @@ extern int target_flags; /* -m compiler switches */ #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT) #define TARGET_OMIT_LEAF_FRAME_POINTER (target_flags & MASK_OMIT_LEAF_FRAME_POINTER) -/* Redefined in sysv3.h, sysv4.h, and dgux.h. */ #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV) #define CPU_DEFAULT MASK_88100 @@ -194,13 +164,6 @@ extern int target_flags; /* -m compiler switches */ { "88110", MASK_88110 }, \ { "88100", MASK_88100 }, \ { "88000", MASK_88000 }, \ - { "ocs-debug-info", MASK_OCS_DEBUG_INFO }, \ - { "no-ocs-debug-info", -MASK_OCS_DEBUG_INFO }, \ - { "ocs-frame-position", MASK_OCS_FRAME_POSITION }, \ - { "no-ocs-frame-position", -MASK_OCS_FRAME_POSITION }, \ - { "svr4", MASK_SVR4 }, \ - { "svr3", -MASK_SVR4 }, \ - { "no-underscores", MASK_NO_UNDERSCORES }, \ { "trap-large-shift", MASK_TRAP_LARGE_SHIFT }, \ { "handle-large-shift", MASK_HANDLE_LARGE_SHIFT }, \ { "check-zero-division", MASK_CHECK_ZERO_DIV }, \ @@ -217,7 +180,6 @@ extern int target_flags; /* -m compiler switches */ { "", TARGET_DEFAULT }, \ } -/* Redefined in dgux.h. */ #define SUBTARGET_SWITCHES /* Do any checking or such that is needed after processing the -m switches. */ @@ -266,7 +228,7 @@ extern int target_flags; /* -m compiler switches */ only provided 8 byte alignment. The m88110 cache is small, so align to an 8 byte boundary. Pack code tightly when compiling crtstuff.c. */ #define FUNCTION_BOUNDARY (flag_inhibit_size_directive ? 32 : \ - (TARGET_88100 && TARGET_SVR4 ? 128 : 64)) + (TARGET_88100 ? 128 : 64)) /* No data type wants to be aligned rounder than this. */ #define BIGGEST_ALIGNMENT 64 @@ -306,6 +268,9 @@ extern int target_flags; /* -m compiler switches */ /*** Register Usage ***/ +/* No register prefixes by default. Will be overriden if necessary. */ +#undef REGISTER_PREFIX + /* Number of actual hardware registers. The hardware registers are assigned numbers for the compiler from 0 to just below FIRST_PSEUDO_REGISTER. @@ -930,8 +895,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, m88k_va_arg (valist, type) /* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. Redefined in sysv3.h, sysv4.h and - dgux.h. */ + for profiling a function entry. */ #define FUNCTION_PROFILER(FILE, LABELNO) \ output_function_profiler (FILE, LABELNO, "mcount") @@ -1357,10 +1321,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, /* Handle #pragma pack and sometimes #pragma weak. */ #define HANDLE_SYSV_PRAGMA 1 -/* Tell when to handle #pragma weak. This is only done for V.4. */ -#define SUPPORTS_WEAK TARGET_SVR4 -#define SUPPORTS_ONE_ONLY TARGET_SVR4 - /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ #define MOVE_MAX 8 @@ -1502,83 +1462,148 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, assembler language. The compiler assumes that the comment will end at the end of the line. */ #define ASM_COMMENT_START ";" - -/* Allow pseudo-ops to be overridden. Override these in svr[34].h. */ -#undef ASCII_DATA_ASM_OP -#undef READONLY_DATA_SECTION_ASM_OP -#undef CTORS_SECTION_ASM_OP -#undef DTORS_SECTION_ASM_OP -#undef TARGET_ASM_NAMED_SECTION -#undef INIT_SECTION_ASM_OP -#undef FINI_SECTION_ASM_OP -#undef TYPE_ASM_OP -#undef SIZE_ASM_OP -#undef SET_ASM_OP -#undef SKIP_ASM_OP -#undef COMMON_ASM_OP -#undef ALIGN_ASM_OP -#undef IDENT_ASM_OP + +/* Assembler specific opcodes. + Not overriding <elfos.h> if already included. */ +#ifndef OBJECT_FORMAT_ELF /* These are used in varasm.c as well. */ #define TEXT_SECTION_ASM_OP "\ttext" #define DATA_SECTION_ASM_OP "\tdata" -/* Other sections. */ -#define READONLY_DATA_SECTION_ASM_OP (TARGET_SVR4 \ - ? "\tsection\t .rodata,\"a\"" \ - : "\tsection\t .rodata,\"x\"") -#define TDESC_SECTION_ASM_OP (TARGET_SVR4 \ - ? "\tsection\t .tdesc,\"a\"" \ - : "\tsection\t .tdesc,\"x\"") - -/* These must be constant strings for crtstuff.c. */ -#define CTORS_SECTION_ASM_OP "\tsection\t .ctors,\"d\"" -#define DTORS_SECTION_ASM_OP "\tsection\t .dtors,\"d\"" -#define INIT_SECTION_ASM_OP "\tsection\t .init,\"x\"" -#define FINI_SECTION_ASM_OP "\tsection\t .fini,\"x\"" - /* These are pretty much common to all assemblers. */ +#undef IDENT_ASM_OP #define IDENT_ASM_OP "\tident\t" #define FILE_ASM_OP "\tfile\t" +#undef SET_ASM_OP #define SET_ASM_OP "\tdef\t" #define GLOBAL_ASM_OP "\tglobal\t" +#undef ALIGN_ASM_OP #define ALIGN_ASM_OP "\talign\t" +#undef SKIP_ASM_OP #define SKIP_ASM_OP "\tzero\t" +#undef COMMON_ASM_OP #define COMMON_ASM_OP "\tcomm\t" #define BSS_ASM_OP "\tbss\t" #define FLOAT_ASM_OP "\tfloat\t" #define DOUBLE_ASM_OP "\tdouble\t" +#undef ASCII_DATA_ASM_OP #define ASCII_DATA_ASM_OP "\tstring\t" -/* These are particular to the global pool optimization. */ -#define SBSS_ASM_OP "\tsbss\t" -#define SCOMM_ASM_OP "\tscomm\t" -#define SDATA_SECTION_ASM_OP "\tsdata" - /* These are specific to PIC. */ +#undef TYPE_ASM_OP #define TYPE_ASM_OP "\ttype\t" +#undef SIZE_ASM_OP #define SIZE_ASM_OP "\tsize\t" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT #define TYPE_OPERAND_FMT "#%s" #endif -/* This is how we tell the assembler that a symbol is weak. */ - -#undef ASM_WEAKEN_LABEL -#define ASM_WEAKEN_LABEL(FILE,NAME) \ - do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while (0) - /* These are specific to version 03.00 assembler syntax. */ #define INTERNAL_ASM_OP "\tlocal\t" -#define VERSION_ASM_OP "\tversion\t" #define PUSHSECTION_ASM_OP "\tsection\t" #define POPSECTION_ASM_OP "\tprevious" /* These are specific to the version 04.00 assembler syntax. */ #define REQUIRES_88110_ASM_OP "\trequires_88110" +/* This is how we tell the assembler that a symbol is weak. */ +#undef ASM_WEAKEN_LABEL +#define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) + +/* Write the extra assembler code needed to declare a function properly. */ +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do { \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +/* Write the extra assembler code needed to declare an object properly. */ +#undef ASM_DECLARE_OBJECT_NAME +#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ + do { \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0); + +/* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + +#undef ASM_FINISH_DECLARE_OBJECT +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ +do { \ + } while (0) + +/* This is how to declare the size of a function. */ +#undef ASM_DECLARE_FUNCTION_SIZE +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do { \ + } while (0) + +/* The single-byte pseudo-op is the default. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ + output_ascii (FILE, ASCII_DATA_ASM_OP, 48, P, SIZE) + +/* Code to handle #ident directives. */ +#undef ASM_OUTPUT_IDENT +#ifdef DBX_DEBUGGING_INFO +#define ASM_OUTPUT_IDENT(FILE, NAME) +#else +#define ASM_OUTPUT_IDENT(FILE, NAME) \ + output_ascii (FILE, IDENT_ASM_OP, 4000, NAME, strlen (NAME)); +#endif + +/* This is how to store into the string LABEL + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. This must agree + with ASM_OUTPUT_INTERNAL_LABEL above, except for being prefixed + with an `*'. */ + +#undef ASM_GENERATE_INTERNAL_LABEL +#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ + sprintf (LABEL, "*@%s%u", PREFIX, (unsigned) (NUM)) + +/* This is how to output an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + For ELF, labels use `.' rather than `@'. */ + +#undef ASM_OUTPUT_INTERNAL_LABEL +#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + fprintf (FILE, "@%s%u:\n", PREFIX, (unsigned) (NUM)) + +/* The prefix to add to user-visible assembler symbols. */ +#undef USER_LABEL_PREFIX +#define USER_LABEL_PREFIX "_" + +#undef ASM_OUTPUT_COMMON +#undef ASM_OUTPUT_ALIGNED_COMMON +#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ +( fprintf ((FILE), "%s", COMMON_ASM_OP), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u\n", (SIZE) ? (SIZE) : 1)) + +/* This says how to output an assembler line to define a local common + symbol. */ +#undef ASM_OUTPUT_LOCAL +#undef ASM_OUTPUT_ALIGNED_LOCAL +#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ +( fprintf ((FILE), "%s", BSS_ASM_OP), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8)) + +#undef ASM_OUTPUT_SKIP +#define ASM_OUTPUT_SKIP(FILE,SIZE) \ + fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE)) + +#endif /* OBJECT_FORMAT_ELF */ + /* Output any initial stuff to the assembly file. Always put out a file directive, even if not debugging. @@ -1602,34 +1627,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, 2 Global names have been converted to lower case 3 Global names have been converted to upper case. */ -#ifdef SDB_DEBUGGING_INFO -#define ASM_COFFSEM(FILE) \ - if (write_symbols == SDB_DEBUG) \ - { \ - fprintf (FILE, "\nsem.%x:\t\t; %s\n", \ - (((TARGET_OCS_FRAME_POSITION) ? 2 : 1) << 0) + (1 << 2) + (1 << 4),\ - (TARGET_OCS_FRAME_POSITION) \ - ? "frame is CFA, normal array dims, case unchanged" \ - : "frame is r30, normal array dims, case unchanged"); \ - } -#else -#define ASM_COFFSEM(FILE) -#endif - -/* Output the first line of the assembly file. Redefined in dgux.h. */ - -#define ASM_FIRST_LINE(FILE) \ - do { \ - if (TARGET_SVR4) \ - { \ - if (TARGET_88110) \ - fprintf (FILE, "%s\"%s\"\n", VERSION_ASM_OP, "04.00"); \ - else \ - fprintf (FILE, "%s\"%s\"\n", VERSION_ASM_OP, "03.00"); \ - } \ - } while (0) - -/* Override svr[34].h. */ #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ output_file_start (FILE) @@ -1643,23 +1640,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, putc ('\n', FILE); \ } while (0) -#ifdef SDB_DEBUGGING_INFO -#undef ASM_OUTPUT_SOURCE_LINE -#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ - if (m88k_prologue_done) \ - fprintf (FILE, "\n\tln\t %d\t\t\t\t; Real source line %d\n",\ - LINE - sdb_begin_function_line, LINE) -#endif - -/* Code to handle #ident directives. Override svr[34].h definition. */ -#undef ASM_OUTPUT_IDENT -#ifdef DBX_DEBUGGING_INFO -#define ASM_OUTPUT_IDENT(FILE, NAME) -#else -#define ASM_OUTPUT_IDENT(FILE, NAME) \ - output_ascii (FILE, IDENT_ASM_OP, 4000, NAME, strlen (NAME)); -#endif - /* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */ #define ASM_APP_ON "" @@ -1707,119 +1687,22 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, #define ADDITIONAL_REGISTER_NAMES {{"psr", 0}, {"cc", 0}} -/* Tell when to declare ASM names. Override svr4.h to provide this hook. */ -#undef DECLARE_ASM_NAME -#define DECLARE_ASM_NAME TARGET_SVR4 - -/* Write the extra assembler code needed to declare a function properly. */ -#undef ASM_DECLARE_FUNCTION_NAME -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - do { \ - if (DECLARE_ASM_NAME) \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } while (0) - -/* Write the extra assembler code needed to declare an object properly. */ -#undef ASM_DECLARE_OBJECT_NAME -#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ - do { \ - if (DECLARE_ASM_NAME) \ - { \ - HOST_WIDE_INT size; \ - \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ - \ - size_directive_output = 0; \ - if (!flag_inhibit_size_directive \ - && (DECL) && DECL_SIZE (DECL)) \ - { \ - size_directive_output = 1; \ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ - } \ - } \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } while (0); - -/* Output the size directive for a decl in rest_of_decl_compilation - in the case where we did not do so before the initializer. - Once we find the error_mark_node, we know that the value of - size_directive_output was set - by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ - -#undef ASM_FINISH_DECLARE_OBJECT -#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ -do { \ - const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - HOST_WIDE_INT size; \ - if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ - && DECLARE_ASM_NAME \ - && ! AT_END && TOP_LEVEL \ - && DECL_INITIAL (DECL) == error_mark_node \ - && !size_directive_output) \ - { \ - size_directive_output = 1; \ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ - } \ - } while (0) - -/* This is how to declare the size of a function. */ -#undef ASM_DECLARE_FUNCTION_SIZE -#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ - do { \ - if (DECLARE_ASM_NAME && !flag_inhibit_size_directive) \ - ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ - } while (0) - -/* The prefix to add to user-visible assembler symbols. - Override svr[34].h. */ -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "_" - -/* This is how to output a reference to a user-level label named NAME. - Override svr[34].h. */ +/* This is how to output a reference to a user-level label named NAME. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(FILE,NAME) \ - { \ - if (!TARGET_NO_UNDERSCORES && !TARGET_SVR4) \ - fputc ('_', FILE); \ - fputs (NAME, FILE); \ - } - -/* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - For V.4, labels use `.' rather than `@'. */ + asm_fprintf ((FILE), "%U%s", (NAME)) -#undef ASM_OUTPUT_INTERNAL_LABEL -#ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */ -#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n%s.%s%d\n" : "@%s%d:\n", \ - PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM) -#else -#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ - fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n" : "@%s%d:\n", PREFIX, NUM) -#endif /* AS_BUG_DOT_LABELS */ - -/* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. This must agree - with ASM_OUTPUT_INTERNAL_LABEL above, except for being prefixed - with an `*'. */ - -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, TARGET_SVR4 ? "*.%s%ld" : "*@%s%ld", PREFIX, (long)(NUM)) - -/* The single-byte pseudo-op is the default. Override svr[34].h. */ -#undef ASM_OUTPUT_ASCII -#define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ - output_ascii (FILE, ASCII_DATA_ASM_OP, 48, P, SIZE) +/* Store in OUTPUT a string (made with alloca) containing + an assembler-name for a local static variable named NAME. + LABELNO is an integer which is different for each call. */ +#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + do { \ + (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10); \ + sprintf ((OUTPUT), "%s.%u", (NAME), (unsigned) (LABELNO)); \ + } while (0) -/* Override svr4.h. Change to the readonly data section for a table of - addresses. final_scan_insn changes back to the text section. */ +/* Change to the readonly data section for a table of addresses. + final_scan_insn changes back to the text section. */ #undef ASM_OUTPUT_CASE_LABEL #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \ do { \ @@ -1874,40 +1757,9 @@ do { \ #define LABEL_ALIGN_AFTER_BARRIER(LABEL) \ (TARGET_88100 && !flag_inhibit_size_directive ? 3 : 2) -/* Override svr[34].h. */ -#undef ASM_OUTPUT_SKIP -#define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE)) - -/* Override svr4.h. */ +/* Override elfos.h. */ #undef ASM_OUTPUT_EXTERNAL_LIBCALL -/* This says how to output an assembler line to define a global common - symbol. Size can be zero for the unusual case of a `struct { int : 0; }'. - Override svr[34].h. */ -#undef ASM_OUTPUT_COMMON -#undef ASM_OUTPUT_ALIGNED_COMMON -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ -( fprintf ((FILE), "%s", COMMON_ASM_OP), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (SIZE) ? (SIZE) : 1)) - -/* This says how to output an assembler line to define a local common - symbol. Override svr[34].h. */ -#undef ASM_OUTPUT_LOCAL -#undef ASM_OUTPUT_ALIGNED_LOCAL -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ -( fprintf ((FILE), "%s", BSS_ASM_OP), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8)) - -/* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable named NAME. - LABELNO is an integer which is different for each call. */ -#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ -( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ - sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) - /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ @@ -1933,264 +1785,13 @@ do { \ /* Length in instructions of the code output by ASM_OUTPUT_REG_POP. */ #define REG_POP_LENGTH 2 -/* Macros to deal with OCS debug information */ - -#define OCS_START_PREFIX "Ltb" -#define OCS_END_PREFIX "Lte" - -#define PUT_OCS_FUNCTION_START(FILE) \ - { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_START_PREFIX, m88k_function_number); } - -#define PUT_OCS_FUNCTION_END(FILE) \ - { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_END_PREFIX, m88k_function_number); } - /* Macros for debug information */ #define DEBUGGER_AUTO_OFFSET(X) \ - (m88k_debugger_offset (X, 0) \ - + (TARGET_OCS_FRAME_POSITION ? 0 : m88k_stack_size - m88k_fp_offset)) + (m88k_debugger_offset (X, 0) + (m88k_stack_size - m88k_fp_offset)) #define DEBUGGER_ARG_OFFSET(OFFSET, X) \ - (m88k_debugger_offset (X, OFFSET) \ - + (TARGET_OCS_FRAME_POSITION ? 0 : m88k_stack_size - m88k_fp_offset)) - -/* Macros to deal with SDB debug information */ -#ifdef SDB_DEBUGGING_INFO - -/* Output structure tag names even when it causes a forward reference. */ -#define SDB_ALLOW_FORWARD_REFERENCES - -/* Print out extra debug information in the assembler file */ -#define PUT_SDB_SCL(a) \ - do { \ - register int s = (a); \ - register const char *scl; \ - switch (s) \ - { \ - case C_EFCN: scl = "end of function"; break; \ - case C_NULL: scl = "NULL storage class"; break; \ - case C_AUTO: scl = "automatic"; break; \ - case C_EXT: scl = "external"; break; \ - case C_STAT: scl = "static"; break; \ - case C_REG: scl = "register"; break; \ - case C_EXTDEF: scl = "external definition"; break; \ - case C_LABEL: scl = "label"; break; \ - case C_ULABEL: scl = "undefined label"; break; \ - case C_MOS: scl = "structure member"; break; \ - case C_ARG: scl = "argument"; break; \ - case C_STRTAG: scl = "structure tag"; break; \ - case C_MOU: scl = "union member"; break; \ - case C_UNTAG: scl = "union tag"; break; \ - case C_TPDEF: scl = "typedef"; break; \ - case C_USTATIC: scl = "uninitialized static"; break; \ - case C_ENTAG: scl = "enumeration tag"; break; \ - case C_MOE: scl = "member of enumeration"; break; \ - case C_REGPARM: scl = "register parameter"; break; \ - case C_FIELD: scl = "bit field"; break; \ - case C_BLOCK: scl = "block start/end"; break; \ - case C_FCN: scl = "function start/end"; break; \ - case C_EOS: scl = "end of structure"; break; \ - case C_FILE: scl = "filename"; break; \ - case C_LINE: scl = "line"; break; \ - case C_ALIAS: scl = "duplicated tag"; break; \ - case C_HIDDEN: scl = "hidden"; break; \ - default: scl = "unknown"; break; \ - } \ - \ - fprintf(asm_out_file, "\tscl\t %d\t\t\t\t; %s\n", s, scl); \ - } while (0) - -#define PUT_SDB_TYPE(a) \ - do { \ - register int t = (a); \ - static char buffer[100]; \ - register char *p = buffer; \ - register const char *q; \ - register int typ = t; \ - register int i; \ - \ - for (i = 0; i <= 5; i++) \ - { \ - switch ((typ >> ((i*N_TSHIFT) + N_BTSHFT)) & 03) \ - { \ - case DT_PTR: \ - strcpy (p, "ptr to "); \ - p += sizeof("ptr to"); \ - break; \ - \ - case DT_ARY: \ - strcpy (p, "array of "); \ - p += sizeof("array of"); \ - break; \ - \ - case DT_FCN: \ - strcpy (p, "func ret "); \ - p += sizeof("func ret"); \ - break; \ - } \ - } \ - \ - switch (typ & N_BTMASK) \ - { \ - case T_NULL: q = "<no type>"; break; \ - case T_CHAR: q = "char"; break; \ - case T_SHORT: q = "short"; break; \ - case T_INT: q = "int"; break; \ - case T_LONG: q = "long"; break; \ - case T_FLOAT: q = "float"; break; \ - case T_DOUBLE: q = "double"; break; \ - case T_STRUCT: q = "struct"; break; \ - case T_UNION: q = "union"; break; \ - case T_ENUM: q = "enum"; break; \ - case T_MOE: q = "enum member"; break; \ - case T_UCHAR: q = "unsigned char"; break; \ - case T_USHORT: q = "unsigned short"; break; \ - case T_UINT: q = "unsigned int"; break; \ - case T_ULONG: q = "unsigned long"; break; \ - default: q = "void"; break; \ - } \ - \ - strcpy (p, q); \ - fprintf(asm_out_file, "\ttype\t %d\t\t\t\t; %s\n", \ - t, buffer); \ - } while (0) - -#define PUT_SDB_INT_VAL(a) \ - fprintf (asm_out_file, "\tval\t %d\n", (a)) - -#define PUT_SDB_VAL(a) \ -( fprintf (asm_out_file, "\tval\t "), \ - output_addr_const (asm_out_file, (a)), \ - fputc ('\n', asm_out_file)) - -#define PUT_SDB_DEF(a) \ - do { fprintf (asm_out_file, "\tsdef\t "); \ - ASM_OUTPUT_LABELREF (asm_out_file, a); \ - fputc ('\n', asm_out_file); \ - } while (0) - -#define PUT_SDB_PLAIN_DEF(a) \ - fprintf(asm_out_file,"\tsdef\t .%s\n", a) - -/* Simply and endef now. */ -#define PUT_SDB_ENDEF \ - fputs("\tendef\n\n", asm_out_file) - -#define PUT_SDB_SIZE(a) \ - fprintf (asm_out_file, "\tsize\t %d\n", (a)) - -/* Max dimensions to store for debug information (limited by COFF). */ -#define SDB_MAX_DIM 6 - -/* New method for dim operations. */ -#define PUT_SDB_START_DIM \ - fputs("\tdim\t ", asm_out_file) - -/* How to end the DIM sequence. */ -#define PUT_SDB_LAST_DIM(a) \ - fprintf(asm_out_file, "%d\n", a) - -#define PUT_SDB_TAG(a) \ - do { \ - fprintf (asm_out_file, "\ttag\t "); \ - ASM_OUTPUT_LABELREF (asm_out_file, a); \ - fputc ('\n', asm_out_file); \ - } while( 0 ) - -#define PUT_SDB_BLOCK_OR_FUNCTION(NAME, SCL, LINE) \ - do { \ - fprintf (asm_out_file, "\n\tsdef\t %s\n\tval\t .\n", \ - NAME); \ - PUT_SDB_SCL( SCL ); \ - fprintf (asm_out_file, "\tline\t %d\n\tendef\n\n", \ - (LINE)); \ - } while (0) - -#define PUT_SDB_BLOCK_START(LINE) \ - PUT_SDB_BLOCK_OR_FUNCTION (".bb", C_BLOCK, (LINE)) - -#define PUT_SDB_BLOCK_END(LINE) \ - PUT_SDB_BLOCK_OR_FUNCTION (".eb", C_BLOCK, (LINE)) - -#define PUT_SDB_FUNCTION_START(LINE) \ - do { \ - fprintf (asm_out_file, "\tln\t 1\n"); \ - PUT_SDB_BLOCK_OR_FUNCTION (".bf", C_FCN, (LINE)); \ - } while (0) - -#define PUT_SDB_FUNCTION_END(LINE) \ - do { \ - PUT_SDB_BLOCK_OR_FUNCTION (".ef", C_FCN, (LINE)); \ - } while (0) - -#define PUT_SDB_EPILOGUE_END(NAME) \ - do { \ - text_section (); \ - fprintf (asm_out_file, "\n\tsdef\t "); \ - ASM_OUTPUT_LABELREF(asm_out_file, (NAME)); \ - fputc('\n', asm_out_file); \ - PUT_SDB_SCL( C_EFCN ); \ - fprintf (asm_out_file, "\tendef\n\n"); \ - } while (0) - -#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ - sprintf ((BUFFER), ".%dfake", (NUMBER)); - -#endif /* SDB_DEBUGGING_INFO */ + (m88k_debugger_offset (X, OFFSET) + (m88k_stack_size - m88k_fp_offset)) -/* Support const and tdesc sections. Generally, a const section will - be distinct from the text section whenever we do V.4-like things - and so follows DECLARE_ASM_NAME. Note that strings go in text - rather than const. Override svr[34].h. */ - -#undef EXTRA_SECTIONS - -#if defined(USING_SVR4_H) - -#define EXTRA_SECTIONS in_tdesc, in_sdata -#define INIT_SECTION_FUNCTION -#define FINI_SECTION_FUNCTION - -#else -#if defined(USING_SVR3_H) - -#define EXTRA_SECTIONS in_tdesc, in_sdata, in_init, in_fini - -#else /* luna or other not based on svr[34].h. */ - -#undef READONLY_DATA_SECTION_ASM_OP -#undef INIT_SECTION_ASM_OP -#define EXTRA_SECTIONS in_tdesc, in_sdata -#define INIT_SECTION_FUNCTION -#define FINI_SECTION_FUNCTION - -#endif /* USING_SVR3_H */ -#endif /* USING_SVR4_H */ - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ -void \ -tdesc_section () \ -{ \ - if (in_section != in_tdesc) \ - { \ - fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \ - in_section = in_tdesc; \ - } \ -} \ - \ -void \ -sdata_section () \ -{ \ - if (in_section != in_sdata) \ - { \ - fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ - in_section = in_sdata; \ - } \ -} \ - \ - INIT_SECTION_FUNCTION \ - FINI_SECTION_FUNCTION - /* Jump tables consist of branch instructions and should be output in the text section. When we use a table of addresses, we explicitly change to the readonly data section. */ @@ -2209,5 +1810,4 @@ sdata_section () \ /* This says not to strength reduce the addr calculations within loops (otherwise it does not take advantage of m88k scaled loads and stores */ - #define DONT_REDUCE_ADDR diff --git a/gnu/usr.bin/gcc/gcc/doc/invoke.texi b/gnu/usr.bin/gcc/gcc/doc/invoke.texi index 677658eafec..5b3c2096131 100644 --- a/gnu/usr.bin/gcc/gcc/doc/invoke.texi +++ b/gnu/usr.bin/gcc/gcc/doc/invoke.texi @@ -390,11 +390,7 @@ in the following sections. -mcheck-zero-division -mno-check-zero-division @gol -muse-div-instruction @gol -mserialize-volatile -mno-serialize-volatile @gol --mhandle-large-shift -mtrap-large-shift @gol --mno-underscores @gol --mno-ocs-debug-info -mocs-debug-info @gol --mno-ocs-frame-position -mocs-frame-position @gol --msvr3 -msvr4} +-mhandle-large-shift -mtrap-large-shift} @emph{RS/6000 and PowerPC Options} @gccoptlist{-mcpu=@var{cpu-type} @gol @@ -6441,45 +6437,6 @@ runs on the m88110. Generate code that works best for the m88110, and may not run on the m88100. -@item -mno-underscores -@opindex mno-underscores -@cindex underscores, avoiding (88k) -In assembler output, emit symbol names without adding an underscore -character at the beginning of each name. The default is to use an -underscore as prefix on each name. - -@item -mocs-debug-info -@itemx -mno-ocs-debug-info -@opindex mocs-debug-info -@opindex mno-ocs-debug-info -@cindex OCS (88k) -@cindex debugging, 88k OCS -Include (or omit) additional debugging information (about registers used -in each stack frame) as specified in the 88open Object Compatibility -Standard, ``OCS''@. This extra information allows debugging of code that -has had the frame pointer eliminated. The default for SVr4 and Delta 88 -SVr3.2 is to include this information; other 88k configurations omit this -information by default. - -@item -mocs-frame-position -@opindex mocs-frame-position -@cindex register positions in frame (88k) -When emitting COFF debugging information for automatic variables and -parameters stored on the stack, use the offset from the canonical frame -address, which is the stack pointer (register 31) on entry to the -function. The SVr4 and Delta88 SVr3.2, and BCS configurations use -@option{-mocs-frame-position}; other 88k configurations have the default -@option{-mno-ocs-frame-position}. - -@item -mno-ocs-frame-position -@opindex mno-ocs-frame-position -@cindex register positions in frame (88k) -When emitting COFF debugging information for automatic variables and -parameters stored on the stack, use the offset from the frame pointer -register (register 30). When this option is in effect, the frame -pointer is not eliminated when debugging information is selected by the --g switch. - @item -mserialize-volatile @opindex mserialize-volatile @itemx -mno-serialize-volatile @@ -6509,29 +6466,6 @@ The extra code generated to guarantee consistency may affect the performance of your application. If you know that you can safely forgo this guarantee, you may use @option{-mno-serialize-volatile}. -@item -msvr4 -@itemx -msvr3 -@opindex msvr4 -@opindex msvr3 -@cindex assembler syntax, 88k -@cindex SVr4 -Turn on (@option{-msvr4}) or off (@option{-msvr3}) compiler extensions -related to System V release 4 (SVr4). This controls the following: - -@enumerate -@item -Which variant of the assembler syntax to emit. -@item -@option{-msvr4} makes the C preprocessor recognize @samp{#pragma weak} -that is used on System V release 4. -@item -@option{-msvr4} makes GCC issue additional declaration directives used in -SVr4. -@end enumerate - -@option{-msvr4} is the default for the m88k-motorola-sysv4 configuration. -@option{-msvr3} is the default for all other m88k configurations. - @item -mno-check-zero-division @itemx -mcheck-zero-division @opindex mno-check-zero-division |