--- gcc/config/alpha/alpha.c 2018/04/24 18:10:26 1.1.1.1 +++ gcc/config/alpha/alpha.c 2018/04/24 18:22:29 1.1.1.3 @@ -1,6 +1,6 @@ /* Subroutines used for code generation on the DEC Alpha. - Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@nyu.edu) + Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -48,11 +48,20 @@ int alpha_compare_fp_p; char *alpha_function_name; +/* Non-zero if inside of a function, because the Alpha asm can't + handle .files inside of functions. */ + +static int inside_function = FALSE; + /* Nonzero if the current function needs gp. */ int alpha_function_needs_gp; extern char *version_string; + +/* Declarations of static functions. */ +static void alpha_set_memflags_1 PROTO((rtx, int, int, int)); +static void add_long_const PROTO((FILE *, HOST_WIDE_INT, int, int, int)); /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */ @@ -81,6 +90,20 @@ reg_or_0_operand (op, mode) return op == const0_rtx || register_operand (op, mode); } +/* Return 1 if OP is a constant in the range of 0-63 (for a shift) or + any register. */ + +int +reg_or_6bit_operand (op, mode) + register rtx op; + enum machine_mode mode; +{ + return ((GET_CODE (op) == CONST_INT + && (unsigned HOST_WIDE_INT) INTVAL (op) < 64) + || register_operand (op, mode)); +} + + /* Return 1 if OP is an 8-bit constant or any register. */ int @@ -93,6 +116,17 @@ reg_or_8bit_operand (op, mode) || register_operand (op, mode)); } +/* Return 1 if OP is an 8-bit constant. */ + +int +cint8_operand (op, mode) + register rtx op; + enum machine_mode mode; +{ + return (GET_CODE (op) == CONST_INT + && (unsigned HOST_WIDE_INT) INTVAL (op) < 0x100); +} + /* Return 1 if the operand is a valid second operand to an add insn. */ int @@ -154,6 +188,20 @@ and_operand (op, mode) return register_operand (op, mode); } +/* Return 1 if OP is a valid first operand to an IOR or XOR insn. */ + +int +or_operand (op, mode) + register rtx op; + enum machine_mode mode; +{ + if (GET_CODE (op) == CONST_INT) + return ((unsigned HOST_WIDE_INT) INTVAL (op) < 0x100 + || (unsigned HOST_WIDE_INT) ~ INTVAL (op) < 0x100); + + return register_operand (op, mode); +} + /* Return 1 if OP is a constant that is the width, in bits, of an integral mode smaller than DImode. */ @@ -179,13 +227,13 @@ mode_mask_operand (op, mode) return CONST_DOUBLE_HIGH (op) == 0 && CONST_DOUBLE_LOW (op) == -1; #endif - if (GET_CODE (op) == CONST_INT) - return (INTVAL (op) == 0xff - || INTVAL (op) == 0xffff + return (GET_CODE (op) == CONST_INT + && (INTVAL (op) == 0xff + || INTVAL (op) == 0xffff #if HOST_BITS_PER_WIDE_INT == 64 - || INTVAL (op) == 0xffffffff + || INTVAL (op) == 0xffffffff #endif - ); + )); } /* Return 1 if OP is a multiple of 8 less than 64. */ @@ -232,6 +280,30 @@ reg_or_cint_operand (op, mode) return GET_CODE (op) == CONST_INT || register_operand (op, mode); } +/* Return 1 if OP is something that can be reloaded into a register; + if it is a MEM, it need not be valid. */ + +int +some_operand (op, mode) + register rtx op; + enum machine_mode mode; +{ + if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) + return 0; + + switch (GET_CODE (op)) + { + case REG: case MEM: case CONST_DOUBLE: + case CONST_INT: case LABEL_REF: case SYMBOL_REF: case CONST: + return 1; + + case SUBREG: + return some_operand (SUBREG_REG (op), VOIDmode); + } + + return 0; +} + /* Return 1 if OP is a valid operand for the source of a move insn. */ int @@ -285,6 +357,20 @@ current_file_function_operand (op, mode) || op == XEXP (DECL_RTL (current_function_decl), 0))); } +/* Return 1 if OP is a valid operand for the MEM of a CALL insn. */ + +int +call_operand (op, mode) + rtx op; + enum machine_mode mode; +{ + if (mode != Pmode) + return 0; + + return (GET_CODE (op) == SYMBOL_REF + || (GET_CODE (op) == REG && REGNO (op) == 27)); +} + /* Return 1 if OP is a valid Alpha comparison operator. Here we know which comparisons are valid in which insn. */ @@ -371,7 +457,8 @@ aligned_memory_operand (op, mode) op = XEXP (op, 0); return (GET_CODE (op) == REG - && (REGNO (op) == STACK_POINTER_REGNUM || op == frame_pointer_rtx + && (REGNO (op) == STACK_POINTER_REGNUM + || op == hard_frame_pointer_rtx || (REGNO (op) >= FIRST_VIRTUAL_REGISTER && REGNO (op) <= LAST_VIRTUAL_REGISTER))); } @@ -407,7 +494,8 @@ unaligned_memory_operand (op, mode) op = XEXP (op, 0); return (GET_CODE (op) != REG - || (REGNO (op) != STACK_POINTER_REGNUM && op != frame_pointer_rtx + || (REGNO (op) != STACK_POINTER_REGNUM + && op != hard_frame_pointer_rtx && (REGNO (op) < FIRST_VIRTUAL_REGISTER || REGNO (op) > LAST_VIRTUAL_REGISTER))); } @@ -1023,10 +1111,23 @@ alpha_builtin_saveregs (arglist) != void_type_node)); /* Compute the current position into the args, taking into account - both registers and memory. */ + both registers and memory. Both of these are already included in + current_function_args_info. */ + + argsize = GEN_INT (current_function_args_info * UNITS_PER_WORD); - argsize = plus_constant (current_function_arg_offset_rtx, - current_function_args_info * UNITS_PER_WORD); + /* SETUP_INCOMING_VARARGS moves the starting address base up by 48, + storing fp arg registers in the first 48 bytes, and the integer arg + registers in the next 48 bytes. This is only done, however, if any + integer registers need to be stored. + + If no integer registers need be stored, then we must subtract 48 in + order to account for the integer arg registers which are counted in + argsize above, but which are not actually stored on the stack. */ + + addr = (current_function_args_info <= 6 + ? plus_constant (virtual_incoming_args_rtx, 6 * UNITS_PER_WORD) + : plus_constant (virtual_incoming_args_rtx, - (6 * UNITS_PER_WORD))); /* Allocate the va_list constructor */ block = assign_stack_local (BLKmode, 2 * UNITS_PER_WORD, BITS_PER_WORD); @@ -1034,12 +1135,9 @@ alpha_builtin_saveregs (arglist) RTX_UNCHANGING_P (XEXP (block, 0)) = 1; /* Store the address of the first integer register in the - __va_base member. */ - - emit_move_insn (change_address (block, DImode, XEXP (block, 0)), - force_operand (plus_constant (virtual_incoming_args_rtx, - 6 * UNITS_PER_WORD), - NULL_RTX)); + __va_base member. */ + emit_move_insn (change_address (block, Pmode, XEXP (block, 0)), + force_operand (addr, NULL_RTX)); /* Store the argsize as the __va_offset member. */ emit_move_insn (change_address (block, Pmode, @@ -1073,6 +1171,10 @@ alpha_sa_size () if (size != 0 && ! regs_ever_live[26]) size++; + /* Our size must be even (multiple of 16 bytes). */ + if (size & 1) + size ++; + return size * 8; } @@ -1106,6 +1208,64 @@ alpha_write_verstamp (file) fprintf (file, "\n"); #endif } + +/* Write code to add constant C to register number IN_REG (possibly 31) + and put the result into OUT_REG. Use TEMP_REG as a scratch register; + usually this will be OUT_REG, but should not be if OUT_REG is + STACK_POINTER_REGNUM, since it must be updated in a single instruction. + Write the code to FILE. */ + +static void +add_long_const (file, c, in_reg, out_reg, temp_reg) + FILE *file; + HOST_WIDE_INT c; + int in_reg, out_reg, temp_reg; +{ + HOST_WIDE_INT low = (c & 0xffff) - 2 * (c & 0x8000); + HOST_WIDE_INT tmp1 = c - low; + HOST_WIDE_INT high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); + HOST_WIDE_INT extra = 0; + + /* We don't have code to write out constants larger than 32 bits. */ +#if HOST_BITS_PER_LONG_INT == 64 + if ((unsigned HOST_WIDE_INT) c >> 32 != 0) + abort (); +#endif + + /* If HIGH will be interpreted as negative, we must adjust it to do two + ldha insns. Note that we will never be building a negative constant + here. */ + + if (high & 0x8000) + { + extra = 0x4000; + tmp1 -= 0x40000000; + high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); + } + + if (low != 0) + { + int result_reg = (extra == 0 && high == 0) ? out_reg : temp_reg; + + if (low >= 0 && low < 255) + fprintf (file, "\taddq $%d,%d,$%d\n", in_reg, low, result_reg); + else + fprintf (file, "\tlda $%d,%d($%d)\n", result_reg, low, in_reg); + + in_reg = result_reg; + } + + if (extra) + { + int result_reg = (high == 0) ? out_reg : temp_reg; + + fprintf (file, "\tldah $%d,%d($%d)\n", result_reg, extra, in_reg); + in_reg = result_reg; + } + + if (high) + fprintf (file, "\tldah $%d,%d($%d)\n", out_reg, high, in_reg); +} /* Write function prologue. */ @@ -1114,15 +1274,52 @@ output_prolog (file, size) FILE *file; int size; { - HOST_WIDE_INT frame_size = ((size + current_function_outgoing_args_size - + current_function_pretend_args_size - + alpha_sa_size () + 15) & ~15); - int reg_offset = size + current_function_outgoing_args_size; + HOST_WIDE_INT out_args_size + = ALPHA_ROUND (current_function_outgoing_args_size); + HOST_WIDE_INT sa_size = alpha_sa_size (); + HOST_WIDE_INT frame_size + = (out_args_size + sa_size + + ALPHA_ROUND (size + current_function_pretend_args_size)); + HOST_WIDE_INT reg_offset = out_args_size; + HOST_WIDE_INT start_reg_offset = reg_offset; + HOST_WIDE_INT actual_start_reg_offset = start_reg_offset; + int int_reg_save_area_size = 0; rtx insn; - int start_reg_offset = reg_offset; unsigned reg_mask = 0; int i; + /* Ecoff can handle multiple .file directives, so put out file and lineno. + We have to do that before the .ent directive as we cannot switch + files within procedures with native ecoff because line numbers are + linked to procedure descriptors. + Outputting the lineno helps debugging of one line functions as they + would otherwise get no line number at all. Please note that we would + like to put out last_linenum from final.c, but it is not accesible. */ + + if (write_symbols == SDB_DEBUG) + { + ASM_OUTPUT_SOURCE_FILENAME (file, + DECL_SOURCE_FILE (current_function_decl)); + if (debug_info_level != DINFO_LEVEL_TERSE) + ASM_OUTPUT_SOURCE_LINE (file, + DECL_SOURCE_LINE (current_function_decl)); + } + + /* The assembly language programmer's guide states that the second argument + to the .ent directive, the lex_level, is ignored by the assembler, + so we might as well omit it. */ + + fprintf (file, "\t.ent "); + assemble_name (file, alpha_function_name); + fprintf (file, "\n"); + ASM_OUTPUT_LABEL (file, alpha_function_name); + inside_function = TRUE; + + /* Set up offsets to alpha virtual arg/local debugging pointer. */ + + alpha_auto_offset = -frame_size + current_function_pretend_args_size; + alpha_arg_offset = -frame_size + 48; + /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first. Even if we are a static function, we still need to do this in case our address is taken and passed to something like qsort. */ @@ -1133,7 +1330,8 @@ output_prolog (file, size) || (GET_RTX_CLASS (GET_CODE (insn)) == 'i' && GET_CODE (PATTERN (insn)) != USE && GET_CODE (PATTERN (insn)) != CLOBBER - && get_attr_type (insn) == TYPE_LDSYM)) + && (get_attr_type (insn) == TYPE_LDSYM + || get_attr_type (insn) == TYPE_ISUBR))) { alpha_function_needs_gp = 1; break; @@ -1143,7 +1341,8 @@ output_prolog (file, size) fprintf (file, "\tldgp $29,0($27)\n"); /* Put a label after the GP load so we can enter the function at it. */ - fprintf (file, "%s..ng:\n", alpha_function_name); + assemble_name (file, alpha_function_name); + fprintf (file, "..ng:\n"); /* Adjust the stack by the frame size. If the frame size is > 4096 bytes, we need to be sure we probe somewhere in the first and last @@ -1159,14 +1358,15 @@ output_prolog (file, size) if (frame_size > 4096) { int probed = 4096; - int regnum = 2; + int regnum = 2; /* $1 is static chain, so start with $2. */ fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed); while (probed + 8192 < frame_size) fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed += 8192); - if (probed + 4096 < frame_size) + /* We only have to do this probe if we aren't saving registers. */ + if (sa_size == 0 && probed + 4096 < frame_size) fprintf (file, "\tldq $%d,-%d($30)\n", regnum++, probed += 4096); if (regnum > 9) @@ -1181,73 +1381,46 @@ output_prolog (file, size) /* Here we generate code to set R4 to SP + 4096 and set R5 to the number of 8192 byte blocks to probe. We then probe each block in the loop and then set SP to the proper location. If the - amount remaining is > 4096, we have to do one more probe. - - This is complicated by the code we would generate if - the number of blocks > 32767. */ + amount remaining is > 4096, we have to do one more probe if we + are not saving any registers. */ HOST_WIDE_INT blocks = (frame_size + 4096) / 8192; HOST_WIDE_INT leftover = frame_size + 4096 - blocks * 8192; - HOST_WIDE_INT low = (blocks & 0xffff) - 2 * (blocks & 0x8000); - HOST_WIDE_INT tmp1 = blocks - low; - HOST_WIDE_INT high - = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); - HOST_WIDE_INT extra = 0; - int in_reg = 31; - - /* If HIGH will be interpreted as negative, we must adjust it to - do two ldha insns. Note that we will never be building a negative - constant here. */ - if (high & 0x8000) - { - extra = 0x4000; - tmp1 -= 0x40000000; - high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); - } + add_long_const (file, blocks, 31, 5, 5); - if (low != 0) - { - if (low < 255) - fprintf (file, "\tbis $31,%d,$5\n", low); - else - fprintf (file, "\tlda $5,%d($31)\n", low); - in_reg = 5; - } - - if (extra) - { - fprintf (file, "\tldah $5,%d($%d)\n", extra, in_reg); - in_reg = 5; - } + fprintf (file, "\tlda $4,4096($30)\n"); - if (high) - fprintf (file, "\tldah $5,%d($%d)\n", high, in_reg); + assemble_name (file, alpha_function_name); + fprintf (file, "..sc:\n"); - fprintf (file, "\tlda $4,4096($30)\n"); - fprintf (file, "%s..sc:\n", alpha_function_name); fprintf (file, "\tldq $6,-8192($4)\n"); fprintf (file, "\tsubq $5,1,$5\n"); fprintf (file, "\tlda $4,-8192($4)\n"); - fprintf (file, "\tbne $5,%s..sc\n", alpha_function_name); + + fprintf (file, "\tbne $5,"); + assemble_name (file, alpha_function_name); + fprintf (file, "..sc\n"); + fprintf (file, "\tlda $30,-%d($4)\n", leftover); - if (leftover > 4096) + if (leftover > 4096 && sa_size == 0) fprintf (file, "\tldq $2,%d($30)\n", leftover - 4096); } /* Describe our frame. */ fprintf (file, "\t.frame $%d,%d,$26,%d\n", - frame_pointer_needed ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM, + (frame_pointer_needed + ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM), frame_size, current_function_pretend_args_size); - /* Save register 26 if it is used or if any other register needs to - be saved. */ - if (regs_ever_live[26] || alpha_sa_size () != 0) + /* Save register 26 if any other register needs to be saved. */ + if (sa_size != 0) { reg_mask |= 1 << 26; fprintf (file, "\tstq $26,%d($30)\n", reg_offset); reg_offset += 8; + int_reg_save_area_size += 8; } /* Now save any other used integer registers required to be saved. */ @@ -1257,12 +1430,13 @@ output_prolog (file, size) reg_mask |= 1 << i; fprintf (file, "\tstq $%d,%d($30)\n", i, reg_offset); reg_offset += 8; + int_reg_save_area_size += 8; } /* Print the register mask and do floating-point saves. */ if (reg_mask) fprintf (file, "\t.mask 0x%x,%d\n", reg_mask, - start_reg_offset - frame_size); + actual_start_reg_offset - frame_size); start_reg_offset = reg_offset; reg_mask = 0; @@ -1278,7 +1452,8 @@ output_prolog (file, size) /* Print the floating-point mask, if we've saved any fp register. */ if (reg_mask) - fprintf (file, "\t.fmask 0x%x,%d\n", reg_mask, start_reg_offset); + fprintf (file, "\t.fmask 0x%x,%d\n", reg_mask, + actual_start_reg_offset - frame_size + int_reg_save_area_size); /* If we need a frame pointer, set it from the stack pointer. Note that this must always be the last instruction in the prologue. */ @@ -1297,10 +1472,16 @@ output_epilog (file, size) int size; { rtx insn = get_last_insn (); - HOST_WIDE_INT frame_size = ((size + current_function_outgoing_args_size - + current_function_pretend_args_size - + alpha_sa_size () + 15) & ~15); - int reg_offset = size + current_function_outgoing_args_size; + HOST_WIDE_INT out_args_size + = ALPHA_ROUND (current_function_outgoing_args_size); + HOST_WIDE_INT sa_size = alpha_sa_size (); + HOST_WIDE_INT frame_size + = (out_args_size + sa_size + + ALPHA_ROUND (size + current_function_pretend_args_size)); + HOST_WIDE_INT reg_offset = out_args_size; + HOST_WIDE_INT frame_size_from_reg_save = frame_size - reg_offset; + int restore_fp + = frame_pointer_needed && regs_ever_live[HARD_FRAME_POINTER_REGNUM]; int i; /* If the last insn was a BARRIER, we don't have to write anything except @@ -1317,7 +1498,7 @@ output_epilog (file, size) /* Restore all the registers, starting with the return address register. */ - if (regs_ever_live[26] || alpha_sa_size () != 0) + if (sa_size != 0) { fprintf (file, "\tldq $26,%d($30)\n", reg_offset); reg_offset += 8; @@ -1331,7 +1512,7 @@ output_epilog (file, size) if (! fixed_regs[i] && ! call_used_regs[i] && regs_ever_live[i] && i != 26) { - if (i == FRAME_POINTER_REGNUM && frame_pointer_needed) + if (i == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) fp_offset = reg_offset; else fprintf (file, "\tldq $%d,%d($30)\n", i, reg_offset); @@ -1346,71 +1527,127 @@ output_epilog (file, size) reg_offset += 8; } - /* If the stack size is large, compute the size of the stack into - a register because the old FP restore, stack pointer adjust, - and return are required to be consecutive instructions. */ - if (frame_size > 32767) - { - HOST_WIDE_INT low - = (frame_size & 0xffff) - 2 * (frame_size & 0x8000); - HOST_WIDE_INT tmp1 = frame_size - low; - HOST_WIDE_INT high - = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); - HOST_WIDE_INT extra = 0; - int in_reg = 31; + /* If the stack size is large and we have a frame pointer, compute the + size of the stack into a register because the old FP restore, stack + pointer adjust, and return are required to be consecutive + instructions. */ + if (frame_size > 32767 && restore_fp) + add_long_const (file, frame_size, 31, 1, 1); - /* We haven't written code to handle frames > 4GB. */ -#if HOST_BITS_PER_LONG_INT == 64 - if ((unsigned HOST_WIDE_INT) frame_size >> 32 != 0) - abort (); -#endif + /* If we needed a frame pointer and we have to restore it, do it + now. This must be done in one instruction immediately + before the SP update. */ + if (restore_fp) + fprintf (file, "\tldq $15,%d($30)\n", fp_offset); - /* If HIGH will be interpreted as negative, we must adjust it to - do two ldha insns. Note that we will never be building a negative - constant here. */ + /* Now update the stack pointer, if needed. Only one instruction must + modify the stack pointer. It must be the last instruction in the + sequence and must be an ADDQ or LDA instruction. If the frame + pointer was loaded above, we may only put one instruction here. */ - if (high & 0x8000) - { - extra = 0x4000; - tmp1 -= 0x40000000; - high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); - } + if (frame_size > 32768 && restore_fp) + fprintf (file, "\taddq $1,$30,$30\n"); + else + add_long_const (file, frame_size, 30, 30, 1); - if (low != 0) - { - fprintf (file, "\tlda $28,%d($%d)\n", low, in_reg); - in_reg = 28; - } + /* Finally return to the caller. */ + fprintf (file, "\tret $31,($26),1\n"); + } - if (extra) - { - fprintf (file, "\tldah $28,%d($%d)\n", extra, in_reg); - in_reg = 28; - } + /* End the function. */ + fprintf (file, "\t.end "); + assemble_name (file, alpha_function_name); + fprintf (file, "\n"); + inside_function = FALSE; +} + +/* Debugging support. */ - fprintf (file, "\tldah $28,%d($%d)\n", high, in_reg); - } +#include "gstab.h" - /* If we needed a frame pointer and we have to restore it, do it - now. */ +/* Count the number of sdb related labels are generated (to find block + start and end boundaries). */ - if (frame_pointer_needed && regs_ever_live[FRAME_POINTER_REGNUM]) - fprintf (file, "\tldq $15,%d($30)\n", fp_offset); +int sdb_label_count = 0; - /* Now update the stack pointer, if needed. This must be done in - one, stylized, instruction. */ - if (frame_size > 32768) - fprintf (file, "\taddq $28,$30,$30\n"); - else if (frame_size != 0) - fprintf (file, "\tlda $30,%d($30)\n", frame_size); +/* Next label # for each statement. */ - /* Finally return to the caller. */ - fprintf (file, "\tret $31,($26),1\n"); +static int sym_lineno = 0; + +/* Count the number of .file directives, so that .loc is up to date. */ + +static int num_source_filenames = 0; + +/* Name of the file containing the current function. */ + +static char *current_function_file = ""; + +/* Offsets to alpha virtual arg/local debugging pointers. */ + +long alpha_arg_offset; +long alpha_auto_offset; + +/* Emit a new filename to a stream. */ + +void +alpha_output_filename (stream, name) + FILE *stream; + char *name; +{ + static int first_time = TRUE; + char ltext_label_name[100]; + + if (first_time) + { + first_time = FALSE; + ++num_source_filenames; + current_function_file = name; + fprintf (stream, "\t.file\t%d ", num_source_filenames); + output_quoted_string (stream, name); + fprintf (stream, "\n"); + if (!TARGET_GAS && write_symbols == DBX_DEBUG) + fprintf (stream, "\t#@stabs\n"); } - /* End the function. */ - fprintf (file, "\t.end %s\n", alpha_function_name); + else if (!TARGET_GAS && write_symbols == DBX_DEBUG) + { + ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0); + fprintf (stream, "%s ", ASM_STABS_OP); + output_quoted_string (stream, name); + fprintf (stream, ",%d,0,0,%s\n", N_SOL, <ext_label_name[1]); + } - /* Show that we know this function if it is called again. */ - SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1; + else if (name != current_function_file + && strcmp (name, current_function_file) != 0) + { + if (inside_function && ! TARGET_GAS) + fprintf (stream, "\t#.file\t%d ", num_source_filenames); + else + { + ++num_source_filenames; + current_function_file = name; + fprintf (stream, "\t.file\t%d ", num_source_filenames); + } + + output_quoted_string (stream, name); + fprintf (stream, "\n"); + } +} + +/* Emit a linenumber to a stream. */ + +void +alpha_output_lineno (stream, line) + FILE *stream; + int line; +{ + if (! TARGET_GAS && write_symbols == DBX_DEBUG) + { + /* mips-tfile doesn't understand .stabd directives. */ + ++sym_lineno; + fprintf (stream, "$LM%d:\n\t%s %d,0,%d,$LM%d\n", + sym_lineno, ASM_STABN_OP, N_SLINE, line, sym_lineno); + } + else + fprintf (stream, "\n\t.loc\t%d %d\n", num_source_filenames, line); }