2001-08-12 Kazu Hirata <kazu@hxi.com>
+ * gcc.c: Fix comment formatting.
+ * gccspec.c: Likewise.
+ * gcov.c: Likewise.
+ * gcse.c: Likewise.
+ * genemit.c: Likewise.
+ * gengenrtl.c: Likewise.
+ * genrecog.c: Likewise.
+ * gensupport.c: Likewise.
+ * ggc-page.c: Likewise.
+ * global.c: Likewise.
+ * graph.c: Likewise.
+ * ifcvt.c: Likewise.
+ * integrate.c: Likewise.
+ * lcm.c: Likewise.
+ * libgcc2.c: Likewise.
+ * loop.c: Likewise.
+ * mbchar.c: Likewise.
+ * optabs.c: Likewise.
+ * predict.c: Likewise.
+ * prefix.c: Likewise.
+ * profile.c: Likewise.
+ * protoize.c: Likewise.
+ * real.c: Likewise.
+ * recog.c: Likewise.
+ * regclass.c: Likewise.
+ * regmove.c: Likewise.
+ * reg-stack.c: Likewise.
+ * reload1.c: Likewise.
+ * resource.c: Likewise.
+ * rtlanal.c: Likewise.
+ * rtl.c: Likewise.
+
+2001-08-12 Kazu Hirata <kazu@hxi.com>
+
* doc/tm.texi (ENCODE_SECTION_INFO): Add documentation on how
a tree representing a constant is passed to the macro.
static int verbose_flag;
-/* Flag indicating to print target specific command line options. */
+/* Flag indicating to print target specific command line options. */
static int target_help_flag;
}
else if (strcmp (argv[i], "-ftarget-help") == 0)
{
- /* translate_options() has turned --target-help into -ftarget-help. */
+ /* translate_options() has turned --target-help into -ftarget-help. */
target_help_flag = 1;
/* We will be passing a dummy file on to the sub-processes. */
static int input_from_pipe;
/* Nonnull means substitute this for any suffix when outputting a switches
- arguments. */
+ arguments. */
static const char *suffix_subst;
/* Process the spec SPEC and run the commands specified therein.
/* We do not exit here. Instead we have created a fake input file
called 'target-dummy' which needs to be compiled, and we pass this
on to the various sub-processes, along with the --target-help
- switch. */
+ switch. */
}
if (print_help_list)
#include "system.h"
#include "gcc.h"
-/* Filter argc and argv before processing by the gcc driver proper. */
+/* Filter argc and argv before processing by the gcc driver proper. */
void
lang_specific_driver (in_argc, in_argv, in_added_libraries)
int *in_argc ATTRIBUTE_UNUSED;
#endif
}
-/* Called before linking. Returns 0 on success and -1 on failure. */
+/* Called before linking. Returns 0 on success and -1 on failure. */
int
lang_specific_pre_link ()
{
- return 0; /* Not used for C. */
+ return 0; /* Not used for C. */
}
-/* Number of extra output files that lang_specific_pre_link may generate. */
-int lang_specific_extra_outfiles = 0; /* Not used for C. */
+/* Number of extra output files that lang_specific_pre_link may generate. */
+int lang_specific_extra_outfiles = 0; /* Not used for C. */
}
else if (line_num < 0)
{
- /* Don't know what this is, but it's garbage. */
+ /* Don't know what this is, but it's garbage. */
abort();
}
}
rtx insn;
{
/* load_killed_in_block_p will handle the case of calls clobbering
- everything. */
+ everything. */
modify_mem_list[BLOCK_NUM (insn)] =
alloc_INSN_LIST (insn, modify_mem_list[BLOCK_NUM (insn)]);
{
/* Note that traversals of this loop (other than for free-ing)
will break after encountering a CALL_INSN. So, there's no
- need to insert a pair of items, as canon_list_insert does. */
+ need to insert a pair of items, as canon_list_insert does. */
canon_modify_mem_list[BLOCK_NUM (insn)] =
alloc_INSN_LIST (insn, canon_modify_mem_list[BLOCK_NUM (insn)]);
}
}
/* This wrapper for expr_reaches_here_p_work() is to ensure that any
- memory allocated for that function is returned. */
+ memory allocated for that function is returned. */
static int
expr_reaches_here_p (occr, expr, bb, check_self_loop)
note = find_reg_equal_equiv_note (insn);
- /* We may win even when propagating constants into notes. */
+ /* We may win even when propagating constants into notes. */
if (note)
find_used_regs (&XEXP (note, 0), NULL);
struct expr *set;
/* Ignore registers created by GCSE.
- We do this because ... */
+ We do this because ... */
if (regno >= max_gcse_regno)
continue;
}
/* The wrapper for pre_expr_reaches_here_work that ensures that any
- memory allocated for that function is returned. */
+ memory allocated for that function is returned. */
static int
pre_expr_reaches_here_p (occr_bb, expr, bb)
{
if (store_killed_after (ptr->pattern, BLOCK_HEAD (b), BASIC_BLOCK (b)))
{
- /* The anticipatable expression is not killed if it's gen'd. */
+ /* The anticipatable expression is not killed if it's gen'd. */
/*
We leave this check out for now. If we have a code sequence
in a block which looks like:
}
\f
/* Generate code to invoke find_free_register () as needed for the
- scratch registers used by the peephole2 pattern in SPLIT. */
+ scratch registers used by the peephole2 pattern in SPLIT. */
static void
output_peephole2_scratches (split)
|| strcmp (defs[idx].enumname, "MEM") == 0);
}
-/* Place a list of all format specifiers we use into the array FORMAT. */
+/* Place a list of all format specifiers we use into the array FORMAT. */
static void
find_formats ()
switch (code)
{
case PARALLEL:
- /* Toplevel peephole pattern. */
+ /* Toplevel peephole pattern. */
if (insn_type == PEEPHOLE2 && top)
{
/* We don't need the node we just created -- unlink it. */
for (i = 0; i < (size_t) XVECLEN (pattern, 0); i++)
{
/* Which insn we're looking at is represented by A-Z. We don't
- ever use 'A', however; it is always implied. */
+ ever use 'A', however; it is always implied. */
subpos[depth] = (i > 0 ? 'A' + i : 0);
sub = add_to_sequence (XVECEXP (pattern, 0, i),
new state, branch to node AFTERWARD if non-zero, otherwise return.
Failure to move to the new state can only occur if we are trying to
- match multiple insns and we try to step past the end of the stream. */
+ match multiple insns and we try to step past the end of the stream. */
static void
change_state (oldpos, newpos, afterward, indent)
/* Go down to desired level. */
while (depth < ndepth)
{
- /* It's a different insn from the first one. */
+ /* It's a different insn from the first one. */
if (newpos[depth] >= 'A' && newpos[depth] <= 'Z')
{
/* We can only fail if we're moving down the tree. */
rtvec attr;
int i;
- /* Create a split with values from the insn_and_split. */
+ /* Create a split with values from the insn_and_split. */
split = rtx_alloc (DEFINE_SPLIT);
i = XVECLEN (desc, 1);
if (p != NULL)
{
- /* Recycle the allocated memory from this page ... */
+ /* Recycle the allocated memory from this page ... */
*pp = p->next;
page = p->page;
word = bit / HOST_BITS_PER_LONG;
mask = (unsigned long) 1 << (bit % HOST_BITS_PER_LONG);
- /* If the bit was previously set, skip it. */
+ /* If the bit was previously set, skip it. */
if (entry->in_use_p[word] & mask)
return 1;
abort ();
}
- /* We have a good page, might as well hold onto it... */
+ /* We have a good page, might as well hold onto it... */
e = (struct page_entry *) xcalloc (1, sizeof (struct page_entry));
e->bytes = G.pagesize;
e->page = p;
5. Allocate the variables in that order; each if possible into
a preferred register, else into another register. */
\f
-/* Number of pseudo-registers which are candidates for allocation. */
+/* Number of pseudo-registers which are candidates for allocation. */
static int max_allocno;
}
#if 0
- /* FIXME Should this be printed? It makes the graph significantly larger. */
+ /* FIXME Should this be printed? It makes the graph significantly larger. */
/* Print the live-at-start register list. */
fputc ('\n', fp);
rtx then_end; /* last insn + 1 in THEN block */
rtx else_start = NULL_RTX; /* first insn in ELSE block or NULL */
rtx else_end = NULL_RTX; /* last insn + 1 in ELSE block */
- int max; /* max # of insns to convert. */
+ int max; /* max # of insns to convert. */
int then_mod_ok; /* whether conditional mods are ok in THEN */
rtx true_expr; /* test for else block insns */
rtx false_expr; /* test for then block insns */
#endif
\f
-/* Private type used by {get/has}_func_hard_reg_initial_val. */
+/* Private type used by {get/has}_func_hard_reg_initial_val. */
typedef struct initial_value_pair {
rtx hard_reg;
rtx pseudo;
if (NOTE_LINE_NUMBER (orig) != NOTE_INSN_DELETED_LABEL)
break;
- /* ... FALLTHRU ... */
+ /* ... FALLTHRU ... */
case CODE_LABEL:
LABEL_PRESERVE_P (get_label_from_map (map, CODE_LABEL_NUMBER (orig)))
= LABEL_PRESERVE_P (orig);
qin = worklist;
/* Note that we do not use the last allocated element for our queue,
as EXIT_BLOCK is never inserted into it. In fact the above allocation
- of n_basic_blocks + 1 elements is not encessary. */
+ of n_basic_blocks + 1 elements is not encessary. */
qend = &worklist[n_basic_blocks];
qlen = n_basic_blocks;
int save_errno;
/* Preserve errno, because users would be surprised to have
- errno changing without explicitly calling any system-call. */
+ errno changing without explicitly calling any system-call. */
save_errno = errno;
/* Keep it simple : memctl (MCT_TEXT) always fully clears the insn cache.
- No need to use an address derived from _start or %sp, as 0 works also. */
+ No need to use an address derived from _start or %sp, as 0 works also. */
memctl(0, 4096, MCT_TEXT);
errno = save_errno;
#endif
\f
/* If X contains any LABEL_REF's, add REG_LABEL notes for them to all
insns in INSNS which use the reference. LABEL_NUSES for CODE_LABEL
- references is incremented once for each added note. */
+ references is incremented once for each added note. */
static void
add_label_notes (x, insns)
if (s == NULL)
{
save_state = ASCII;
- /* State-dependent. */
+ /* State-dependent. */
return 1;
}
return 1;
#else
- /* This must be the "C" locale or unknown locale. */
+ /* This must be the "C" locale or unknown locale. */
return mbtowc (pwc, s, n);
#endif
}
#include "toplev.h"
/* Include insn-config.h before expr.h so that HAVE_conditional_move
- is properly defined. */
+ is properly defined. */
#include "insn-config.h"
#include "rtl.h"
#include "tree.h"
struct predictor_info predictor_info[] = {
#include "predict.def"
- /* Upper bound on predictors. */
+ /* Upper bound on predictors. */
{NULL, 0, 0}
};
#undef DEF_PREDICTOR
#endif
#ifdef DIR_SEPARATOR_2
- /* Convert DIR_SEPARATOR_2 to DIR_SEPARATOR. */
+ /* Convert DIR_SEPARATOR_2 to DIR_SEPARATOR. */
if (DIR_SEPARATOR != DIR_SEPARATOR_2)
{
char *new_path = xstrdup (path);
static FILE *da_file;
-/* Pointer of the output file for the basic block/line number map. */
+/* Pointer of the output file for the basic block/line number map. */
static FILE *bb_file;
-/* Last source file name written to bb_file. */
+/* Last source file name written to bb_file. */
static char *last_bb_file_name;
static void union_groups PARAMS ((basic_block, basic_block));
/* If non-zero, we need to output a constructor to set up the
- per-object-file data. */
+ per-object-file data. */
static int need_func_profiler = 0;
\f
/* Add edge instrumentation code to the entire insn chain.
/* Create spanning tree from basic block graph, mark each edge that is
on the spanning tree. We insert as many abnormal and critical edges
- as possible to minimize number of edge splits necesary. */
+ as possible to minimize number of edge splits necesary. */
find_spanning_tree (el);
/* Fake edges that are not on the tree will not be instrumented, so
- mark them ignored. */
+ mark them ignored. */
for (i = 0; i < num_edges; i++)
{
edge e = INDEX_EDGE (el, i);
}
\f
/* Union find algorithm implementation for the basic blocks using
- aux fields. */
+ aux fields. */
static basic_block
find_group (bb)
long temp;
/* This seems slightly dangerous, as it presumes the EOF
flag will not be set until an attempt is made to read
- past the end of the file. */
+ past the end of the file. */
if (feof (da_file))
error (".da file contents exhausted too early");
/* Should be at end of file now. */
}
/* Output code for a constructor that will invoke __bb_init_func, if
- this has not already been done. */
+ this has not already been done. */
void
output_func_start_profiler ()
int save_flag_branch_probabilities = flag_branch_probabilities;
/* It's either already been output, or we don't need it because we're
- not doing profile-edges. */
+ not doing profile-edges. */
if (! need_func_profiler)
return;
need_func_profiler = 0;
/* Synthesize a constructor function to invoke __bb_init_func with a
- pointer to this object file's profile block. */
+ pointer to this object file's profile block. */
/* Try and make a unique name given the "file function name".
- And no, I don't like this either. */
+ And no, I don't like this either. */
fnname = get_file_function_name ('I');
cfnname = IDENTIFIER_POINTER (fnname);
pushlevel (0);
expand_function_start (fndecl, 0);
- /* Actually generate the code to call __bb_init_func. */
+ /* Actually generate the code to call __bb_init_func. */
ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", 0);
table_address = force_reg (Pmode,
gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)));
#undef abort
#include "version.h"
-/* Include getopt.h for the sake of getopt_long. */
+/* Include getopt.h for the sake of getopt_long. */
#include "getopt.h"
/* Macro to see if the path elements match. */
return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0);
}
\f
-/* Return 1 if pathname is absolute. */
+/* Return 1 if pathname is absolute. */
static int
is_abspath (path)
fd_flags = O_RDONLY;
#ifdef O_BINARY
- /* Use binary mode to avoid having to deal with different EOL characters. */
+ /* Use binary mode to avoid having to deal with different EOL characters. */
fd_flags |= O_BINARY;
#endif
if ((aux_info_file = open (aux_info_filename, fd_flags, 0444 )) == -1)
fd_flags = O_RDONLY;
#ifdef O_BINARY
- /* Use binary mode to avoid having to deal with different EOL characters. */
+ /* Use binary mode to avoid having to deal with different EOL characters. */
fd_flags |= O_BINARY;
#endif
if ((input_file = open (convert_filename, fd_flags, 0444)) == -1)
/* Exponent interpretation */
expnt:
- /* 0.0eXXX is zero, regardless of XXX. Check for the 0.0. */
+ /* 0.0eXXX is zero, regardless of XXX. Check for the 0.0. */
for (k = 0; k < NI; k++)
{
if (yy[k] != 0)
int i;
int carry;
- /* Short-circuit the zero case. */
+ /* Short-circuit the zero case. */
if ((d[0] == 0x8000)
&& (d[1] == 0x0000)
&& ((mode == QFmode) || ((d[2] == 0x0000) && (d[3] == 0x0000))))
}
r >>= 8; /* Shift exponent word down 8 bits. */
- if (r & 0x80) /* Make the exponent negative if it is. */
+ if (r & 0x80) /* Make the exponent negative if it is. */
{
r = r | (~0 & ~0xff);
}
/* Now do the two's complement on the data. */
- carry = 1; /* Initially add 1 for the two's complement. */
+ carry = 1; /* Initially add 1 for the two's complement. */
for (i=size + M; i > M; i--)
{
if (carry && (y[i] == 0x0000))
emovi (x, xi);
- /* Adjust exponent for offsets. */
+ /* Adjust exponent for offsets. */
exp = (EMULONG) xi[E] - (EXONE - 0x7f);
- /* Round off to nearest or even. */
+ /* Round off to nearest or even. */
rndsav = rndprc;
rndprc = mode == QFmode ? 24 : 32;
emdnorm (xi, 0, 0, exp, 64);
/* Only check for double if necessary */
&& ((mode == QFmode) || ((x[M+2] == 0) && (x[M+3] == 0))))
{
- /* We have a zero. Put it into the output and return. */
+ /* We have a zero. Put it into the output and return. */
*y++ = 0x8000;
*y++ = 0x0000;
if (mode != QFmode)
*y = 0;
/* Negative number require a two's complement conversion of the
- mantissa. */
+ mantissa. */
if (x[0])
{
*y = 0x0080;
i = ((int) x[1]) - 0x7f;
- /* Now add 1 to the inverted data to do the two's complement. */
+ /* Now add 1 to the inverted data to do the two's complement. */
if (mode != QFmode)
v = 4 + M;
else
/* The following is a special case. The C4X negative float requires
a zero in the high bit (because the format is (2 - x) x 2^m), so
if a one is in that bit, we have to shift left one to get rid
- of it. This only occurs if the number is -1 x 2^m. */
+ of it. This only occurs if the number is -1 x 2^m. */
if (x[M+1] & 0x8000)
{
/* This is the case of -1 x 2^m, we have to rid ourselves of the
- high sign bit and shift the exponent. */
+ high sign bit and shift the exponent. */
eshift(x, 1);
i--;
}
s[0] = (unsigned EMUSHORT) f;
s[1] = (unsigned EMUSHORT) (f >> 16);
}
- /* Convert and promote the target float to E-type. */
+ /* Convert and promote the target float to E-type. */
e24toe (s, e);
- /* Output E-type to REAL_VALUE_TYPE. */
+ /* Output E-type to REAL_VALUE_TYPE. */
PUT_REAL (e, &r);
return r;
}
s[2] = (unsigned EMUSHORT) d[1];
s[3] = (unsigned EMUSHORT) (d[1] >> 16);
}
- /* Convert target double to E-type. */
+ /* Convert target double to E-type. */
e53toe (s, e);
- /* Output E-type to REAL_VALUE_TYPE. */
+ /* Output E-type to REAL_VALUE_TYPE. */
PUT_REAL (e, &r);
return r;
}
}
/* If we have an ADDRESSOF, consider it valid since it will be
- converted into something that will not be a MEM. */
+ converted into something that will not be a MEM. */
if (GET_CODE (op) == ADDRESSOF)
return 1;
int
mode_dependent_address_p (addr)
- rtx addr ATTRIBUTE_UNUSED; /* Maybe used in GO_IF_MODE_DEPENDENT_ADDRESS. */
+ rtx addr ATTRIBUTE_UNUSED; /* Maybe used in GO_IF_MODE_DEPENDENT_ADDRESS. */
{
GO_IF_MODE_DEPENDENT_ADDRESS (addr, win);
return 0;
- /* Label `win' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
+ /* Label `win' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
win: ATTRIBUTE_UNUSED_LABEL
return 1;
}
addr = XEXP (op, 0);
GO_IF_MODE_DEPENDENT_ADDRESS (addr, lose);
return 1;
- /* Label `lose' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
+ /* Label `lose' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
lose: ATTRIBUTE_UNUSED_LABEL
return 0;
}
return NULL_RTX;
}
-/* Perform the peephole2 optimization pass. */
+/* Perform the peephole2 optimization pass. */
void
peephole2_optimize (dump_file)
\f
/* Swap the condition on a branch, if there is one. Return true if we
found a condition to swap. False if the condition was not used as
- such. */
+ such. */
static int
swap_rtx_condition_1 (pat)
break;
case IF_THEN_ELSE:
- /* This insn requires the top of stack to be the destination. */
+ /* This insn requires the top of stack to be the destination. */
/* If the comparison operator is an FP comparison operator,
it is handled correctly by compare_for_stack_reg () who
will move the destination to the top of stack. But if the
comparison operator is not an FP comparison operator, we
- have to handle it here. */
+ have to handle it here. */
if (get_hard_regnum (regstack, *dest) >= FIRST_STACK_REG
&& REGNO (*dest) != regstack->reg[regstack->top])
emit_swap_insn (insn, regstack, *dest);
}
/* Make dest the top of stack. Add dest to regstack if
- not present. */
+ not present. */
if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
regstack->reg[++regstack->top] = REGNO (*dest);
SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest));
static struct reg_info_data *reg_info_head;
/* No more global register variables may be declared; true once
- regclass has been initialized. */
+ regclass has been initialized. */
static int no_global_reg_vars = 0;
enum reg_class altclass;
int partial_cost = 0;
/* We need a memory reference to feed to SECONDARY... macros. */
- /* mem may be unused even if the SECONDARY_ macros are defined. */
+ /* mem may be unused even if the SECONDARY_ macros are defined. */
rtx mem ATTRIBUTE_UNUSED = top_of_stack[(int) mode];
static struct reg_pref *reg_pref;
-/* Allocated buffers for reg_pref. */
+/* Allocated buffers for reg_pref. */
static struct reg_pref *reg_pref_buffer;
before regclass is run. */
reg_pref = NULL;
- /* No more global register variables may be declared. */
+ /* No more global register variables may be declared. */
no_global_reg_vars = 1;
}
\f
int sregno = REGNO (src);
int dregno = REGNO (dest);
- /* We don't want to mess with hard regs if register classes are small. */
+ /* We don't want to mess with hard regs if register classes are small. */
if (sregno == dregno
|| (SMALL_REGISTER_CLASSES
&& (sregno < FIRST_PSEUDO_REGISTER
if (recog_data.operand[match_no] != SET_DEST (set))
continue;
- /* If the operands already match, then there is nothing to do. */
+ /* If the operands already match, then there is nothing to do. */
if (operands_match_p (src, dst))
continue;
|| RTX_UNCHANGING_P (dst))
continue;
- /* If the operands already match, then there is nothing to do. */
+ /* If the operands already match, then there is nothing to do. */
if (operands_match_p (src, dst))
continue;
{
/* ??? We can't scan past the end of a basic block without updating
the register lifetime info
- (REG_DEAD/basic_block_live_at_start). */
+ (REG_DEAD/basic_block_live_at_start). */
if (perhaps_ends_bb_p (q))
break;
else if (! INSN_P (q))
reg_offset[n] in mode reg_mode[n] .
If reg_base_reg[n] is non-negative, register n has been set to the
sum of reg_offset[n] and the value of register reg_base_reg[n]
- before reg_set_luid[n], calculated in mode reg_mode[n] . */
+ before reg_set_luid[n], calculated in mode reg_mode[n] . */
static HOST_WIDE_INT reg_offset[FIRST_PSEUDO_REGISTER];
static int reg_base_reg[FIRST_PSEUDO_REGISTER];
static enum machine_mode reg_mode[FIRST_PSEUDO_REGISTER];
/* If we hit an unconditional branch, we have another way of finding out
what is live: we can see what is live at the branch target and include
anything used but not set before the branch. We add the live
- resources found using the test below to those found until now. */
+ resources found using the test below to those found until now. */
if (jump_insn)
{
}
\f
/* Add TRIAL to the set of resources used at the end of the current
- function. */
+ function. */
void
mark_end_of_function_resources (trial, include_delayed_effects)
rtx trial;
"u" a pointer to another insn
prints the uid of the insn.
"b" is a pointer to a bitmap header.
- "t" is a tree pointer. */
+ "t" is a tree pointer. */
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) FORMAT ,
#include "rtl.def" /* rtl expressions are defined here */
break;
case '0':
- /* Copy this through the wide int field; that's safest. */
+ /* Copy this through the wide int field; that's safest. */
X0WINT (copy, i) = X0WINT (orig, i);
break;
register const char *fmt;
/* The following prevents loops occurrence when we change MEM in
- CONST_DOUBLE onto the same CONST_DOUBLE. */
+ CONST_DOUBLE onto the same CONST_DOUBLE. */
if (x != 0 && GET_CODE (x) == CONST_DOUBLE)
return x;
return ret;
}
-/* Return the final regno that a subreg expression refers to. */
+/* Return the final regno that a subreg expression refers to. */
unsigned int
subreg_regno (x)
rtx x;