formatting tweaks

From-SVN: r12390
This commit is contained in:
Mike Stump 1996-07-03 22:07:53 +00:00
parent 9753f11368
commit 0f41302f47
94 changed files with 3360 additions and 2102 deletions

View file

@ -55,12 +55,13 @@ extern enum machine_mode byte_mode;
/* Mode whose width is BITS_PER_WORD */
extern enum machine_mode word_mode;
/* Vector indexed by opcode giving info about the args for each opcode. */
/* Vector indexed by opcode giving info about the args for each opcode. */
static struct arityvec arityvec[] = {
#include "bc-arity.h"
};
/* How to print a symbol name for the assembler. */
static void
prsym (file, s)
FILE *file;
@ -78,7 +79,7 @@ prsym (file, s)
}
/* Maintain a bucket hash table for symbol names. */
/* Maintain a bucket hash table for symbol names. */
#define HASH_BITS 32
#define HASH_SIZE 509
@ -101,7 +102,8 @@ hash (name)
}
/* Look up the named symbol, creating it if it doesn't exist. */
/* Look up the named symbol, creating it if it doesn't exist. */
struct bc_sym *
sym_lookup (name)
char *name;
@ -126,6 +128,7 @@ sym_lookup (name)
/* Write out .globl and common symbols to the named file. */
static void
bc_sym_write (file)
FILE *file;
@ -160,7 +163,8 @@ bc_sym_write (file)
/* Create and initialize a new segment. */
/* Create and initialize a new segment. */
static struct bc_seg *
seg_create ()
{
@ -176,7 +180,8 @@ seg_create ()
}
/* Advance the segment index to the next alignment boundary. */
/* Advance the segment index to the next alignment boundary. */
static void
seg_align (seg, log)
struct bc_seg *seg;
@ -195,7 +200,8 @@ seg_align (seg, log)
}
/* Append the given data to the given segment. */
/* Append the given data to the given segment. */
static void
seg_data (seg, data, size)
struct bc_seg *seg;
@ -215,6 +221,7 @@ seg_data (seg, data, size)
/* Append a zero-filled skip to the given segment. */
static void
seg_skip (seg, size)
struct bc_seg *seg;
@ -234,7 +241,8 @@ seg_skip (seg, size)
/* Define the given name as the current offset in the given segment. It
is an error if the name is already defined. Return 0 or 1 indicating
failure or success respectively. */
failure or success respectively. */
static int
seg_defsym (seg, name)
struct bc_seg *seg;
@ -258,7 +266,8 @@ seg_defsym (seg, name)
/* Generate in seg's data a reference to the given sym, adjusted by
the given offset. */
the given offset. */
static void
seg_refsym (seg, name, offset)
struct bc_seg *seg;
@ -278,7 +287,8 @@ seg_refsym (seg, name, offset)
}
/* Concatenate the contents of given segments into the first argument. */
/* Concatenate the contents of given segments into the first argument. */
static void
seg_concat (result, seg)
struct bc_seg *result, *seg;
@ -293,7 +303,7 @@ seg_concat (result, seg)
free (seg->data);
/* Go through the symbols and relocs of SEG, adjusting their offsets
for their new location in RESULT. */
for their new location in RESULT. */
if (seg->syms)
{
segsym = seg->syms;
@ -317,6 +327,7 @@ seg_concat (result, seg)
}
/* Write a segment to a file. */
static void
bc_seg_write (seg, file)
struct bc_seg *seg;
@ -391,11 +402,12 @@ bc_seg_write (seg, file)
/* Text and data segments of the object file in making. */
/* Text and data segments of the object file in making. */
static struct bc_seg *bc_text_seg;
static struct bc_seg *bc_data_seg;
/* Called before anything else in this module. */
/* Called before anything else in this module. */
void
bc_initialize ()
{
@ -443,25 +455,26 @@ bc_initialize ()
require us to provide hairy location info and possibly obey alignment
rules imposed by the architecture) we build an auxiliary table of
pointer constants, and encode just offsets into this table into the
actual bytecode. */
actual bytecode. */
static struct bc_seg *ptrconsts;
/* Trampoline code for the function entry. */
struct bc_seg *trampoline;
/* Actual byte code of the function. */
/* Actual byte code of the function. */
struct bc_seg *bytecode;
/* List of labels defined in the function. */
/* List of labels defined in the function. */
struct bc_label *labels;
/* List of label references in the function. */
/* List of label references in the function. */
struct bc_labelref *labelrefs;
/* Add symbol to pointer table. Return offset into table where
pointer was stored. The offset usually goes into the bytecode
stream as a constP literal. */
stream as a constP literal. */
int
bc_define_pointer (p)
char *p;
@ -474,6 +487,7 @@ bc_define_pointer (p)
/* Begin a bytecoded function. */
int
bc_begin_function (name)
char *name;
@ -486,6 +500,7 @@ bc_begin_function (name)
/* Force alignment in inline bytecode. */
void
bc_align_bytecode (align)
int align;
@ -495,6 +510,7 @@ bc_align_bytecode (align)
/* Emit data inline into bytecode. */
void
bc_emit_bytecode_const (data, size)
char *data;
@ -507,7 +523,8 @@ bc_emit_bytecode_const (data, size)
/* Create a new "bytecode label", to have its value defined later.
Bytecode labels have nothing to do with the object file symbol table,
and are purely local to a given bytecoded function. */
and are purely local to a given bytecoded function. */
struct bc_label *
bc_get_bytecode_label ()
{
@ -522,7 +539,8 @@ bc_get_bytecode_label ()
}
/* Define the given label with the current location counter. */
/* Define the given label with the current location counter. */
int
bc_emit_bytecode_labeldef (label)
struct bc_label *label;
@ -545,7 +563,8 @@ bc_emit_bytecode_labeldef (label)
/* Generate a location-relative reference to the given bytecode label.
It need not be defined yet; label references will be backpatched later. */
It need not be defined yet; label references will be backpatched later. */
void
bc_emit_bytecode_labelref (label)
struct bc_label *label;
@ -568,7 +587,8 @@ bc_emit_bytecode_labelref (label)
/* Emit a reference to an external address; generate the reference in the
ptrconst area, and emit an offset in the bytecode. */
ptrconst area, and emit an offset in the bytecode. */
void
bc_emit_code_labelref (name, offset)
char *name;
@ -589,6 +609,7 @@ bc_emit_code_labelref (name, offset)
/* Backpatch label references in the byte code, and concatenate the bytecode
and pointer constant segments to the cumulative text for the object file.
Return a label name for the pointer constants region. */
char *
bc_end_function ()
{
@ -598,7 +619,7 @@ bc_end_function ()
char ptrconsts_label[20];
static int nlab;
/* Backpatch bytecode label references. */
/* Backpatch bytecode label references. */
for (ref = labelrefs; ref; ref = ref->next)
if (ref->label->defined)
{
@ -606,7 +627,7 @@ bc_end_function ()
bcopy ((char *) &addr, bytecode->data + ref->offset, sizeof addr);
}
/* Free the chains of labelrefs and labeldefs. */
/* Free the chains of labelrefs and labeldefs. */
for (ref = labelrefs; ref; ref = nextref)
{
nextref = ref->next;
@ -635,7 +656,8 @@ bc_end_function ()
return sym_lookup (ptrconsts_label)->name;
}
/* Force alignment in const data. */
/* Force alignment in const data. */
void
bc_align_const (align)
int align;
@ -643,7 +665,8 @@ bc_align_const (align)
seg_align (bc_text_seg, align);
}
/* Emit const data. */
/* Emit const data. */
void
bc_emit_const (data, size)
char *data;
@ -652,7 +675,8 @@ bc_emit_const (data, size)
seg_data (bc_text_seg, data, size);
}
/* Emit a zero-filled constant skip. */
/* Emit a zero-filled constant skip. */
void
bc_emit_const_skip (size)
unsigned int size;
@ -660,7 +684,8 @@ bc_emit_const_skip (size)
seg_skip (bc_text_seg, size);
}
/* Emit a label definition in const data. */
/* Emit a label definition in const data. */
int
bc_emit_const_labeldef (name)
char *name;
@ -668,7 +693,8 @@ bc_emit_const_labeldef (name)
return seg_defsym (bc_text_seg, name);
}
/* Emit a label reference in const data. */
/* Emit a label reference in const data. */
void
bc_emit_const_labelref (name, offset)
char *name;
@ -677,7 +703,8 @@ bc_emit_const_labelref (name, offset)
seg_refsym (bc_text_seg, name, offset);
}
/* Force alignment in data. */
/* Force alignment in data. */
void
bc_align_data (align)
int align;
@ -685,7 +712,8 @@ bc_align_data (align)
seg_align (bc_data_seg, align);
}
/* Emit data. */
/* Emit data. */
void
bc_emit_data (data, size)
char *data;
@ -695,6 +723,7 @@ bc_emit_data (data, size)
}
/* Emit a zero-filled data skip. */
void
bc_emit_data_skip (size)
unsigned int size;
@ -702,7 +731,8 @@ bc_emit_data_skip (size)
seg_skip (bc_data_seg, size);
}
/* Emit label definition in data. */
/* Emit label definition in data. */
int
bc_emit_data_labeldef (name)
char *name;
@ -710,7 +740,8 @@ bc_emit_data_labeldef (name)
return seg_defsym (bc_data_seg, name);
}
/* Emit label reference in data. */
/* Emit label reference in data. */
void
bc_emit_data_labelref (name, offset)
char *name;
@ -722,6 +753,7 @@ bc_emit_data_labelref (name, offset)
/* Emit a common block of the given name and size. Note that
when the .o file is actually written non-global "common"
blocks will have to be turned into space in the data section. */
int
bc_emit_common (name, size)
char *name;
@ -739,7 +771,8 @@ bc_emit_common (name, size)
return 1;
}
/* Globalize the given label. */
/* Globalize the given label. */
void
bc_globalize_label (name)
char *name;
@ -846,6 +879,7 @@ bc_gen_rtx (label, offset, bc_label)
/* Print bytecode rtx */
void
bc_print_rtl (fp, r)
FILE *fp;
@ -860,6 +894,7 @@ bc_print_rtl (fp, r)
/* Emit a bytecode, keeping a running tally of the stack depth. */
void
bc_emit_bytecode (bytecode)
enum bytecode_opcode bytecode;
@ -883,7 +918,7 @@ bc_emit_bytecode (bytecode)
will cause an interpreter stack undeflow when executed. Instead of
dumping core on such occasions, we omit the bytecode. Erroneous code
should not be executed, regardless. This makes life much easier, since
we don't have to deceive ourselves about the known stack depth. */
we don't have to deceive ourselves about the known stack depth. */
bc_emit_bytecode_const (&byte, 1);
@ -907,7 +942,8 @@ bc_emit_bytecode (bytecode)
/* Emit a complete bytecode instruction, expecting the correct number
of literal values in the call. First argument is the instruction, the
remaining arguments are literals of size HOST_WIDE_INT or smaller. */
remaining arguments are literals of size HOST_WIDE_INT or smaller. */
void
bc_emit_instruction VPROTO((enum bytecode_opcode opcode, ...))
{
@ -965,6 +1001,7 @@ bc_emit_instruction VPROTO((enum bytecode_opcode opcode, ...))
coded function. The argument is a label name of the interpreter
bytecode callinfo structure; the return value is a label name for
the beginning of the actual bytecode. */
char *
bc_emit_trampoline (callinfo)
char *callinfo;

View file

@ -55,8 +55,8 @@ static enum typecode unsigned_mode_to_code_map[MAX_MACHINE_MODE+1];
static struct conversion_recipe
{
unsigned char *opcodes; /* Bytecodes to emit in order. */
int nopcodes; /* Count of bytecodes. */
int cost; /* A rather arbitrary cost function. */
int nopcodes; /* Count of bytecodes. */
int cost; /* A rather arbitrary cost function. */
} conversion_recipe[NUM_TYPECODES][NUM_TYPECODES];
/* Binary operator tables. */
@ -405,6 +405,7 @@ struct conversion_list
* Either sign extensions or zero extensions may be present, but not both.
* No widening conversions occur after a signed/unsigned conversion.
* The sequence of sizes must be strict nonincreasing or nondecreasing. */
static int
conversion_reasonable_p (conversion, list)
struct conversion_info *conversion;
@ -517,6 +518,7 @@ conversion_reasonable_p (conversion, list)
/* Exhaustively search all reasonable conversions to find one to
convert the given types. */
static struct conversion_recipe
deduce_conversion (from, to)
enum typecode from, to;
@ -614,6 +616,7 @@ deduce_conversion (from, to)
/* Emit a conversion between the given scalar types. */
void
emit_typecode_conversion (from, to)
enum typecode from, to;
@ -627,6 +630,7 @@ emit_typecode_conversion (from, to)
/* Initialize mode_to_code_map[] */
void
bc_init_mode_to_code_map ()
{
@ -650,6 +654,7 @@ bc_init_mode_to_code_map ()
}
/* Given a machine mode return the preferred typecode. */
enum typecode
preferred_typecode (mode, unsignedp)
enum machine_mode mode;
@ -668,6 +673,7 @@ preferred_typecode (mode, unsignedp)
/* Expand a conversion between the given types. */
void
bc_expand_conversion (from, to)
tree from, to;
@ -681,6 +687,7 @@ bc_expand_conversion (from, to)
}
/* Expand a conversion of the given type to a truth value. */
void
bc_expand_truth_conversion (from)
tree from;
@ -692,6 +699,7 @@ bc_expand_truth_conversion (from)
}
/* Emit an appropriate binary operation. */
void
bc_expand_binary_operation (optab, resulttype, arg0, arg1)
struct binary_operator optab[];
@ -733,6 +741,7 @@ bc_expand_binary_operation (optab, resulttype, arg0, arg1)
}
/* Emit an appropriate unary operation. */
void
bc_expand_unary_operation (optab, resulttype, arg0)
struct unary_operator optab[];
@ -769,6 +778,7 @@ bc_expand_unary_operation (optab, resulttype, arg0)
/* Emit an appropriate increment. */
void
bc_expand_increment (optab, type)
struct increment_operator optab[];

View file

@ -63,7 +63,8 @@ main ()
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
memory. */
char *
xmalloc (nbytes)
int nbytes;

View file

@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
memory. */
static char *
xmalloc (nbytes)
@ -43,7 +43,7 @@ xmalloc (nbytes)
/* Safely reallocate BLOCK so its size becomes NBYTES.
The block returned may be different from the one supplied. */
The block returned may be different from the one supplied. */
static char *
xrealloc (block, nbytes)
@ -68,7 +68,7 @@ xrealloc (block, nbytes)
purposes here, a sequence of characters that starts with the regexp
``[^ #\t\n(),]'' and is then followed by the regexp ``[^#(),]*''. Any
character is accepted if preceded by a backslash, "\\". It is assumed
that the first character has already been checked by the main loop. */
that the first character has already been checked by the main loop. */
static char *
scan_string ()

View file

@ -61,7 +61,8 @@ main(argc, argv)
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
memory. */
char *
xmalloc (nbytes)
int nbytes;

View file

@ -42,7 +42,8 @@ main()
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
memory. */
char *
xmalloc (nbytes)
int nbytes;

View file

@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "c-tree.h"
extern char* xmalloc ();
extern char *xmalloc ();
enum formals_style_enum {
ansi,
@ -37,26 +37,26 @@ enum formals_style_enum {
typedef enum formals_style_enum formals_style;
static char* data_type;
static char *data_type;
static char * concat ();
static char * concat3 ();
static char * gen_formal_list_for_type ();
static int deserves_ellipsis ();
static char * gen_formal_list_for_func_def ();
static char * gen_type ();
static char * gen_decl ();
static char *concat ();
static char *concat3 ();
static char *gen_formal_list_for_type ();
static int deserves_ellipsis ();
static char *gen_formal_list_for_func_def ();
static char *gen_type ();
static char *gen_decl ();
void gen_aux_info_record ();
/* Take two strings and mash them together into a newly allocated area. */
static char*
static char *
concat (s1, s2)
char* s1;
char* s2;
char *s1;
char *s2;
{
int size1, size2;
char* ret_val;
char *ret_val;
if (!s1)
s1 = "";
@ -73,14 +73,14 @@ concat (s1, s2)
/* Take three strings and mash them together into a newly allocated area. */
static char*
static char *
concat3 (s1, s2, s3)
char* s1;
char* s2;
char* s3;
char *s1;
char *s2;
char *s3;
{
int size1, size2, size3;
char* ret_val;
char *ret_val;
if (!s1)
s1 = "";
@ -113,7 +113,7 @@ concat3 (s1, s2, s3)
`const char *foo;' and *not* `char const *foo;' so we try to create types
that look as expected. */
static char*
static char *
affix_data_type (type_or_decl)
char *type_or_decl;
{
@ -156,14 +156,14 @@ affix_data_type (type_or_decl)
this function type. Return the whole formal parameter list (including
a pair of surrounding parens) as a string. Note that if the style
we are currently aiming for is non-ansi, then we just return a pair
of empty parens here. */
of empty parens here. */
static char*
static char *
gen_formal_list_for_type (fntype, style)
tree fntype;
formals_style style;
{
char* formal_list = "";
char *formal_list = "";
tree formal_type;
if (style != ansi)
@ -172,7 +172,7 @@ gen_formal_list_for_type (fntype, style)
formal_type = TYPE_ARG_TYPES (fntype);
while (formal_type && TREE_VALUE (formal_type) != void_type_node)
{
char* this_type;
char *this_type;
if (*formal_list)
formal_list = concat (formal_list, ", ");
@ -278,12 +278,12 @@ deserves_ellipsis (fntype)
This routine returns a string which is the source form for the entire
function formal parameter list. */
static char*
static char *
gen_formal_list_for_func_def (fndecl, style)
tree fndecl;
formals_style style;
{
char* formal_list = "";
char *formal_list = "";
tree formal_decl;
formal_decl = DECL_ARGUMENTS (fndecl);
@ -353,9 +353,9 @@ gen_formal_list_for_func_def (fndecl, style)
to do at this point is for the initial caller to prepend the "data_type"
string onto the returned "seed". */
static char*
static char *
gen_type (ret_val, t, style)
char* ret_val;
char *ret_val;
tree t;
formals_style style;
{
@ -517,13 +517,13 @@ gen_type (ret_val, t, style)
associated with a function definition. In this case, we can assume that
an attached list of DECL nodes for function formal arguments is present. */
static char*
static char *
gen_decl (decl, is_func_definition, style)
tree decl;
int is_func_definition;
formals_style style;
{
char* ret_val;
char *ret_val;
if (DECL_NAME (decl))
ret_val = IDENTIFIER_POINTER (DECL_NAME (decl));
@ -591,7 +591,7 @@ gen_decl (decl, is_func_definition, style)
return ret_val;
}
extern FILE* aux_info_file;
extern FILE *aux_info_file;
/* Generate and write a new line of info to the aux-info (.X) file. This
routine is called once for each function declaration, and once for each

View file

@ -284,7 +284,7 @@ init_attributes ()
/* Process the attributes listed in ATTRIBUTES and PREFIX_ATTRIBUTES
and install them in NODE, which is either a DECL (including a TYPE_DECL)
or a TYPE. PREFIX_ATTRIBUTES can appear after the declaration specifiers
and declaration modifiers but before the declaration proper. */
and declaration modifiers but before the declaration proper. */
void
decl_attributes (node, attributes, prefix_attributes)
@ -645,7 +645,7 @@ decl_attributes (node, attributes, prefix_attributes)
if (first_arg_num != 0)
{
/* Verify that first_arg_num points to the last arg,
the ... */
the ... */
while (argument)
arg_num++, argument = TREE_CHAIN (argument);
if (arg_num != first_arg_num)
@ -2292,7 +2292,7 @@ truthvalue_conversion (expr)
if (TREE_CODE (TREE_TYPE (expr)) == REFERENCE_TYPE
|| TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == REFERENCE_TYPE)
break;
/* fall through... */
/* fall through... */
case NOP_EXPR:
/* If this is widening the argument, we can ignore it. */
if (TYPE_PRECISION (TREE_TYPE (expr))
@ -2306,7 +2306,7 @@ truthvalue_conversion (expr)
if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
&& TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE)
break;
/* fall through... */
/* fall through... */
case BIT_XOR_EXPR:
/* This and MINUS_EXPR can be changed into a comparison of the
two objects. */

View file

@ -455,7 +455,7 @@ int flag_no_nonansi_builtin;
int flag_traditional;
/* Nonzero means to allow single precision math even if we're generally
being traditional. */
being traditional. */
int flag_allow_single_precision = 0;
/* Nonzero means to treat bitfields as signed unless they say `unsigned'. */
@ -525,7 +525,7 @@ int warn_redundant_decls = 0;
int warn_nested_externs = 0;
/* Warn about *printf or *scanf format/argument anomalies. */
/* Warn about *printf or *scanf format/argument anomalies. */
int warn_format;
@ -2807,7 +2807,7 @@ lookup_name_current_level (name)
}
/* Create the predefined scalar types of C,
and some nodes representing standard constants (0, 1, (void *)0).
and some nodes representing standard constants (0, 1, (void *) 0).
Initialize the global binding level.
Make definitions for built-in primitive functions. */
@ -6086,7 +6086,7 @@ start_function (declspecs, declarator, prefix_attributes, attributes, nested)
tree restype;
int old_immediate_size_expand = immediate_size_expand;
current_function_returns_value = 0; /* Assume, until we see it does. */
current_function_returns_value = 0; /* Assume, until we see it does. */
current_function_returns_null = 0;
warn_about_return_type = 0;
current_extern_inline = 0;

View file

@ -412,7 +412,7 @@ void
push_iterator_stack ()
{
struct iter_stack_node *new_top
= (struct iter_stack_node*)
= (struct iter_stack_node *)
obstack_alloc (&ixp_obstack, sizeof (struct iter_stack_node));
new_top->first = 0;
@ -445,15 +445,15 @@ add_ixpansion (idecl, pro_start, pro_end, epi_start, epi_end)
tree idecl;
rtx pro_start, pro_end, epi_start, epi_end;
{
struct ixpansion* newix;
struct ixpansion *newix;
/* Do nothing if we are not inside "({...})",
as in that case this expansion can't need subsequent RTL modification. */
if (iter_stack == 0)
return;
newix = (struct ixpansion*) obstack_alloc (&ixp_obstack,
sizeof (struct ixpansion));
newix = (struct ixpansion *) obstack_alloc (&ixp_obstack,
sizeof (struct ixpansion));
newix->ixdecl = idecl;
newix->ixprologue_start = pro_start;
newix->ixprologue_end = pro_end;
@ -474,7 +474,7 @@ static void
delete_ixpansion (idecl)
tree idecl;
{
struct ixpansion* previx = 0, *ix;
struct ixpansion *previx = 0, *ix;
for (ix = sublevel_ixpansions.first; ix; ix = ix->next)
if (ix->ixdecl == idecl)
@ -580,7 +580,7 @@ pixl (head)
return head;
}
/* Print Iterator Stack*/
/* Print Iterator Stack. */
void
pis ()

View file

@ -129,7 +129,8 @@ GNU_xref_end ()
fatal ("GCC does not yet support XREF");
}
/* called at end of parsing, but before end-of-file processing. */
/* Called at end of parsing, but before end-of-file processing. */
void
finish_file ()
{

View file

@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */
/* When structure field packing is in effect, this variable is the
number of bits to use as the maximum alignment. When packing is not
in effect, this is zero. */
in effect, this is zero. */
extern int maximum_field_alignment;

View file

@ -40,27 +40,27 @@ struct lang_identifier
/* This represents the value which the identifier has in the
file-scope namespace. */
#define IDENTIFIER_GLOBAL_VALUE(NODE) \
(((struct lang_identifier *)(NODE))->global_value)
(((struct lang_identifier *) (NODE))->global_value)
/* This represents the value which the identifier has in the current
scope. */
#define IDENTIFIER_LOCAL_VALUE(NODE) \
(((struct lang_identifier *)(NODE))->local_value)
(((struct lang_identifier *) (NODE))->local_value)
/* This represents the value which the identifier has as a label in
the current label scope. */
#define IDENTIFIER_LABEL_VALUE(NODE) \
(((struct lang_identifier *)(NODE))->label_value)
(((struct lang_identifier *) (NODE))->label_value)
/* This records the extern decl of this identifier, if it has had one
at any point in this compilation. */
#define IDENTIFIER_LIMBO_VALUE(NODE) \
(((struct lang_identifier *)(NODE))->limbo_value)
(((struct lang_identifier *) (NODE))->limbo_value)
/* This records the implicit function decl of this identifier, if it
has had one at any point in this compilation. */
#define IDENTIFIER_IMPLICIT_DECL(NODE) \
(((struct lang_identifier *)(NODE))->implicit_decl)
(((struct lang_identifier *) (NODE))->implicit_decl)
/* This is the last function in which we printed an "undefined variable"
message for this identifier. Value is a FUNCTION_DECL or null. */
#define IDENTIFIER_ERROR_LOCUS(NODE) \
(((struct lang_identifier *)(NODE))->error_locus)
(((struct lang_identifier *) (NODE))->error_locus)
/* In identifiers, C uses the following fields in a special way:
TREE_PUBLIC to record that there was a previous local extern decl.
@ -109,7 +109,7 @@ struct lang_type
/* Store a value in that field. */
#define C_SET_EXP_ORIGINAL_CODE(exp, code) \
(TREE_COMPLEXITY (exp) = (int)(code))
(TREE_COMPLEXITY (exp) = (int) (code))
/* Record whether a typedef for type `int' was actually `signed int'. */
#define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))

View file

@ -395,7 +395,7 @@ common_type (t1, t2)
}
t1 = build_function_type (valtype, newargs);
/* ... falls through ... */
/* ... falls through ... */
}
default:
@ -1721,7 +1721,7 @@ convert_arguments (typelist, values, name, fundecl)
}
parmval = convert_for_assignment (type, val,
(char *)0, /* arg passing */
(char *) 0, /* arg passing */
fundecl, name, parmnum + 1);
#ifdef PROMOTE_PROTOTYPES
@ -3284,7 +3284,7 @@ mark_addressable (exp)
return 0;
}
/* ... fall through ... */
/* ... fall through ... */
case ADDR_EXPR:
case ARRAY_REF:
@ -4079,7 +4079,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum)
if (! memb_types)
{
/* We have only a marginally acceptable member type;
it needs a warning. */
it needs a warning. */
register tree ttl = TREE_TYPE (marginal_memb_type);
register tree ttr = TREE_TYPE (rhstype);
@ -5035,7 +5035,7 @@ static tree constructor_pending_elts;
static int constructor_depth;
/* 0 if implicitly pushing constructor levels is allowed. */
int constructor_no_implicit = 0; /* 0 for C; 1 for some other languages. */
int constructor_no_implicit = 0; /* 0 for C; 1 for some other languages. */
/* 1 if this constructor level was entered implicitly. */
static int constructor_implicit;
@ -6369,7 +6369,7 @@ process_init_element (value)
break;
}
/* In the case of [LO .. HI] = VALUE, only evaluate VALUE once. */
/* In the case of [LO .. HI] = VALUE, only evaluate VALUE once. */
if (constructor_range_end)
value = save_expr (value);

View file

@ -182,7 +182,8 @@ init_caller_save ()
reg_save_code[i][j] = recog_memoized (saveinsn);
reg_restore_code[i][j] = recog_memoized (restinsn);
/* Now extract both insns and see if we can meet their constraints. */
/* Now extract both insns and see if we can meet their
constraints. */
ok = (reg_save_code[i][j] != -1 && reg_restore_code[i][j] != -1);
if (ok)
{
@ -307,7 +308,7 @@ setup_save_areas (pchanged)
ok &= (TEST_HARD_REG_BIT (hard_regs_used, regno) != 0);
}
/* We have found an acceptable mode to store in. */
/* We have found an acceptable mode to store in. */
if (ok)
{
@ -315,7 +316,7 @@ setup_save_areas (pchanged)
= assign_stack_local (regno_save_mode[i][j],
GET_MODE_SIZE (regno_save_mode[i][j]), 0);
/* Setup single word save area just in case... */
/* Setup single word save area just in case... */
for (k = 0; k < j; k++)
{
/* This should not depend on WORDS_BIG_ENDIAN.

View file

@ -261,7 +261,7 @@ prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen)
funexp = protect_from_queue (funexp, 0);
if (fndecl != 0)
/* Get possible static chain value for nested function in C. */
/* Get possible static chain value for nested function in C. */
static_chain_value = lookup_static_chain (fndecl);
/* Make a valid memory address and copy constants thru pseudo-regs,
@ -1392,8 +1392,9 @@ expand_call (exp, target, ignore)
int needed = args_size.constant;
/* Store the maximum argument space used. It will be pushed by the
prologue (if ACCUMULATE_OUTGOING_ARGS, or stack overflow checking). */
/* Store the maximum argument space used. It will be pushed by
the prologue (if ACCUMULATE_OUTGOING_ARGS, or stack overflow
checking). */
if (needed > current_function_outgoing_args_size)
current_function_outgoing_args_size = needed;
@ -1611,7 +1612,7 @@ expand_call (exp, target, ignore)
}
/* Precompute all register parameters. It isn't safe to compute anything
once we have started filling any specific hard regs. */
once we have started filling any specific hard regs. */
reg_parm_seen = 0;
for (i = 0; i < num_actuals; i++)
if (args[i].reg != 0 && ! args[i].pass_on_stack)
@ -2212,7 +2213,7 @@ expand_call (exp, target, ignore)
/* If this was alloca, record the new stack level for nonlocal gotos.
Check for the handler slots since we might not have a save area
for non-local gotos. */
for non-local gotos. */
if (may_be_alloca && nonlocal_goto_handler_slot != 0)
emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX);
@ -2380,7 +2381,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
abort ();
#endif
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree)0, 1);
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
}
va_end (p);
@ -2639,7 +2640,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
)
args_size.constant += argvec[count].size.constant;
FUNCTION_ARG_ADVANCE (args_so_far, Pmode, (tree)0, 1);
FUNCTION_ARG_ADVANCE (args_so_far, Pmode, (tree) 0, 1);
count++;
}
@ -2728,7 +2729,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
abort ();
#endif
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree)0, 1);
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
}
va_end (p);
@ -2971,8 +2972,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
if (argblock && ! variable_size && arg->stack)
{
#ifdef ARGS_GROW_DOWNWARD
/* stack_slot is negative, but we want to index stack_usage_map */
/* with positive values. */
/* stack_slot is negative, but we want to index stack_usage_map
with positive values. */
if (GET_CODE (XEXP (arg->stack_slot, 0)) == PLUS)
upper_bound = -INTVAL (XEXP (XEXP (arg->stack_slot, 0), 1)) + 1;
else

View file

@ -301,7 +301,7 @@ static void hack_vms_include_specification ();
#endif
#ifndef NULL_PTR
#define NULL_PTR ((GENERIC_PTR)0)
#define NULL_PTR ((GENERIC_PTR) 0)
#endif
#ifndef INCLUDE_LEN_FUDGE
@ -427,7 +427,7 @@ static FILE *pcp_outfile;
/* Nonzero means we are inside an IF during a -pcp run. In this mode
macro expansion is done, and preconditions are output for all macro
uses requiring them. */
uses requiring them. */
static int pcp_inside_if;
/* Nonzero means never to include precompiled files.
@ -547,7 +547,7 @@ typedef struct file_buf FILE_BUF;
/* The output buffer. Its LENGTH field is the amount of room allocated
for the buffer, not the number of chars actually present. To get
that, subtract outbuf.buf from outbuf.bufp. */
that, subtract outbuf.buf from outbuf.bufp. */
#define OUTBUF_SIZE 10 /* initial size of output buffer */
static FILE_BUF outbuf;
@ -577,9 +577,9 @@ struct file_name_list
char fname[1];
};
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
/* The */
static struct default_include {
char *fname; /* The name of the directory. */
@ -721,7 +721,7 @@ enum sharp_token_type {
#define f(x) x+x+x+x+x+x+x would have replacement text "++++++" and
pattern list
{ (0, 1), (1, 1), (1, 1), ..., (1, 1), NULL }
where (x, y) means (nchars, argno). */
where (x, y) means (nchars, argno). */
typedef struct definition DEFINITION;
struct definition {
@ -755,7 +755,7 @@ struct definition {
};
/* different kinds of things that can appear in the value field
of a hash node. Actually, this may be useless now. */
of a hash node. Actually, this may be useless now. */
union hashval {
char *cpval;
DEFINITION *defn;
@ -782,7 +782,7 @@ static char rest_extension[] = "...";
plus some special tokens like __LINE__ (these each have their own
type, and the appropriate code is run when that type of node is seen.
It does not contain control words like "#define", which are recognized
by a separate piece of code. */
by a separate piece of code. */
/* different flavors of hash nodes --- also used in keyword table */
enum node_type {
@ -831,7 +831,7 @@ struct hashnode {
struct hashnode *prev;
struct hashnode **bucket_hdr; /* also, a back pointer to this node's hash
chain is kept, in case the node is the head
of the chain and gets deleted. */
of the chain and gets deleted. */
enum node_type type; /* type of special token */
int length; /* length of token, for quick comparison */
U_CHAR *name; /* the actual name */
@ -845,7 +845,7 @@ typedef struct hashnode HASHNODE;
loop computes the hash value `on the fly' for most tokens,
in order to avoid the overhead of a lot of procedure calls to
the hashf () function. Hashf () only exists for the sake of
politeness, for use when speed isn't so important. */
politeness, for use when speed isn't so important. */
#define HASHSIZE 1403
static HASHNODE *hashtab[HASHSIZE];
@ -919,7 +919,7 @@ struct assertion_hashnode {
struct assertion_hashnode *prev;
/* also, a back pointer to this node's hash
chain is kept, in case the node is the head
of the chain and gets deleted. */
of the chain and gets deleted. */
struct assertion_hashnode **bucket_hdr;
int length; /* length of token, for quick comparison */
U_CHAR *name; /* the actual name */
@ -934,7 +934,7 @@ typedef struct assertion_hashnode ASSERTION_HASHNODE;
loop computes the hash value `on the fly' for most tokens,
in order to avoid the overhead of a lot of procedure calls to
the hashf function. hashf only exists for the sake of
politeness, for use when speed isn't so important. */
politeness, for use when speed isn't so important. */
#define ASSERTION_HASHSIZE 37
static ASSERTION_HASHNODE *assertion_hashtab[ASSERTION_HASHSIZE];
@ -951,7 +951,7 @@ struct directive {
int length; /* Length of name */
int (*func) DO_PROTO; /* Function to handle directive */
char *name; /* Name of directive */
enum node_type type; /* Code which describes which directive. */
enum node_type type; /* Code which describes which directive. */
char angle_brackets; /* Nonzero => <...> is special. */
char traditional_comments; /* Nonzero: keep comments if -traditional. */
char pass_thru; /* Copy preprocessed directive to output file. */
@ -1011,9 +1011,9 @@ static struct directive directive_table[] = {
this points to the # (or the : of the %:) that started the directive. */
U_CHAR *directive_start;
/* table to tell if char can be part of a C identifier. */
/* table to tell if char can be part of a C identifier. */
U_CHAR is_idchar[256];
/* table to tell if char can be first char of a c identifier. */
/* table to tell if char can be first char of a c identifier. */
U_CHAR is_idstart[256];
/* table to tell if c is horizontal space. */
U_CHAR is_hor_space[256];
@ -1320,7 +1320,7 @@ main (argc, argv)
struct rlimit rlim;
/* Set the stack limit huge so that alloca (particularly stringtab
* in dbxread.c) does not fail. */
in dbxread.c) does not fail. */
getrlimit (RLIMIT_STACK, &rlim);
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
@ -1895,8 +1895,8 @@ main (argc, argv)
done_initializing = 1;
{ /* read the appropriate environment variable and if it exists
replace include_defaults with the listed path. */
{ /* Read the appropriate environment variable and if it exists
replace include_defaults with the listed path. */
char *epath = 0;
switch ((objc << 1) + cplusplus)
{
@ -2351,7 +2351,7 @@ index0 (s, c, n)
Using an extra pass through the buffer takes a little extra time,
but is infinitely less hairy than trying to handle trigraphs inside
strings, etc. everywhere, and also makes sure that trigraphs are
only translated in the top level of processing. */
only translated in the top level of processing. */
static void
trigraph_pcp (buf)
@ -2402,7 +2402,7 @@ trigraph_pcp (buf)
len = sptr - fptr - 2;
/* BSD doc says bcopy () works right for overlapping strings. In ANSI
C, this will be memmove (). */
C, this will be memmove (). */
if (bptr != fptr && len > 0)
bcopy ((char *) fptr, (char *) bptr, len);
@ -2497,8 +2497,7 @@ name_newline_fix (bp)
Upon return, any arg will be pointed to with argstart and will be
arglen long. Note that we don't parse that arg since it will just
be printed out again.
*/
be printed out again. */
static char *
get_lintcmd (ibp, limit, argstart, arglen, cmdlen)
@ -2702,7 +2701,7 @@ do { ip = &instack[indepth]; \
if (ident_length)
goto specialchar;
/* Copy #foo (bar lose) without macro expansion. */
obp[-1] = '#'; /* In case it was '%'. */
obp[-1] = '#'; /* In case it was '%'. */
SKIP_WHITE_SPACE (ibp);
while (is_idchar[*ibp])
*obp++ = *ibp++;
@ -2922,10 +2921,10 @@ do { ip = &instack[indepth]; \
goto specialchar;
if (*ibp == '/') {
/* C++ style comment... */
/* C++ style comment... */
start_line = ip->lineno;
/* Comments are equivalent to spaces. */
/* Comments are equivalent to spaces. */
if (! put_out_comments)
obp[-1] = ' ';
@ -2960,7 +2959,7 @@ do { ip = &instack[indepth]; \
start_line = ip->lineno;
++ibp; /* Skip the star. */
++ibp; /* Skip the star. */
/* If this cpp is for lint, we peek inside the comments: */
if (for_lint) {
@ -3973,7 +3972,7 @@ handle_directive (ip, op)
either the appropriate place in the input buffer, or to
the temp buffer if it was necessary to make one. cp
points to the first char after the contents of the (possibly
copied) directive, in either case. */
copied) directive, in either case. */
(*kt->func) (buf, cp, op, kt);
check_expand (op, ip->length - (ip->bufp - ip->buf));
@ -3991,7 +3990,7 @@ timestamp ()
{
static struct tm *timebuf;
if (!timebuf) {
time_t t = time ((time_t *)0);
time_t t = time ((time_t *) 0);
timebuf = localtime (&t);
}
return timebuf;
@ -4138,7 +4137,7 @@ special_symbol (hp, op)
if (pcp_outfile && pcp_inside_if
&& (hp->type == T_CONST
|| (hp->type == T_MACRO && hp->value.defn->predefined)))
/* Output a precondition for this macro use. */
/* Output a precondition for this macro use. */
fprintf (pcp_outfile, "#define %s\n", hp->name);
buf = " 1 ";
}
@ -4263,9 +4262,9 @@ get_filename:
}
/* We have "filename". Figure out directory this source
file is coming from and put it on the front of the list. */
file is coming from and put it on the front of the list. */
/* If -I- was specified, don't search current dir, only spec'd ones. */
/* If -I- was specified, don't search current dir, only spec'd ones. */
if (ignore_srcdir) break;
for (fp = &instack[indepth]; fp >= instack; fp--)
@ -4317,7 +4316,7 @@ get_filename:
* code from case '<' is repeated here) and generates a warning.
* (Note: macro expansion of `xyz' takes precedence.)
*/
if (retried && isalpha(*(U_CHAR *)(--fbeg))) {
if (retried && isalpha(*(U_CHAR *) (--fbeg))) {
while (fin != limit && (!isspace(*fin)))
*fend++ = *fin++;
warning ("VAX-C-style include specification found, use '#include <filename.h>' !");
@ -4622,6 +4621,7 @@ base_name (fname)
}
/* Yield nonzero if FILENAME is absolute (i.e. not relative). */
static int
absolute_filename (filename)
char *filename;
@ -5038,7 +5038,7 @@ finclude (f, inc, op, system_header_p, dirptr)
} else {
/* Cannot count its file size before reading.
First read the entire file into heap and
copy them into buffer on stack. */
copy them into buffer on stack. */
int bsize = 2000;
int st_size = 0;
@ -5125,8 +5125,8 @@ record_control_macro (inc, macro_name)
the address of the buffer following the preconditions. The buffer, in
this case, should never be freed because various pieces of it will
be referred to until all precompiled strings are output at the end of
the run.
*/
the run. */
static char *
check_precompiled (pcf, st, fname, limit)
int pcf;
@ -5157,7 +5157,7 @@ check_precompiled (pcf, st, fname, limit)
*limit = buf + length;
/* File is in core. Check the preconditions. */
/* File is in core. Check the preconditions. */
if (!check_preconditions (buf))
goto nope;
for (cp = buf; *cp; cp++)
@ -5179,6 +5179,7 @@ check_precompiled (pcf, st, fname, limit)
precompiled header. These are a series of #define and #undef
lines which must match the current contents of the hash
table. */
static int
check_preconditions (prec)
char *prec;
@ -5237,7 +5238,8 @@ check_preconditions (prec)
/* Process the main body of a precompiled file. BUF points to the
string section of the file, following the preconditions. LIMIT is one
character past the end. NAME is the name of the file being read
in. OP is the main output buffer */
in. OP is the main output buffer. */
static void
pcfinclude (buf, limit, name, op)
U_CHAR *buf, *limit, *name;
@ -5254,7 +5256,7 @@ pcfinclude (buf, limit, name, op)
nstrings = (nstrings << 8) | *cp++;
nstrings = (nstrings << 8) | *cp++;
/* Looping over each string... */
/* Looping over each string... */
while (nstrings--) {
U_CHAR *string_start;
U_CHAR *endofthiskey;
@ -5273,7 +5275,7 @@ pcfinclude (buf, limit, name, op)
if ((HOST_WIDE_INT) cp & 3)
cp += 4 - ((HOST_WIDE_INT) cp & 3);
/* Now get the string. */
/* Now get the string. */
str = (STRINGDEF *) (GENERIC_PTR) cp;
string_start = cp += sizeof (STRINGDEF);
@ -5283,7 +5285,7 @@ pcfinclude (buf, limit, name, op)
/* We need to macro expand the string here to ensure that the
proper definition environment is in place. If it were only
expanded when we find out it is needed, macros necessary for
its proper expansion might have had their definitions changed. */
its proper expansion might have had their definitions changed. */
tmpbuf = expand_to_temp_buffer (string_start, cp++, 0, 0);
/* Lineno is already set in the precompiled file */
str->contents = tmpbuf.buf;
@ -5296,14 +5298,14 @@ pcfinclude (buf, limit, name, op)
*stringlist_tailp = str;
stringlist_tailp = &str->chain;
/* Next comes a fourbyte number indicating the number of keys */
/* for this string. */
/* Next comes a fourbyte number indicating the number of keys
for this string. */
nkeys = *cp++;
nkeys = (nkeys << 8) | *cp++;
nkeys = (nkeys << 8) | *cp++;
nkeys = (nkeys << 8) | *cp++;
/* If this number is -1, then the string is mandatory. */
/* If this number is -1, then the string is mandatory. */
if (nkeys == -1)
str->writeflag = 1;
else
@ -5316,11 +5318,11 @@ pcfinclude (buf, limit, name, op)
cp += sizeof (KEYDEF);
/* Find the end of the key. At the end of this for loop we
advance CP to the start of the next key using this variable. */
advance CP to the start of the next key using this variable. */
endofthiskey = cp + strlen ((char *) cp);
kp->str = str;
/* Expand the key, and enter it into the hash table. */
/* Expand the key, and enter it into the hash table. */
tmpbuf = expand_to_temp_buffer (cp, endofthiskey, 0, 0);
tmpbuf.bufp = tmpbuf.buf;
@ -5347,12 +5349,13 @@ pcfinclude (buf, limit, name, op)
}
/* This output_line_directive serves to switch us back to the current
input file in case some of these strings get output (which will
result in line directives for the header file being output). */
result in line directives for the header file being output). */
output_line_directive (&instack[indepth], op, 0, enter_file);
}
/* Called from rescan when it hits a key for strings. Mark them all */
/* used and clean up. */
/* Called from rescan when it hits a key for strings. Mark them all
used and clean up. */
static void
pcstring_used (hp)
HASHNODE *hp;
@ -5364,8 +5367,9 @@ pcstring_used (hp)
delete_macro (hp);
}
/* Write the output, interspersing precompiled strings in their */
/* appropriate places. */
/* Write the output, interspersing precompiled strings in their
appropriate places. */
static void
write_output ()
{
@ -5375,10 +5379,10 @@ write_output ()
char *line_directive = xmalloc (line_directive_len);
int len;
/* In each run through the loop, either cur_buf_loc == */
/* next_string_loc, in which case we print a series of strings, or */
/* it is less than next_string_loc, in which case we write some of */
/* the buffer. */
/* In each run through the loop, either cur_buf_loc ==
next_string_loc, in which case we print a series of strings, or
it is less than next_string_loc, in which case we write some of
the buffer. */
cur_buf_loc = outbuf.buf;
next_string = stringlist;
@ -5451,7 +5455,7 @@ pass_thru_directive (buf, limit, op, keyword)
appeared. So the arglist is just convenience data passed
between these two routines. It is not kept around after
the current #define has been processed and entered into the
hash table. */
hash table. */
struct arglist {
struct arglist *next;
@ -5462,7 +5466,8 @@ struct arglist {
};
/* Create a DEFINITION node from a #define directive. Arguments are
as for do_define. */
as for do_define. */
static MACRODEF
create_definition (buf, limit, op)
U_CHAR *buf, *limit;
@ -5491,7 +5496,7 @@ create_definition (buf, limit, op)
/* Lossage will occur if identifiers or control keywords are broken
across lines using backslash. This is not the right place to take
care of that. */
care of that. */
if (*bp == '(') {
struct arglist *arg_ptrs = NULL;
@ -5566,7 +5571,7 @@ create_definition (buf, limit, op)
++bp; /* skip paren */
SKIP_WHITE_SPACE (bp);
/* now everything from bp before limit is the definition. */
/* now everything from bp before limit is the definition. */
defn = collect_expansion (bp, limit, argno, arg_ptrs);
defn->rest_args = rest_args;
@ -5613,7 +5618,7 @@ create_definition (buf, limit, op)
}
}
}
/* Now everything from bp before limit is the definition. */
/* Now everything from bp before limit is the definition. */
defn = collect_expansion (bp, limit, -1, NULL_PTR);
defn->args.argnames = (U_CHAR *) "";
}
@ -5725,9 +5730,8 @@ check_macro_name (symname, usage)
return sym_length;
}
/*
* return zero if two DEFINITIONs are isomorphic
*/
/* Return zero if two DEFINITIONs are isomorphic. */
static int
compare_defs (d1, d2)
DEFINITION *d1, *d2;
@ -5836,7 +5840,7 @@ collect_expansion (buf, end, nargs, arglist)
/* Scan thru the replacement list, ignoring comments and quoted
strings, picking up on the macro calls. It does a linear search
thru the arg list on every potential symbol. Profiling might say
that something smarter should happen. */
that something smarter should happen. */
if (end < buf)
abort ();
@ -6133,7 +6137,7 @@ do_assert (buf, limit, op, keyword)
/* Lossage will occur if identifiers or control tokens are broken
across lines using backslash. This is not the right place to take
care of that. */
care of that. */
if (*bp != '(') {
error ("missing token-sequence in `#assert'");
@ -6212,7 +6216,7 @@ do_unassert (buf, limit, op, keyword)
/* Lossage will occur if identifiers or control tokens are broken
across lines using backslash. This is not the right place to take
care of that. */
care of that. */
if (*bp == '(') {
int error_flag = 0;
@ -6426,15 +6430,14 @@ free_token_list (tokens)
}
}
/*
* Install a name in the assertion hash table.
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
/* Install a name in the assertion hash table.
If LEN is >= 0, it is the length of the name.
Otherwise, compute the length by scanning the entire name.
If HASH is >= 0, it is the precomputed hash code.
Otherwise, compute the hash code. */
static ASSERTION_HASHNODE *
assertion_install (name, len, hash)
U_CHAR *name;
@ -6465,16 +6468,15 @@ assertion_install (name, len, hash)
return hp;
}
/*
* find the most recent hash node for name name (ending with first
* non-identifier char) installed by install
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
/* Find the most recent hash node for name name (ending with first
non-identifier char) installed by install
If LEN is >= 0, it is the length of the name.
Otherwise, compute the length by scanning the entire name.
If HASH is >= 0, it is the precomputed hash code.
Otherwise, compute the hash code. */
static ASSERTION_HASHNODE *
assertion_lookup (name, len, hash)
U_CHAR *name;
@ -6502,8 +6504,8 @@ delete_assertion (hp)
if (hp->next != NULL)
hp->next->prev = hp->prev;
/* make sure that the bucket chain header that
the deleted guy was on points to the right thing afterwards. */
/* Make sure that the bucket chain header that the deleted guy was
on points to the right thing afterwards. */
if (hp == *hp->bucket_hdr)
*hp->bucket_hdr = hp->next;
@ -6662,11 +6664,9 @@ do_line (buf, limit, op, keyword)
return 0;
}
/*
* remove the definition of a symbol from the symbol table.
* according to un*x /lib/cpp, it is not an error to undef
* something that has no definitions, so it isn't one here either.
*/
/* Remove the definition of a symbol from the symbol table.
according to un*x /lib/cpp, it is not an error to undef
something that has no definitions, so it isn't one here either. */
static int
do_undef (buf, limit, op, keyword)
@ -6704,11 +6704,9 @@ do_undef (buf, limit, op, keyword)
return 0;
}
/*
* Report an error detected by the program we are processing.
* Use the text of the line in the error message.
* (We use error because it prints the filename & line#.)
*/
/* Report an error detected by the program we are processing.
Use the text of the line in the error message.
(We use error because it prints the filename & line#.) */
static int
do_error (buf, limit, op, keyword)
@ -6725,11 +6723,9 @@ do_error (buf, limit, op, keyword)
return 0;
}
/*
* Report a warning detected by the program we are processing.
* Use the text of the line in the warning message, then continue.
* (We use error because it prints the filename & line#.)
*/
/* Report a warning detected by the program we are processing.
Use the text of the line in the warning message, then continue.
(We use error because it prints the filename & line#.) */
static int
do_warning (buf, limit, op, keyword)
@ -6845,10 +6841,8 @@ do_pragma (buf, limit, op, keyword)
/* This was a fun hack, but #pragma seems to start to be useful.
By failing to recognize it, we pass it through unchanged to cc1. */
/*
* the behavior of the #pragma directive is implementation defined.
* this implementation defines it as follows.
*/
/* The behavior of the #pragma directive is implementation defined.
this implementation defines it as follows. */
static int
do_pragma ()
@ -6885,18 +6879,16 @@ do_sccs (buf, limit, op, keyword)
#endif /* defined (SCCS_DIRECTIVE) */
/*
* handle #if directive by
* 1) inserting special `defined' keyword into the hash table
* that gets turned into 0 or 1 by special_symbol (thus,
* if the luser has a symbol called `defined' already, it won't
* work inside the #if directive)
* 2) rescan the input into a temporary output buffer
* 3) pass the output buffer to the yacc parser and collect a value
* 4) clean up the mess left from steps 1 and 2.
* 5) call conditional_skip to skip til the next #endif (etc.),
* or not, depending on the value from step 3.
*/
/* Handle #if directive by
1) inserting special `defined' keyword into the hash table
that gets turned into 0 or 1 by special_symbol (thus,
if the luser has a symbol called `defined' already, it won't
work inside the #if directive)
2) rescan the input into a temporary output buffer
3) pass the output buffer to the yacc parser and collect a value
4) clean up the mess left from steps 1 and 2.
5) call conditional_skip to skip til the next #endif (etc.),
or not, depending on the value from step 3. */
static int
do_if (buf, limit, op, keyword)
@ -6912,10 +6904,8 @@ do_if (buf, limit, op, keyword)
return 0;
}
/*
* handle a #elif directive by not changing if_stack either.
* see the comment above do_else.
*/
/* Handle a #elif directive by not changing if_stack either.
see the comment above do_else. */
static int
do_elif (buf, limit, op, keyword)
@ -6955,10 +6945,9 @@ do_elif (buf, limit, op, keyword)
return 0;
}
/*
* evaluate a #if expression in BUF, of length LENGTH,
* then parse the result as a C expression and return the value as an int.
*/
/* Evaluate a #if expression in BUF, of length LENGTH, then parse the
result as a C expression and return the value as an int. */
static HOST_WIDE_INT
eval_if_expression (buf, length)
U_CHAR *buf;
@ -6983,11 +6972,9 @@ eval_if_expression (buf, length)
return value;
}
/*
* routine to handle ifdef/ifndef. Try to look up the symbol,
* then do or don't skip to the #endif/#else/#elif depending
* on what directive is actually being processed.
*/
/* routine to handle ifdef/ifndef. Try to look up the symbol, then do
or don't skip to the #endif/#else/#elif depending on what directive
is actually being processed. */
static int
do_xifdef (buf, limit, op, keyword)
@ -7113,11 +7100,10 @@ conditional_skip (ip, skip, type, control_macro, op)
}
}
/*
* skip to #endif, #else, or #elif. adjust line numbers, etc.
* leaves input ptr at the sharp sign found.
* If ANY is nonzero, return at next directive of any sort.
*/
/* Skip to #endif, #else, or #elif. adjust line numbers, etc.
Leaves input ptr at the sharp sign found.
If ANY is nonzero, return at next directive of any sort. */
static void
skip_if_group (ip, any, op)
FILE_BUF *ip;
@ -7405,12 +7391,10 @@ skip_if_group (ip, any, op)
}
}
/*
* handle a #else directive. Do this by just continuing processing
* without changing if_stack ; this is so that the error message
* for missing #endif's etc. will point to the original #if. It
* is possible that something different would be better.
*/
/* Handle a #else directive. Do this by just continuing processing
without changing if_stack ; this is so that the error message
for missing #endif's etc. will point to the original #if. It
is possible that something different would be better. */
static int
do_else (buf, limit, op, keyword)
@ -7453,9 +7437,7 @@ do_else (buf, limit, op, keyword)
return 0;
}
/*
* unstack after #endif directive
*/
/* Unstack after #endif directive. */
static int
do_endif (buf, limit, op, keyword)
@ -7517,7 +7499,8 @@ do_endif (buf, limit, op, keyword)
/* When an #else or #endif is found while skipping failed conditional,
if -pedantic was specified, this is called to warn about text after
the directive name. P points to the first char after the directive name. */
the directive name. P points to the first char after the directive
name. */
static void
validate_else (p, limit)
@ -7565,9 +7548,10 @@ validate_else (p, limit)
counter is not sufficient to deal with newlines in the string.
If NOWARN is nonzero, don't warn about slash-star inside a comment.
This feature is useful when processing a comment that is going to be
processed or was processed at another point in the preprocessor,
to avoid a duplicate warning. Likewise for unterminated comment errors. */
This feature is useful when processing a comment that is going to
be processed or was processed at another point in the preprocessor,
to avoid a duplicate warning. Likewise for unterminated comment
errors. */
static U_CHAR *
skip_to_end_of_comment (ip, line_counter, nowarn)
@ -7645,22 +7629,21 @@ skip_to_end_of_comment (ip, line_counter, nowarn)
return bp;
}
/*
* Skip over a quoted string. BP points to the opening quote.
* Returns a pointer after the closing quote. Don't go past LIMIT.
* START_LINE is the line number of the starting point (but it need
* not be valid if the starting point is inside a macro expansion).
*
* The input stack state is not changed.
*
* If COUNT_NEWLINES is nonzero, it points to an int to increment
* for each newline passed.
*
* If BACKSLASH_NEWLINES_P is nonzero, store 1 thru it
* if we pass a backslash-newline.
*
* If EOFP is nonzero, set *EOFP to 1 if the string is unterminated.
*/
/* Skip over a quoted string. BP points to the opening quote.
Returns a pointer after the closing quote. Don't go past LIMIT.
START_LINE is the line number of the starting point (but it need
not be valid if the starting point is inside a macro expansion).
The input stack state is not changed.
If COUNT_NEWLINES is nonzero, it points to an int to increment
for each newline passed.
If BACKSLASH_NEWLINES_P is nonzero, store 1 thru it
if we pass a backslash-newline.
If EOFP is nonzero, set *EOFP to 1 if the string is unterminated. */
static U_CHAR *
skip_quoted_string (bp, limit, start_line, count_newlines, backslash_newlines_p, eofp)
register U_CHAR *bp;
@ -7702,7 +7685,7 @@ skip_quoted_string (bp, limit, start_line, count_newlines, backslash_newlines_p,
} else if (c == '\n') {
if (traditional) {
/* Unterminated strings and character constants are 'valid'. */
bp--; /* Don't consume the newline. */
bp--; /* Don't consume the newline. */
if (eofp)
*eofp = 1;
break;
@ -7732,6 +7715,7 @@ skip_quoted_string (bp, limit, start_line, count_newlines, backslash_newlines_p,
/* Place into DST a quoted string representing the string SRC.
Return the address of DST's terminating null. */
static char *
quote_string (dst, src)
char *dst, *src;
@ -7816,13 +7800,11 @@ skip_paren_group (ip)
return p;
}
/*
* write out a #line directive, for instance, after an #include file.
* If CONDITIONAL is nonzero, we can omit the #line if it would
* appear to be a no-op, and we can output a few newlines instead
* if we want to increase the line number by a small amount.
* FILE_CHANGE says whether we are entering a file, leaving, or neither.
*/
/* Write out a #line directive, for instance, after an #include file.
If CONDITIONAL is nonzero, we can omit the #line if it would
appear to be a no-op, and we can output a few newlines instead
if we want to increase the line number by a small amount.
FILE_CHANGE says whether we are entering a file, leaving, or neither. */
static void
output_line_directive (ip, op, conditional, file_change)
@ -7978,7 +7960,7 @@ macroexpand (hp, op)
if (rest_args)
continue;
if (i < nargs || (nargs == 0 && i == 0)) {
/* if we are working on last arg which absorbs rest of args... */
/* If we are working on last arg which absorbs rest of args... */
if (i == nargs - 1 && defn->rest_args)
rest_args = 1;
parse_error = macarg (&args[i], rest_args);
@ -8256,8 +8238,8 @@ macroexpand (hp, op)
abort ();
}
/* if there is anything left of the definition
after handling the arg list, copy that in too. */
/* If there is anything left of the definition after handling
the arg list, copy that in too. */
for (i = offset; i < defn->length; i++) {
/* if we've reached the end of the macro */
@ -8313,11 +8295,9 @@ macroexpand (hp, op)
}
}
/*
* Parse a macro argument and store the info on it into *ARGPTR.
* REST_ARGS is passed to macarg1 to make it absorb the rest of the args.
* Return nonzero to indicate a syntax error.
*/
/* Parse a macro argument and store the info on it into *ARGPTR.
REST_ARGS is passed to macarg1 to make it absorb the rest of the args.
Return nonzero to indicate a syntax error. */
static char *
macarg (argptr, rest_args)
@ -8715,9 +8695,8 @@ change_newlines (start, length)
return obp - start;
}
/*
* my_strerror - return the descriptive text associated with an `errno' code.
*/
/* my_strerror - return the descriptive text associated with an
`errno' code. */
char *
my_strerror (errnum)
@ -8748,9 +8727,7 @@ my_strerror (errnum)
return result;
}
/*
* error - print error message and increment count of errors.
*/
/* error - print error message and increment count of errors. */
void
error (PRINTF_ALIST (msg))
@ -8939,7 +8916,7 @@ vwarning_with_line (line, msg, args)
fprintf (stderr, "\n");
}
/* print an error message and maybe count it. */
/* Print an error message and maybe count it. */
void
pedwarn (PRINTF_ALIST (msg))
@ -9087,6 +9064,7 @@ line_for_error (line)
/* You might think void was cleaner for the return type,
but that would get type mismatch in check_expand in strict ANSI. */
static int
grow_outbuf (obuf, needed)
register FILE_BUF *obuf;
@ -9128,8 +9106,9 @@ grow_outbuf (obuf, needed)
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
* Otherwise, compute the hash code.
*/
static HASHNODE *
install (name, len, type, value, hash)
U_CHAR *name;
@ -9183,6 +9162,7 @@ install (name, len, type, value, hash)
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
HASHNODE *
lookup (name, len, hash)
U_CHAR *name;
@ -9233,8 +9213,8 @@ delete_macro (hp)
if (hp->next != NULL)
hp->next->prev = hp->prev;
/* make sure that the bucket chain header that
the deleted guy was on points to the right thing afterwards. */
/* Make sure that the bucket chain header that the deleted guy was
on points to the right thing afterwards. */
if (hp == *hp->bucket_hdr)
*hp->bucket_hdr = hp->next;
@ -9257,6 +9237,7 @@ delete_macro (hp)
* return hash function on name. must be compatible with the one
* computed a step at a time, elsewhere
*/
static int
hashf (name, len, hashsize)
register U_CHAR *name;
@ -9273,6 +9254,7 @@ hashf (name, len, hashsize)
/* Dump the definition of a single macro HP to OF. */
static void
dump_single_macro (hp, of)
register HASHNODE *hp;
@ -9753,8 +9735,8 @@ make_assertion (option, str)
for (kt = directive_table; kt->type != T_ASSERT; kt++)
;
/* pass NULL as output ptr to do_define since we KNOW it never
does any output.... */
/* Pass NULL as output ptr to do_define since we KNOW it never does
any output.... */
do_assert (buf, buf + strlen ((char *) buf) , NULL_PTR, kt);
--indepth;
}
@ -10020,9 +10002,9 @@ savestring (input)
#ifdef VMS
/* Under VMS we need to fix up the "include" specification
filename so that everything following the 1st slash is
changed into its correct VMS file specification. */
/* Under VMS we need to fix up the "include" specification filename so
that everything following the 1st slash is changed into its correct
VMS file specification. */
static void
hack_vms_include_specification (fname)
@ -10054,7 +10036,7 @@ hack_vms_include_specification (fname)
needed to get things working properly.
If no device is specified, then the first directory name is taken to be
a device name (or a rooted logical). */
a device name (or a rooted logical). */
/* See if we found that 1st slash */
if (cp == 0) return; /* Nothing to do!!! */
@ -10104,14 +10086,14 @@ hack_vms_include_specification (fname)
/* If there are no other slashes then the filename will be
in the "root" directory. Otherwise, we need to add
directory specifications. */
directory specifications. */
if (index (cp1, '/') == 0) {
/* Just add "000000]" as the directory string */
strcpy (cp2, "000000]");
cp2 += strlen (cp2);
check_filename_before_returning = 1; /* we might need to fool with this later */
} else {
/* As long as there are still subdirectories to add, do them. */
/* As long as there are still subdirectories to add, do them. */
while (index (cp1, '/') != 0) {
/* If this token is "." we can ignore it */
if ((cp1[0] == '.') && (cp1[1] == '/')) {
@ -10140,7 +10122,7 @@ hack_vms_include_specification (fname)
/* Now add the filename */
while (*cp1) *cp2++ = *cp1++;
*cp2 = 0;
/* Now append it to the original VMS spec. */
/* Now append it to the original VMS spec. */
strcpy (cp, Local);
/* If we put a [000000] in the filename, try to open it first. If this fails,
@ -10226,8 +10208,7 @@ write (fd, buf, size)
"mbc=16" - Set multi-block count to 16 (use a 8192 byte buffer).
"deq=64" - When extending the file, extend it in chunks of 32Kbytes.
"fop=tef"- Truncate unused portions of file when closing file.
"shr=nil"- Disallow file sharing while file is open.
*/
"shr=nil"- Disallow file sharing while file is open. */
static FILE *
freopen (fname, type, oldfile)

View file

@ -83,7 +83,7 @@ struct arglist {
#endif
#ifndef NULL_PTR
#define NULL_PTR ((GENERIC_PTR)0)
#define NULL_PTR ((GENERIC_PTR) 0)
#endif
/* Find the largest host integer type and set its size and type.

View file

@ -25,7 +25,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Build tables of static constructors and destructors and run ld. */
/* Build tables of static constructors and destructors and run ld. */
#include "config.h"
#include <sys/types.h>
@ -189,7 +189,7 @@ int do_collecting = 1;
int do_collecting = 0;
#endif
/* Linked lists of constructor and destructor names. */
/* Linked lists of constructor and destructor names. */
struct id
{
@ -231,9 +231,9 @@ static int shared_obj; /* true if -shared */
static int temp_filename_length; /* Length of temp_filename */
static char *temp_filename; /* Base of temp filenames */
static char *c_file; /* <xxx>.c for constructor/destructor list. */
static char *o_file; /* <xxx>.o for constructor/destructor list. */
static char *export_file; /* <xxx>.x for AIX export list. */
static char *c_file; /* <xxx>.c for constructor/destructor list. */
static char *o_file; /* <xxx>.o for constructor/destructor list. */
static char *export_file; /* <xxx>.x for AIX export list. */
char *ldout; /* File for ld errors. */
static char *output_file; /* Output file for ld. */
static char *nm_file_name; /* pathname of nm */
@ -262,8 +262,8 @@ extern FILE *fdopen ();
struct prefix_list
{
char *prefix; /* String to prepend to the path. */
struct prefix_list *next; /* Next in linked list. */
char *prefix; /* String to prepend to the path. */
struct prefix_list *next; /* Next in linked list. */
};
struct path_prefix
@ -373,7 +373,7 @@ collect_exit (status)
}
/* Die when sys call fails. */
/* Die when sys call fails. */
void
fatal_perror (string, arg1, arg2, arg3)
@ -387,7 +387,7 @@ fatal_perror (string, arg1, arg2, arg3)
collect_exit (1);
}
/* Just die. */
/* Just die. */
void
fatal (string, arg1, arg2, arg3)
@ -450,7 +450,7 @@ xcalloc (size1, size2)
return ptr;
fatal ("out of memory");
return (char *)0;
return (char *) 0;
}
char *
@ -462,7 +462,7 @@ xmalloc (size)
return ptr;
fatal ("out of memory");
return (char *)0;
return (char *) 0;
}
char *
@ -720,7 +720,7 @@ is_in_prefix_list (pprefix, string, filep)
/* Search for NAME using prefix list PPREFIX. We only look for executable
files.
Return 0 if not found, otherwise return its name, allocated with malloc. */
Return 0 if not found, otherwise return its name, allocated with malloc. */
static char *
find_a_file (pprefix, name)
@ -857,7 +857,7 @@ prefix_from_string (p, pprefix)
}
}
/* Main program. */
/* Main program. */
int
main (argc, argv)
@ -1147,7 +1147,7 @@ main (argc, argv)
*ld1++ = *ld2++ = ld_file_name;
/* Make temp file names. */
/* Make temp file names. */
temp_filename = choose_temp_base ();
temp_filename_length = strlen (temp_filename);
c_file = xcalloc (temp_filename_length + sizeof (".c"), 1);
@ -1170,11 +1170,11 @@ main (argc, argv)
If you propose to make GCC pass some other option,
just imagine what will happen if ld is really ld!!! */
/* Parse arguments. Remember output file spec, pass the rest to ld. */
/* Parse arguments. Remember output file spec, pass the rest to ld. */
/* After the first file, put in the c++ rt0. */
first_file = 1;
while ((arg = *++argv) != (char *)0)
while ((arg = *++argv) != (char *) 0)
{
*ld1++ = *ld2++ = arg;
@ -1232,7 +1232,7 @@ main (argc, argv)
break;
}
}
else if ((p = rindex (arg, '.')) != (char *)0
else if ((p = rindex (arg, '.')) != (char *) 0
&& (strcmp (p, ".o") == 0 || strcmp (p, ".a") == 0))
{
if (first_file)
@ -1281,7 +1281,7 @@ main (argc, argv)
*ld1++ = buf;
*ld2++ = buf;
exportf = fopen (export_file, "w");
if (exportf == (FILE *)0)
if (exportf == (FILE *) 0)
fatal_perror ("%s", export_file);
write_export_file (exportf);
if (fclose (exportf))
@ -1290,7 +1290,7 @@ main (argc, argv)
#endif
*c_ptr++ = c_file;
*object = *c_ptr = *ld1 = (char *)0;
*object = *c_ptr = *ld1 = (char *) 0;
if (vflag)
{
@ -1399,7 +1399,7 @@ main (argc, argv)
maybe_unlink(output_file);
outf = fopen (c_file, "w");
if (outf == (FILE *)0)
if (outf == (FILE *) 0)
fatal_perror ("%s", c_file);
write_c_file (outf, c_file);
@ -1414,7 +1414,7 @@ main (argc, argv)
*ld2++ = LD_FINI_SWITCH;
*ld2++ = fininame;
#endif
*ld2 = (char*)0;
*ld2 = (char*) 0;
#ifdef COLLECT_EXPORT_LIST
if (shared_obj)
@ -1424,7 +1424,7 @@ main (argc, argv)
add_to_list (&exports, "_GLOBAL__DI");
add_to_list (&exports, "_GLOBAL__DD");
exportf = fopen (export_file, "w");
if (exportf == (FILE *)0)
if (exportf == (FILE *) 0)
fatal_perror ("%s", export_file);
write_export_file (exportf);
if (fclose (exportf))
@ -1446,7 +1446,7 @@ main (argc, argv)
}
/* Assemble the constructor and destructor tables.
Link the tables in with the rest of the program. */
Link the tables in with the rest of the program. */
fork_execute ("gcc", c_argv);
fork_execute ("ld", ld2_argv);
@ -1462,7 +1462,7 @@ main (argc, argv)
}
/* Wait for a process to finish, and exit if a non-zero status is found. */
/* Wait for a process to finish, and exit if a non-zero status is found. */
int
collect_wait (prog)
@ -1531,7 +1531,7 @@ collect_execute (prog, argv, redir)
else
fprintf (stderr, "[cannot find %s]", prog);
for (p_argv = &argv[1]; (str = *p_argv) != (char *)0; p_argv++)
for (p_argv = &argv[1]; (str = *p_argv) != (char *) 0; p_argv++)
fprintf (stderr, " %s", str);
fprintf (stderr, "\n");
@ -1756,7 +1756,7 @@ write_c_file_stat (stream, name)
}
}
/* Write the constructor/destructor tables. */
/* Write the constructor/destructor tables. */
static void
write_c_file_glob (stream, name)
@ -1844,13 +1844,13 @@ scan_prog_file (prog_name, which_pass)
nm_argv[argc++] = NM_FLAGS;
nm_argv[argc++] = prog_name;
nm_argv[argc++] = (char *)0;
nm_argv[argc++] = (char *) 0;
if (pipe (pipe_fd) < 0)
fatal_perror ("pipe");
inf = fdopen (pipe_fd[0], "r");
if (inf == (FILE *)0)
if (inf == (FILE *) 0)
fatal_perror ("fdopen");
/* Trace if needed. */
@ -1859,7 +1859,7 @@ scan_prog_file (prog_name, which_pass)
char **p_argv;
char *str;
for (p_argv = &nm_argv[0]; (str = *p_argv) != (char *)0; p_argv++)
for (p_argv = &nm_argv[0]; (str = *p_argv) != (char *) 0; p_argv++)
fprintf (stderr, " %s", str);
fprintf (stderr, "\n");
@ -1908,13 +1908,13 @@ scan_prog_file (prog_name, which_pass)
fprintf (stderr, "\nnm output with constructors/destructors.\n");
/* Read each line of nm output. */
while (fgets (buf, sizeof buf, inf) != (char *)0)
while (fgets (buf, sizeof buf, inf) != (char *) 0)
{
int ch, ch2;
char *name, *end;
/* If it contains a constructor or destructor name, add the name
to the appropriate list. */
to the appropriate list. */
for (p = buf; (ch = *p) != '\0' && ch != '\n' && ch != '_'; p++)
if (ch == ' ' && p[1] == 'U' && p[2] == ' ')
@ -2351,7 +2351,7 @@ scan_libraries (prog_name)
int ch, ch2;
char *name, *end, *p = buf;
/* Extract names of libraries and add to list. */
/* Extract names of libraries and add to list. */
PARSE_LDD_OUTPUT (p);
if (p == 0)
continue;
@ -2360,7 +2360,7 @@ scan_libraries (prog_name)
if (strncmp (name, "not found", sizeof ("not found") - 1) == 0)
fatal ("dynamic dependency %s not found", buf);
/* Find the end of the symbol name. */
/* Find the end of the symbol name. */
for (end = p;
(ch2 = *end) != '\0' && ch2 != '\n' && !isspace (ch2) && ch2 != '|';
end++)
@ -2474,7 +2474,7 @@ scan_prog_file (prog_name, which_pass)
#ifdef XCOFF_DEBUGGING_INFO
/* All AIX function names have a duplicate entry beginning
with a dot. */
with a dot. */
if (*name == '.')
++name;
#endif
@ -2640,7 +2640,7 @@ scan_libraries (prog_name)
fatal ("%s: can't read loader section", soname);
/*fprintf (stderr, "\tscanning %s\n", soname);*/
symcnt = soldh.l_nsyms;
lsyms = (LDSYM*) alloca (symcnt * sizeof (*lsyms));
lsyms = (LDSYM *) alloca (symcnt * sizeof (*lsyms));
symcnt = FREAD (lsyms, sizeof (*lsyms), symcnt, libptr);
ldstrings = alloca (soldh.l_stlen);
FSEEK (libptr, soldsh.s_scnptr+soldh.l_stoff, BEGINNING);
@ -2737,7 +2737,7 @@ extern int encode_mach_o_hdr ();
static void add_func_table PROTO((mo_header_t *, load_all_t *,
symbol_info_t *, int));
static void print_header PROTO((mo_header_t *));
static void print_load_command PROTO((load_union_t*, size_t, int));
static void print_load_command PROTO((load_union_t *, size_t, int));
static void bad_header PROTO((int));
static struct file_info *read_file PROTO((char *, int, int));
static void end_file PROTO((struct file_info *));
@ -2880,10 +2880,10 @@ scan_prog_file (prog_name, which_pass)
continue;
str_sect = load_array[load_hdr->sym.symc_strings_section].section;
if (str_sect == (char *)0)
if (str_sect == (char *) 0)
fatal ("string section missing");
if (load_cmd->section == (char *)0)
if (load_cmd->section == (char *) 0)
fatal ("section pointer missing");
num_syms = load_hdr->sym.symc_nentries;
@ -2952,7 +2952,7 @@ scan_prog_file (prog_name, which_pass)
do anything, since in the current version, you cannot do mallocs
and such in the constructors. */
if (main_sym != (symbol_info_t *)0
if (main_sym != (symbol_info_t *) 0
&& ((hdr.moh_flags & MOH_EXECABLE_F) == 0))
add_func_table (&hdr, load_array, main_sym, FNTC_INITIALIZATION);
@ -3007,7 +3007,7 @@ scan_prog_file (prog_name, which_pass)
if (debug)
print_load_command (load_hdr, offset, i);
bcopy ((char *)load_hdr, (char *)(obj + offset), size);
bcopy ((char *) load_hdr, (char *) (obj + offset), size);
offset += size;
}
}
@ -3046,7 +3046,7 @@ add_func_table (hdr_p, load_array, sym, type)
load_cmd = &load_array[load_index];
load_cmd->load = ptr;
load_cmd->section = (char *)0;
load_cmd->section = (char *) 0;
/* Fill in func table load command. */
ptr->func.ldc_header.ldci_cmd_type = LDC_FUNC_TABLE;
@ -3155,7 +3155,7 @@ print_load_command (load_hdr, offset, number)
int number;
{
mo_long_t type = load_hdr->hdr.ldci_cmd_type;
char *type_str = (char *)0;
char *type_str = (char *) 0;
switch (type)
{
@ -3180,7 +3180,7 @@ print_load_command (load_hdr, offset, number)
(long) load_hdr->hdr.ldci_section_off,
(long) load_hdr->hdr.ldci_section_len);
if (type_str == (char *)0)
if (type_str == (char *) 0)
fprintf (stderr, ", ty: unknown (%ld)\n", (long) type);
else if (type != LDC_REGION)
@ -3219,7 +3219,7 @@ static void
bad_header (status)
int status;
{
char *msg = (char *)0;
char *msg = (char *) 0;
switch (status)
{
@ -3231,7 +3231,7 @@ bad_header (status)
case MO_ERROR_UNSUPPORTED_VERS: msg = "unsupported version"; break;
}
if (msg == (char *)0)
if (msg == (char *) 0)
fatal ("unknown {de,en}code_mach_o_hdr return value %d", status);
else
fatal ("%s", msg);
@ -3269,14 +3269,14 @@ read_file (name, fd, rw)
page_size = sysconf (_SC_PAGE_SIZE);
p->rounded_size = ((p->size + page_size - 1) / page_size) * page_size;
p->start = mmap ((caddr_t)0,
p->start = mmap ((caddr_t) 0,
(rw) ? p->rounded_size : p->size,
(rw) ? (PROT_READ | PROT_WRITE) : PROT_READ,
MAP_FILE | MAP_VARIABLE | MAP_SHARED,
fd,
0L);
if (p->start != (char *)0 && p->start != (char *)-1)
if (p->start != (char *) 0 && p->start != (char *) -1)
p->use_mmap = 1;
else

View file

@ -245,7 +245,7 @@ static int this_basic_block;
reg_last_set_invalid[i] is set non-zero when register I is being assigned
to and reg_last_set_table_tick[i] == label_tick. */
/* Record last value assigned to (hard or pseudo) register n. */
/* Record last value assigned to (hard or pseudo) register n. */
static rtx *reg_last_set_value;
@ -255,7 +255,7 @@ static rtx *reg_last_set_value;
static int *reg_last_set_label;
/* Record the value of label_tick when an expression involving register n
is placed in reg_last_set_value. */
is placed in reg_last_set_value. */
static int *reg_last_set_table_tick;
@ -264,7 +264,7 @@ static int *reg_last_set_table_tick;
static char *reg_last_set_invalid;
/* Incremented for each label. */
/* Incremented for each label. */
static int label_tick;
@ -1614,7 +1614,7 @@ try_combine (i3, i2, i1)
{
/* Before we can do this substitution, we must redo the test done
above (see detailed comments there) that ensures that I1DEST
isn't mentioned in any SETs in NEWPAT that are field assignments. */
isn't mentioned in any SETs in NEWPAT that are field assignments. */
if (! combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX,
0, NULL_PTR))
@ -2777,14 +2777,14 @@ find_split_point (loc, insn)
split = find_split_point (&XEXP (x, 2), insn);
if (split)
return split;
/* ... fall through ... */
/* ... fall through ... */
case '2':
case 'c':
case '<':
split = find_split_point (&XEXP (x, 1), insn);
if (split)
return split;
/* ... fall through ... */
/* ... fall through ... */
case '1':
/* Some machines have (and (shift ...) ...) insns. If X is not
an AND, but XEXP (X, 0) is, use it as our split point. */
@ -2885,7 +2885,8 @@ subst (x, from, to, in_dest, unique_copy)
|| GET_CODE (SET_DEST (x)) == PC))
fmt = "ie";
/* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a constant. */
/* Get the mode of operand 0 in case X is now a SIGN_EXTEND of a
constant. */
if (fmt[0] == 'e')
op0_mode = GET_MODE (XEXP (x, 0));
@ -3462,13 +3463,13 @@ simplify_rtx (x, op0_mode, last, in_dest)
/* (neg (minus X Y)) can become (minus Y X). */
if (GET_CODE (XEXP (x, 0)) == MINUS
&& (! FLOAT_MODE_P (mode)
/* x-y != -(y-x) with IEEE floating point. */
/* x-y != -(y-x) with IEEE floating point. */
|| TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
|| flag_fast_math))
return gen_binary (MINUS, mode, XEXP (XEXP (x, 0), 1),
XEXP (XEXP (x, 0), 0));
/* (neg (xor A 1)) is (plus A -1) if A is known to be either 0 or 1. */
/* (neg (xor A 1)) is (plus A -1) if A is known to be either 0 or 1. */
if (GET_CODE (XEXP (x, 0)) == XOR && XEXP (XEXP (x, 0), 1) == const1_rtx
&& nonzero_bits (XEXP (XEXP (x, 0), 0), mode) == 1)
return gen_binary (PLUS, mode, XEXP (XEXP (x, 0), 0), constm1_rtx);
@ -3883,7 +3884,7 @@ simplify_rtx (x, op0_mode, last, in_dest)
case SIGN_EXTRACT:
case ZERO_EXTEND:
case SIGN_EXTEND:
/* If we are processing SET_DEST, we are done. */
/* If we are processing SET_DEST, we are done. */
if (in_dest)
return x;
@ -3973,11 +3974,11 @@ simplify_if_then_else (x)
rtx temp;
int i;
/* Simplify storing of the truth value. */
/* Simplify storing of the truth value. */
if (comparison_p && true == const_true_rtx && false == const0_rtx)
return gen_binary (true_code, mode, XEXP (cond, 0), XEXP (cond, 1));
/* Also when the truth value has to be reversed. */
/* Also when the truth value has to be reversed. */
if (comparison_p && reversible_comparison_p (cond)
&& true == const0_rtx && false == const_true_rtx)
return gen_binary (reverse_condition (true_code),
@ -4064,7 +4065,7 @@ simplify_if_then_else (x)
temp = true, true = false, false = temp, cond = XEXP (x, 0);
/* It is possible that the conditional has been simplified out. */
/* It is possible that the conditional has been simplified out. */
true_code = GET_CODE (cond);
comparison_p = GET_RTX_CLASS (true_code) == '<';
}
@ -4152,7 +4153,7 @@ simplify_if_then_else (x)
c1 = XEXP (t, 1), op = GET_CODE (t), z = f;
/* If an identity-zero op is commutative, check whether there
would be a match if we swapped the operands. */
would be a match if we swapped the operands. */
else if ((GET_CODE (t) == PLUS || GET_CODE (t) == IOR
|| GET_CODE (t) == XOR)
&& rtx_equal_p (XEXP (t, 1), f))
@ -4466,7 +4467,7 @@ simplify_set (x)
#ifdef LOAD_EXTEND_OP
/* If we have (set FOO (subreg:M (mem:N BAR) 0)) with M wider than N, this
would require a paradoxical subreg. Replace the subreg with a
zero_extend to avoid the reload that would otherwise be required. */
zero_extend to avoid the reload that would otherwise be required. */
if (GET_CODE (src) == SUBREG && subreg_lowpart_p (src)
&& LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (src))) != NIL
@ -4594,7 +4595,7 @@ simplify_logical (x, last)
/* If we have (ior (and (X C1) C2)) and the next restart would be
the last, simplify this by making C1 as small as possible
and then exit. */
and then exit. */
if (last
&& GET_CODE (x) == IOR && GET_CODE (op0) == AND
&& GET_CODE (XEXP (op0, 1)) == CONST_INT
@ -4966,7 +4967,7 @@ expand_field_assignment (x)
rtx x;
{
rtx inner;
rtx pos; /* Always counts from low bit. */
rtx pos; /* Always counts from low bit. */
int len;
rtx mask;
enum machine_mode compute_mode;
@ -5341,7 +5342,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
If it is mixed, we must adjust. */
/* If bytes are big endian and we had a paradoxical SUBREG, we must
adjust OFFSET to compensate. */
adjust OFFSET to compensate. */
if (BYTES_BIG_ENDIAN
&& ! spans_byte
&& GET_MODE_SIZE (inner_mode) < GET_MODE_SIZE (is_mode))
@ -5400,7 +5401,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
/* Make POS_RTX unless we already have it and it is correct. If we don't
have a POS_RTX but we do have an ORIG_POS_RTX, the latter must
be a CONST_INT. */
be a CONST_INT. */
if (pos_rtx == 0 && orig_pos_rtx != 0 && INTVAL (orig_pos_rtx) == pos)
pos_rtx = orig_pos_rtx;
@ -5640,7 +5641,7 @@ make_compound_operation (x, in_code)
break;
}
/* ... fall through ... */
/* ... fall through ... */
case ASHIFTRT:
lhs = XEXP (x, 0);
@ -5847,7 +5848,7 @@ force_to_mode (x, mode, mask, reg, just_select)
{
case CLOBBER:
/* If X is a (clobber (const_int)), return it since we know we are
generating something that won't match. */
generating something that won't match. */
return x;
case USE:
@ -5961,7 +5962,7 @@ force_to_mode (x, mode, mask, reg, just_select)
mode, mask, reg, next_select);
}
/* ... fall through ... */
/* ... fall through ... */
case MINUS:
case MULT:
@ -6125,7 +6126,7 @@ force_to_mode (x, mode, mask, reg, just_select)
if (GET_MODE_BITSIZE (GET_MODE (x)) > HOST_BITS_PER_WIDE_INT)
{
nonzero = ~(HOST_WIDE_INT)0;
nonzero = ~ (HOST_WIDE_INT) 0;
/* GET_MODE_BITSIZE (GET_MODE (x)) - INTVAL (XEXP (x, 1))
is the number of bits a full-width mask would have set.
@ -6717,7 +6718,8 @@ apply_distributive_law (x)
lhs = XEXP (x, 0), rhs = XEXP (x, 1);
/* If either operand is a primitive we can't do anything, so get out fast. */
/* If either operand is a primitive we can't do anything, so get out
fast. */
if (GET_RTX_CLASS (GET_CODE (lhs)) == 'o'
|| GET_RTX_CLASS (GET_CODE (rhs)) == 'o')
return x;
@ -6902,7 +6904,7 @@ simplify_and_const_int (x, mode, varop, constop)
else
varop = gen_lowpart_for_combine (mode, varop);
/* If we can't make the SUBREG, try to return what we were given. */
/* If we can't make the SUBREG, try to return what we were given. */
if (GET_CODE (varop) == CLOBBER)
return x ? x : varop;
@ -7339,7 +7341,7 @@ num_sign_bit_copies (x, mode)
bitwidth = GET_MODE_BITSIZE (mode);
/* For a smaller object, just ignore the high bits. */
/* For a smaller object, just ignore the high bits. */
if (bitwidth < GET_MODE_BITSIZE (GET_MODE (x)))
return MAX (1, (num_sign_bit_copies (x, GET_MODE (x))
- (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)));
@ -7406,7 +7408,7 @@ num_sign_bit_copies (x, mode)
return MAX (bitwidth - GET_MODE_BITSIZE (GET_MODE (x)) + 1,
num_sign_bit_copies (SUBREG_REG (x), mode));
/* For a smaller object, just ignore the high bits. */
/* For a smaller object, just ignore the high bits. */
if (bitwidth <= GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))))
{
num0 = num_sign_bit_copies (SUBREG_REG (x), VOIDmode);
@ -7445,7 +7447,7 @@ num_sign_bit_copies (x, mode)
+ num_sign_bit_copies (XEXP (x, 0), VOIDmode));
case TRUNCATE:
/* For a smaller object, just ignore the high bits. */
/* For a smaller object, just ignore the high bits. */
num0 = num_sign_bit_copies (XEXP (x, 0), VOIDmode);
return MAX (1, (num0 - (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))
- bitwidth)));
@ -7836,7 +7838,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
/* We need to determine what mode we will do the shift in. If the
shift is a right shift or a ROTATE, we must always do it in the mode
it was originally done in. Otherwise, we can do it in MODE, the
widest mode encountered. */
widest mode encountered. */
shift_mode
= (code == ASHIFTRT || code == LSHIFTRT || code == ROTATE
? result_mode : mode);
@ -7869,7 +7871,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
/* Negative counts are invalid and should not have been made (a
programmer-specified negative count should have been handled
above). */
above). */
else if (count < 0)
abort ();
@ -8022,7 +8024,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
continue;
}
/* ... fall through ... */
/* ... fall through ... */
case LSHIFTRT:
case ASHIFT:
@ -8413,7 +8415,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
else if (GET_MODE (varop) != shift_mode)
varop = gen_lowpart_for_combine (shift_mode, varop);
/* If we can't make the SUBREG, try to return what we were given. */
/* If we can't make the SUBREG, try to return what we were given. */
if (GET_CODE (varop) == CLOBBER)
return x ? x : varop;
@ -8799,7 +8801,7 @@ gen_binary (code, mode, op0, op1)
enum machine_mode op_mode = GET_MODE (op0);
/* Strip the COMPARE from (REL_OP (compare X Y) 0) to get
just (REL_OP X Y). */
just (REL_OP X Y). */
if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
{
op1 = XEXP (op0, 1);
@ -8970,7 +8972,7 @@ simplify_comparison (code, pop0, pop1)
op1 = SUBREG_REG (inner_op1);
/* The resulting comparison is always unsigned since we masked
off the original sign bit. */
off the original sign bit. */
code = unsigned_condition (code);
changed = 1;
@ -9110,7 +9112,7 @@ simplify_comparison (code, pop0, pop1)
break;
case GE:
/* >= C is equivalent to > (C - 1). */
/* >= C is equivalent to > (C - 1). */
if (const_op > 0)
{
const_op -= 1;
@ -9146,7 +9148,7 @@ simplify_comparison (code, pop0, pop1)
const_op -= 1;
op1 = GEN_INT (const_op);
code = LEU;
/* ... fall through ... */
/* ... fall through ... */
}
/* (unsigned) < 0x80000000 is equivalent to >= 0. */
@ -9164,7 +9166,7 @@ simplify_comparison (code, pop0, pop1)
if (const_op == 0)
code = EQ;
/* (unsigned) <= 0x7fffffff is equivalent to >= 0. */
/* (unsigned) <= 0x7fffffff is equivalent to >= 0. */
else if (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)
{
const_op = 0, op1 = const0_rtx;
@ -9179,7 +9181,7 @@ simplify_comparison (code, pop0, pop1)
const_op -= 1;
op1 = GEN_INT (const_op);
code = GTU;
/* ... fall through ... */
/* ... fall through ... */
}
/* (unsigned) >= 0x80000000 is equivalent to < 0. */
@ -9256,7 +9258,7 @@ simplify_comparison (code, pop0, pop1)
continue;
}
/* ... fall through ... */
/* ... fall through ... */
case SIGN_EXTRACT:
tem = expand_compound_operation (op0);
@ -9316,7 +9318,7 @@ simplify_comparison (code, pop0, pop1)
}
/* If we have NEG of something whose two high-order bits are the
same, we know that "(-a) < 0" is equivalent to "a > 0". */
same, we know that "(-a) < 0" is equivalent to "a > 0". */
if (num_sign_bit_copies (op0, mode) >= 2)
{
op0 = XEXP (op0, 0);
@ -9352,7 +9354,7 @@ simplify_comparison (code, pop0, pop1)
continue;
}
/* ... fall through ... */
/* ... fall through ... */
case ABS:
/* ABS is ignorable inside an equality comparison with zero. */
@ -9419,7 +9421,7 @@ simplify_comparison (code, pop0, pop1)
else
break;
/* ... fall through ... */
/* ... fall through ... */
case ZERO_EXTEND:
if ((unsigned_comparison_p || equality_comparison_p)
@ -9702,7 +9704,7 @@ simplify_comparison (code, pop0, pop1)
continue;
}
/* ... fall through ... */
/* ... fall through ... */
case LSHIFTRT:
/* If we have (compare (xshiftrt FOO N) (const_int C)) and
the low order N bits of FOO are known to be zero, we can do this
@ -10152,7 +10154,7 @@ get_last_value (x)
/* If this is a non-paradoxical SUBREG, get the value of its operand and
then convert it to the desired mode. If this is a paradoxical SUBREG,
we cannot predict what values the "extra" bits might have. */
we cannot predict what values the "extra" bits might have. */
if (GET_CODE (x) == SUBREG
&& subreg_lowpart_p (x)
&& (GET_MODE_SIZE (GET_MODE (x))
@ -10166,7 +10168,8 @@ get_last_value (x)
regno = REGNO (x);
value = reg_last_set_value[regno];
/* If we don't have a value or if it isn't for this basic block, return 0. */
/* If we don't have a value or if it isn't for this basic block,
return 0. */
if (value == 0
|| (reg_n_sets[regno] != 1

View file

@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */
/* These routines are somewhat language-independent utility function
intended to be called by the language-specific convert () functions. */
intended to be called by the language-specific convert () functions. */
#include "config.h"
#include "tree.h"
@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
/* Convert EXPR to some pointer or reference type TYPE.
EXPR must be pointer, reference, integer, enumeral, or literal zero;
in other cases error is called. */
in other cases error is called. */
tree
convert_to_pointer (type, expr)
@ -74,7 +74,7 @@ convert_to_pointer (type, expr)
/* Convert EXPR to some floating-point type TYPE.
EXPR must be float, integer, or enumeral;
in other cases error is called. */
in other cases error is called. */
tree
convert_to_real (type, expr)

View file

@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
This file imports xmalloc and xrealloc, which are like malloc and
realloc except that they generate a fatal error if there is no
available memory. */
available memory. */
#include <ctype.h>
#include <string.h>
@ -67,7 +67,7 @@ mystrstr (s1, s2)
We could avoid this if we could just get g++ to tell us what the actual
cplus marker character is as part of the debug information, perhaps by
ensuring that it is the character that terminates the gcc<n>_compiled
marker symbol (FIXME). */
marker symbol (FIXME). */
#if !defined (CPLUS_MARKER)
#define CPLUS_MARKER '$'
@ -85,7 +85,7 @@ set_cplus_marker_for_demangling (ch)
}
/* Stuff that is shared between sub-routines.
* Using a shared structure allows cplus_demangle to be reentrant. */
Using a shared structure allows cplus_demangle to be reentrant. */
struct work_stuff
{
@ -190,7 +190,7 @@ static const struct optable
typedef struct string /* Beware: these aren't required to be */
{ /* '\0' terminated. */
{ /* '\0' terminated. */
char *b; /* pointer to start of string */
char *p; /* pointer after last character */
char *e; /* pointer after end of allocated space */
@ -304,7 +304,7 @@ string_prepends PARAMS ((string *, string *));
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
Trying to consume something that isn't a count results in
no consumption of input and a return of 0. */
no consumption of input and a return of 0. */
static int
consume_count (type)
@ -374,7 +374,7 @@ cplus_demangle_opname (opname, result, options)
{
if (opname[2] == 'a' && opname[5] == '\0')
{
/* Assignment. */
/* Assignment. */
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
if (strlen (optable[i].in) == 3
@ -469,8 +469,8 @@ cplus_mangle_opname (opname, options)
return (0);
}
/* check to see whether MANGLED can match TEXT in the first TEXT_LEN
characters. */
/* Check to see whether MANGLED can match TEXT in the first TEXT_LEN
characters. */
int cplus_match (mangled, text, text_len)
const char *mangled;
@ -536,7 +536,7 @@ cplus_demangle (mangled, options)
recognize one of the gnu special forms rather than looking for a
standard prefix. In particular, don't worry about whether there
is a "__" string in the mangled string. Consider "_$_5__foo" for
example. */
example. */
if ((AUTO_DEMANGLING || GNU_DEMANGLING))
{
@ -573,7 +573,7 @@ mop_up (work, declp, success)
{
char *demangled = NULL;
/* Discard the remembered types, if any. */
/* Discard the remembered types, if any. */
forget_types (work);
if (work -> typevec != NULL)
@ -582,7 +582,7 @@ mop_up (work, declp, success)
}
/* If demangling was successful, ensure that the demangled string is null
terminated and return it. Otherwise, free the demangling decl. */
terminated and return it. Otherwise, free the demangling decl. */
if (!success)
{
@ -624,8 +624,7 @@ DESCRIPTION
Demangling GNU style mangled names is nasty because there is no
explicit token that marks the start of the outermost function
argument list.
*/
argument list. */
static int
demangle_signature (work, mangled, declp)
@ -701,7 +700,7 @@ demangle_signature (work, mangled, declp)
/* ARM style demangling includes a specific 'F' character after
the class name. For GNU style, it is just implied. So we can
safely just consume any 'F' at this point and be compatible
with either style. */
with either style. */
oldmangled = NULL;
func_done = 1;
@ -756,7 +755,7 @@ demangle_signature (work, mangled, declp)
so if we run into another '_' at this point we are dealing with
a mangled name that is either bogus, or has been mangled by
some algorithm we don't know how to deal with. So just
reject the entire demangling. */
reject the entire demangling. */
success = 0;
break;
@ -764,7 +763,7 @@ demangle_signature (work, mangled, declp)
if (AUTO_DEMANGLING || GNU_DEMANGLING)
{
/* Assume we have stumbled onto the first outermost function
argument token, and start processing args. */
argument token, and start processing args. */
func_done = 1;
success = demangle_args (work, mangled, declp);
}
@ -773,7 +772,7 @@ demangle_signature (work, mangled, declp)
/* Non-GNU demanglers use a specific token to mark the start
of the outermost function argument tokens. Typically 'F',
for ARM-demangling, for example. So if we find something
we are not prepared for, it must be an error. */
we are not prepared for, it must be an error. */
success = 0;
}
break;
@ -798,7 +797,7 @@ demangle_signature (work, mangled, declp)
first case, and need to ensure that the '(void)' gets added to
the current declp. Note that with ARM, the first case
represents the name of a static data member 'foo::bar',
which is in the current declp, so we leave it alone. */
which is in the current declp, so we leave it alone. */
success = demangle_args (work, mangled, declp);
}
}
@ -1343,7 +1342,7 @@ demangle_prefix (work, mangled, declp)
if (scan != NULL)
{
/* We found a sequence of two or more '_', ensure that we start at
the last pair in the sequence. */
the last pair in the sequence. */
i = strspn (scan, "_");
if (i > 2)
{
@ -1412,7 +1411,7 @@ demangle_prefix (work, mangled, declp)
}
else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't')
{
/* Cfront-style parameterized type. Handled later as a signature. */
/* Cfront-style parameterized type. Handled later as a signature. */
success = 1;
/* ARM template? */
@ -1422,7 +1421,7 @@ demangle_prefix (work, mangled, declp)
{
/* Mangled name does not start with "__" but does have one somewhere
in there with non empty stuff after it. Looks like a global
function name. */
function name. */
demangle_function_name (work, mangled, declp, scan);
}
else
@ -1498,7 +1497,7 @@ gnu_special (work, mangled, declp)
/* Found a GNU style virtual table, get past "_vt<CPLUS_MARKER>"
and create the decl. Note that we consume the entire mangled
input string, which means that demangle_signature has no work
to do. */
to do. */
if ((*mangled)[2] == 'v')
(*mangled) += 5; /* New style, with thunks: "__vt_" */
else
@ -1566,7 +1565,7 @@ gnu_special (work, mangled, declp)
if (success && (p == *mangled))
{
/* Consumed everything up to the cplus_marker, append the
variable name. */
variable name. */
(*mangled)++;
string_append (declp, "::");
n = strlen (*mangled);
@ -1642,7 +1641,7 @@ arm_special (work, mangled, declp)
/* Found a ARM style virtual table, get past ARM_VTABLE_STRING
and create the decl. Note that we consume the entire mangled
input string, which means that demangle_signature has no work
to do. */
to do. */
scan = *mangled + ARM_VTABLE_STRLEN;
while (*scan != '\0') /* first check it can be demangled */
{
@ -1780,7 +1779,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
return success;
/* Pick off the names and collect them in the temp buffer in the order
in which they are found, separated by '::'. */
in which they are found, separated by '::'. */
while (qualifiers-- > 0)
{
@ -1812,7 +1811,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
/* If we are using the result as a function name, we need to append
the appropriate '::' separated constructor or destructor name.
We do this here because this is the most convenient place, where
we already have a pointer to the name and the length of the name. */
we already have a pointer to the name and the length of the name. */
if (isfuncname && (work->constructor & 1 || work->destructor & 1))
{
@ -1825,7 +1824,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
}
/* Now either prepend the temp buffer to the result, or append it,
depending upon the state of the append flag. */
depending upon the state of the append flag. */
if (append)
{
@ -1983,7 +1982,7 @@ do_type (work, mangled, result)
}
/* After picking off the function args, we expect to either find the
function return type (preceded by an '_') or the end of the
string. */
string. */
if (!demangle_args (work, mangled, &decl)
|| (**mangled != '_' && **mangled != '\0'))
{
@ -2092,7 +2091,7 @@ do_type (work, mangled, result)
switch (**mangled)
{
/* A qualified name, such as "Outer::Inner". */
/* A qualified name, such as "Outer::Inner". */
case 'Q':
success = demangle_qualified (work, mangled, result, 0, 1);
break;
@ -2140,7 +2139,7 @@ demangle_fund_type (work, mangled, result)
int done = 0;
int success = 1;
/* First pick off any type qualifiers. There can be more than one. */
/* First pick off any type qualifiers. There can be more than one. */
while (!done)
{
@ -2178,7 +2177,7 @@ demangle_fund_type (work, mangled, result)
}
}
/* Now pick off the fundamental type. There can be only one. */
/* Now pick off the fundamental type. There can be only one. */
switch (**mangled)
{
@ -2327,7 +2326,7 @@ remember_type (work, start, len)
work -> typevec[work -> ntypes++] = tem;
}
/* Forget the remembered types, but not the type vector itself. */
/* Forget the remembered types, but not the type vector itself. */
static void
forget_types (work)
@ -2452,7 +2451,7 @@ demangle_args (work, mangled, declp)
t--;
}
/* Validate the type index. Protect against illegal indices from
malformed type strings. */
malformed type strings. */
if ((t < 0) || (t >= work -> ntypes))
{
return (0);
@ -2533,7 +2532,7 @@ demangle_function_name (work, mangled, declp, scan)
/* Consume the function name, including the "__" separating the name
from the signature. We are guaranteed that SCAN points to the
separator. */
separator. */
(*mangled) = scan + 2;
@ -2543,7 +2542,7 @@ demangle_function_name (work, mangled, declp, scan)
/* See if we have an ARM style constructor or destructor operator.
If so, then just record it, clear the decl, and return.
We can't build the actual constructor/destructor decl until later,
when we recover the class name from the signature. */
when we recover the class name from the signature. */
if (strcmp (declp -> b, "__ct") == 0)
{
@ -2648,7 +2647,7 @@ demangle_function_name (work, mangled, declp, scan)
{
if (declp->b[2] == 'a' && declp->b[5] == '\0')
{
/* Assignment. */
/* Assignment. */
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
if (strlen (optable[i].in) == 3
@ -2817,7 +2816,7 @@ string_prependn (p, s, n)
/* To generate a standalone demangler program for testing purposes,
just compile and link this file with -DMAIN and libiberty.a. When
run, it demangles each command line arg, or each stdin string, and
prints the result on stdout. */
prints the result on stdout. */
#ifdef MAIN
@ -2860,7 +2859,7 @@ Usage: %s [-_] [-n] [-s {gnu,lucid,arm}] [--strip-underscores]\n\
#define MBUF_SIZE 512
char mbuffer[MBUF_SIZE];
/* Defined in the automatically-generated underscore.c. */
/* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore;
int strip_underscore = 0;
@ -2940,7 +2939,7 @@ main (argc, argv)
{
int i = 0;
c = getchar ();
/* Try to read a label. */
/* Try to read a label. */
while (c != EOF && (isalnum(c) || c == '_' || c == '$' || c == '.'))
{
if (i >= MBUF_SIZE-1)

View file

@ -89,7 +89,9 @@ cpp_file_line_for_message (pfile, filename, line, column)
}
/* IS_ERROR is 2 for "fatal" error, 1 for error, 0 for warning */
void cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
void
cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
int is_error;
cpp_reader *pfile;
char *msg;

View file

@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding!
Written by Per Bothner 1994. */
Written by Per Bothner 1994. */
/* Parse a C expression from text in a string */
@ -60,7 +60,7 @@ struct arglist {
#endif
#ifndef NULL_PTR
#define NULL_PTR ((GENERIC_PTR)0)
#define NULL_PTR ((GENERIC_PTR) 0)
#endif
extern char *xmalloc ();
@ -122,7 +122,7 @@ static long right_shift ();
#define RIGHT_OPERAND_REQUIRED 2
#define HAVE_VALUE 4
/* SKIP_OPERAND is set for '&&' '||' '?' and ':' when the
following operand should be short-circuited instead of evaluated. */
following operand should be short-circuited instead of evaluated. */
#define SKIP_OPERAND 8
/*#define UNSIGNEDP 16*/
@ -140,10 +140,10 @@ static long right_shift ();
struct operation {
short op;
char rprio; /* Priority of op (relative to it right operand). */
char rprio; /* Priority of op (relative to it right operand). */
char flags;
char unsignedp; /* true if value should be treated as unsigned */
HOST_WIDE_INT value; /* The value logically "right" of op. */
HOST_WIDE_INT value; /* The value logically "right" of op. */
};
/* Take care of parsing a number (anything that starts with a digit).
@ -186,7 +186,7 @@ parse_number (pfile, start, olen)
else if (*p == '0')
base = 8;
/* Some buggy compilers (e.g. MPW C) seem to need both casts. */
/* Some buggy compilers (e.g. MPW C) seem to need both casts. */
ULONG_MAX_over_base = ((unsigned long) -1) / ((unsigned long) base);
for (; len > 0; len--) {
@ -275,7 +275,7 @@ static struct token tokentab2[] = {
{NULL, ERROR}
};
/* Read one token. */
/* Read one token. */
struct operation
cpp_lex (pfile)
@ -310,7 +310,7 @@ cpp_lex (pfile)
pfile->limit = tok_start;
switch (token)
{
case CPP_EOF: /* Should not happen ... */
case CPP_EOF: /* Should not happen ... */
case CPP_VSPACE:
op.op = 0;
return op;
@ -630,7 +630,7 @@ right_shift (pfile, a, unsignedp, b)
return a >> b;
}
/* These priorities are all even, so we can handle associatively. */
/* These priorities are all even, so we can handle associatively. */
#define PAREN_INNER_PRIO 0
#define COMMA_PRIO 4
#define COND_PRIO (COMMA_PRIO+2)
@ -688,7 +688,7 @@ cpp_parse_expr (pfile)
/* See if the token is an operand, in which case go to set_value.
If the token is an operator, figure out its left and right
priorities, and then goto maybe_reduce. */
priorities, and then goto maybe_reduce. */
switch (op.op)
{
@ -745,7 +745,7 @@ cpp_parse_expr (pfile)
}
set_value:
/* Push a value onto the stack. */
/* Push a value onto the stack. */
if (top->flags & HAVE_VALUE)
{
cpp_error (pfile, "syntax error in #if");
@ -755,7 +755,7 @@ cpp_parse_expr (pfile)
continue;
maybe_reduce:
/* Push an operator, and check if we can reduce now. */
/* Push an operator, and check if we can reduce now. */
while (top->rprio > lprio)
{
long v1 = top[-1].value, v2 = top[0].value;
@ -985,22 +985,22 @@ cpp_parse_expr (pfile)
}
top++;
/* Check for and handle stack overflow. */
/* Check for and handle stack overflow. */
if (top == limit)
{
struct operation *new_stack;
int old_size = (char*)limit - (char*)stack;
int old_size = (char *) limit - (char *) stack;
int new_size = 2 * old_size;
if (stack != init_stack)
new_stack = (struct operation*) xrealloc (stack, new_size);
new_stack = (struct operation *) xrealloc (stack, new_size);
else
{
new_stack = (struct operation*) xmalloc (new_size);
new_stack = (struct operation *) xmalloc (new_size);
bcopy ((char *) stack, (char *) new_stack, old_size);
}
stack = new_stack;
top = (struct operation*)((char*) new_stack + old_size);
limit = (struct operation*)((char*) new_stack + new_size);
top = (struct operation *) ((char *) new_stack + old_size);
limit = (struct operation *) ((char *) new_stack + new_size);
}
top->flags = flags;

View file

@ -28,10 +28,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern char *xmalloc PARAMS ((unsigned));
/*
* return hash function on name. must be compatible with the one
* computed a step at a time, elsewhere
*/
/* Return hash function on name. must be compatible with the one
computed a step at a time, elsewhere */
int
hashf (name, len, hashsize)
register const U_CHAR *name;
@ -46,16 +45,15 @@ hashf (name, len, hashsize)
return MAKE_POS (r) % hashsize;
}
/*
* find the most recent hash node for name name (ending with first
* non-identifier char) installed by install
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
/* Find the most recent hash node for name name (ending with first
non-identifier char) installed by install
If LEN is >= 0, it is the length of the name.
Otherwise, compute the length by scanning the entire name.
If HASH is >= 0, it is the precomputed hash code.
Otherwise, compute the hash code. */
HASHNODE *
cpp_lookup (pfile, name, len, hash)
cpp_reader *pfile;
@ -81,7 +79,7 @@ cpp_lookup (pfile, name, len, hash)
return bucket;
bucket = bucket->next;
}
return (HASHNODE*) 0;
return (HASHNODE *) 0;
}
/*
@ -109,7 +107,7 @@ delete_macro (hp)
hp->next->prev = hp->prev;
/* make sure that the bucket chain header that
the deleted guy was on points to the right thing afterwards. */
the deleted guy was on points to the right thing afterwards. */
if (hp == *hp->bucket_hdr)
*hp->bucket_hdr = hp->next;
@ -130,20 +128,20 @@ delete_macro (hp)
free (hp);
}
/*
* install a name in the main hash table, even if it is already there.
* name stops with first non alphanumeric, except leading '#'.
* caller must check against redefinition if that is desired.
* delete_macro () removes things installed by install () in fifo order.
* this is important because of the `defined' special symbol used
* in #if, and also if pushdef/popdef directives are ever implemented.
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
/* Install a name in the main hash table, even if it is already there.
name stops with first non alphanumeric, except leading '#'.
caller must check against redefinition if that is desired.
delete_macro () removes things installed by install () in fifo order.
this is important because of the `defined' special symbol used
in #if, and also if pushdef/popdef directives are ever implemented.
If LEN is >= 0, it is the length of the name.
Otherwise, compute the length by scanning the entire name.
If HASH is >= 0, it is the precomputed hash code.
Otherwise, compute the hash code. */
HASHNODE *
install (name, len, type, ivalue, value, hash)
U_CHAR *name;

View file

@ -35,4 +35,4 @@ static HASHNODE *hashtab[HASHSIZE];
#define HASHSTEP(old, c) ((old << 2) + c)
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
extern HASHNODE* install PARAMS ((U_CHAR*,int,enum node_type, int,char*,int));
extern HASHNODE *install PARAMS ((U_CHAR *,int,enum node_type, int,char *,int));

View file

@ -84,7 +84,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif /* USG */
#endif /* not VMS */
/* This defines "errno" properly for VMS, and gives us EACCES. */
/* This defines "errno" properly for VMS, and gives us EACCES. */
#include <errno.h>
extern char *index ();
@ -136,7 +136,7 @@ extern char *rindex ();
#endif
#ifndef NULL_PTR
#define NULL_PTR ((GENERIC_PTR)0)
#define NULL_PTR ((GENERIC_PTR) 0)
#endif
#ifndef INCLUDE_LEN_FUDGE
@ -204,7 +204,7 @@ struct assertion_hashnode {
struct assertion_hashnode *prev;
/* also, a back pointer to this node's hash
chain is kept, in case the node is the head
of the chain and gets deleted. */
of the chain and gets deleted. */
struct assertion_hashnode **bucket_hdr;
int length; /* length of token, for quick comparison */
U_CHAR *name; /* the actual name */
@ -233,7 +233,7 @@ struct assertion_hashnode {
#define NEWLINE_FIX \
do {while (PEEKC() == '\\' && PEEKN(1) == '\n') FORWARD(2); } while(0)
/* Same, but assume we've already read the potential '\\' into C. */
/* Same, but assume we've already read the potential '\\' into C. */
#define NEWLINE_FIX1(C) do { \
while ((C) == '\\' && PEEKC() == '\n') { FORWARD(1); (C) = GETC(); }\
} while(0)
@ -287,8 +287,8 @@ static struct arglist *read_token_list ();
static void free_token_list ();
static int safe_read ();
static void push_macro_expansion PARAMS ((cpp_reader *,
U_CHAR*, int, HASHNODE*));
static struct cpp_pending *nreverse_pending PARAMS ((struct cpp_pending*));
U_CHAR *, int, HASHNODE *));
static struct cpp_pending *nreverse_pending PARAMS ((struct cpp_pending *));
extern char *xrealloc ();
static char *xcalloc ();
static char *savestring ();
@ -301,7 +301,7 @@ enum file_change_code {same_file, enter_file, leave_file};
/* External declarations. */
extern HOST_WIDE_INT cpp_parse_expr PARAMS ((cpp_reader*));
extern HOST_WIDE_INT cpp_parse_expr PARAMS ((cpp_reader *));
extern char *getenv ();
extern FILE *fdopen ();
@ -347,12 +347,12 @@ struct file_name_list
};
/* If a buffer's dir field is SELF_DIR_DUMMY, it means the file was found
via the same directory as the file that #included it. */
#define SELF_DIR_DUMMY ((struct file_name_list*)(~0))
via the same directory as the file that #included it. */
#define SELF_DIR_DUMMY ((struct file_name_list *) (~0))
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
/* The */
static struct default_include {
char *fname; /* The name of the directory. */
@ -403,8 +403,8 @@ struct directive {
int length; /* Length of name */
int (*func)(); /* Function to handle directive */
char *name; /* Name of directive */
enum node_type type; /* Code which describes which directive. */
char command_reads_line; /* One if rest of line is read by func. */
enum node_type type; /* Code which describes which directive. */
char command_reads_line; /* One if rest of line is read by func. */
char traditional_comments; /* Nonzero: keep comments if -traditional. */
char pass_thru; /* Copy preprocessed directive to output file.*/
};
@ -437,9 +437,9 @@ static struct directive directive_table[] = {
{ -1, 0, "", T_UNUSED},
};
/* table to tell if char can be part of a C identifier. */
/* table to tell if char can be part of a C identifier. */
U_CHAR is_idchar[256];
/* table to tell if char can be first char of a c identifier. */
/* table to tell if char can be first char of a c identifier. */
U_CHAR is_idstart[256];
/* table to tell if c is horizontal space. */
U_CHAR is_hor_space[256];
@ -490,7 +490,8 @@ initialize_char_syntax (opts)
/* Place into PFILE a quoted string representing the string SRC.
Caller must reserve enough space in pfile->token_buffer. */
Caller must reserve enough space in pfile->token_buffer. */
static void
quote_string (pfile, src)
cpp_reader *pfile;
@ -525,7 +526,7 @@ quote_string (pfile, src)
}
}
/* Re-allocates PFILE->token_buffer so it will hold at least N more chars. */
/* Re-allocates PFILE->token_buffer so it will hold at least N more chars. */
void
cpp_grow_buffer (pfile, n)
@ -534,7 +535,7 @@ cpp_grow_buffer (pfile, n)
{
long old_written = CPP_WRITTEN (pfile);
pfile->token_buffer_size = n + 2 * pfile->token_buffer_size;
pfile->token_buffer = (U_CHAR*)
pfile->token_buffer = (U_CHAR *)
xrealloc(pfile->token_buffer, pfile->token_buffer_size);
CPP_SET_WRITTEN (pfile, old_written);
}
@ -827,7 +828,7 @@ macro_cleanup (pbuf, pfile)
cpp_buffer *pbuf;
cpp_reader *pfile;
{
HASHNODE *macro = (HASHNODE*)pbuf->data;
HASHNODE *macro = (HASHNODE *) pbuf->data;
if (macro->type == T_DISABLED)
macro->type = T_MACRO;
if (macro->type != T_MACRO || pbuf->buf != macro->value.defn->expansion)
@ -852,7 +853,7 @@ file_cleanup (pbuf, pfile)
If this is the start of a comment (followed by '*' or '/'),
skip to the end of the comment, and return ' '.
Return EOF if we reached the end of file before the end of the comment.
If not the start of a comment, return '/'. */
If not the start of a comment, return '/'. */
static int
skip_comment (pfile, linep)
@ -894,7 +895,7 @@ skip_comment (pfile, linep)
{
c = GETC ();
if (c == EOF)
return ' '; /* Allow // to be terminated by EOF. */
return ' '; /* Allow // to be terminated by EOF. */
while (c == '\\' && PEEKC() == '\n')
{
FORWARD(1);
@ -904,7 +905,7 @@ skip_comment (pfile, linep)
}
if (c == '\n')
{
/* Don't consider final '\n' to be part of comment. */
/* Don't consider final '\n' to be part of comment. */
FORWARD(-1);
return ' ';
}
@ -915,6 +916,7 @@ skip_comment (pfile, linep)
}
/* Skip whitespace \-newline and comments. Does not macro-expand. */
void
cpp_skip_hspace (pfile)
cpp_reader *pfile;
@ -951,7 +953,7 @@ cpp_skip_hspace (pfile)
}
/* Read the rest of the current line.
The line is appended to PFILE's output buffer. */
The line is appended to PFILE's output buffer. */
static void
copy_rest_of_line (pfile)
@ -1036,7 +1038,7 @@ handle_directive (pfile)
goto done_a_directive;
}
/* Now find the directive name. */
/* Now find the directive name. */
CPP_PUTC (pfile, '#');
parse_name (pfile, GETC());
ident = pfile->token_buffer + old_written + 1;
@ -1114,7 +1116,7 @@ handle_directive (pfile)
|| (kt->type == T_DEFINE
&& CPP_OPTIONS (pfile)->dump_macros == dump_definitions))
{
/* Just leave the entire #define in the output stack. */
/* Just leave the entire #define in the output stack. */
}
else if (kt->type == T_DEFINE
&& CPP_OPTIONS (pfile)->dump_macros == dump_names)
@ -1170,7 +1172,7 @@ pass_thru_directive (buf, limit, pfile, keyword)
appeared. So the arglist is just convenience data passed
between these two routines. It is not kept around after
the current #define has been processed and entered into the
hash table. */
hash table. */
struct arglist {
struct arglist *next;
@ -1212,7 +1214,7 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
/* Scan thru the replacement list, ignoring comments and quoted
strings, picking up on the macro calls. It does a linear search
thru the arg list on every potential symbol. Profiling might say
that something smarter should happen. */
that something smarter should happen. */
if (limit < buf)
abort ();
@ -1228,7 +1230,7 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
leading and trailing newline-marker and final null. */
maxsize = (sizeof (DEFINITION)
+ (limit - p) + 5);
/* Occurrences of '@' get doubled, so allocate extra space for them. */
/* Occurrences of '@' get doubled, so allocate extra space for them. */
while (p < limit)
if (*p++ == '@')
maxsize++;
@ -1241,7 +1243,7 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
p = buf;
/* Add one initial space escape-marker to prevent accidental
token-pasting (often removed by macroexpand). */
token-pasting (often removed by macroexpand). */
*exp_p++ = '@';
*exp_p++ = ' ';
@ -1278,7 +1280,7 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
case '@':
/* An '@' in a string or character constant stands for itself,
and does not need to be escaped. */
and does not need to be escaped. */
if (!expected_delimiter)
*exp_p++ = c;
break;
@ -1475,7 +1477,8 @@ static char rest_extension[] = "...";
#define REST_EXTENSION_LENGTH (sizeof (rest_extension) - 1)
/* Create a DEFINITION node from a #define directive. Arguments are
as for do_define. */
as for do_define. */
static MACRODEF
create_definition (buf, limit, pfile, predefinition)
U_CHAR *buf, *limit;
@ -1506,7 +1509,7 @@ create_definition (buf, limit, pfile, predefinition)
/* Lossage will occur if identifiers or control keywords are broken
across lines using backslash. This is not the right place to take
care of that. */
care of that. */
if (*bp == '(') {
struct arglist *arg_ptrs = NULL;
@ -1580,7 +1583,7 @@ create_definition (buf, limit, pfile, predefinition)
++bp; /* skip paren */
SKIP_WHITE_SPACE (bp);
/* now everything from bp before limit is the definition. */
/* now everything from bp before limit is the definition. */
defn = collect_expansion (pfile, bp, limit, argno, arg_ptrs);
defn->rest_args = rest_args;
@ -1627,7 +1630,7 @@ create_definition (buf, limit, pfile, predefinition)
}
}
}
/* now everything from bp before limit is the definition. */
/* now everything from bp before limit is the definition. */
defn = collect_expansion (pfile, bp, limit, -1, NULL_PTR);
defn->args.argnames = (U_CHAR *) "";
}
@ -1666,7 +1669,7 @@ check_macro_name (pfile, symname, usage)
if (sym_length == 0)
cpp_error (pfile, "invalid %s name", usage);
else if (!is_idstart[*symname]) {
U_CHAR *msg; /* what pain... */
U_CHAR *msg; /* what pain... */
msg = (U_CHAR *) alloca (sym_length + 1);
bcopy (symname, msg, sym_length);
msg[sym_length] = 0;
@ -1678,9 +1681,8 @@ check_macro_name (pfile, symname, usage)
return sym_length;
}
/*
* return zero if two DEFINITIONs are isomorphic
*/
/* Return zero if two DEFINITIONs are isomorphic. */
static int
compare_defs (d1, d2)
DEFINITION *d1, *d2;
@ -1795,7 +1797,7 @@ do_define (pfile, keyword, buf, limit)
/* Print the warning if it's not ok. */
if (!ok)
{
U_CHAR *msg; /* what pain... */
U_CHAR *msg; /* what pain... */
/* If we are passing through #define and #undef directives, do
that for this re-definition now. */
@ -1840,7 +1842,7 @@ nope:
if stringified.
`use_count' is the number of times this macro arg is substituted
into the macro. If the actual use count exceeds 10,
the value stored is 10. */
the value stored is 10. */
/* raw and expanded are relative to ARG_BASE */
#define ARG_BASE ((pfile)->token_buffer)
@ -1857,9 +1859,9 @@ struct argdata {
/* Allocate a new cpp_buffer for PFILE, and push it on the input buffer stack.
If BUFFER != NULL, then use the LENGTH characters in BUFFER
as the new input buffer.
Return the new buffer, or NULL on failure. */
Return the new buffer, or NULL on failure. */
cpp_buffer*
cpp_buffer *
cpp_push_buffer (pfile, buffer, length)
cpp_reader *pfile;
U_CHAR *buffer;
@ -1884,7 +1886,7 @@ cpp_push_buffer (pfile, buffer, length)
return buf;
}
cpp_buffer*
cpp_buffer *
cpp_pop_buffer (pfile)
cpp_reader *pfile;
{
@ -1894,7 +1896,7 @@ cpp_pop_buffer (pfile)
}
/* Scan until CPP_BUFFER (PFILE) is exhausted into PFILE->token_buffer.
Pop the buffer when done. */
Pop the buffer when done. */
void
cpp_scan_buffer (pfile)
@ -1904,7 +1906,7 @@ cpp_scan_buffer (pfile)
for (;;)
{
enum cpp_token token = cpp_get_token (pfile);
if (token == CPP_EOF) /* Should not happen ... */
if (token == CPP_EOF) /* Should not happen ... */
break;
if (token == CPP_POP && CPP_BUFFER (pfile) == buffer)
{
@ -1989,7 +1991,7 @@ adjust_position (buf, limit, linep, colp)
}
}
/* Move line_base forward, updating lineno and colno. */
/* Move line_base forward, updating lineno and colno. */
static void
update_position (pbuf)
@ -2028,9 +2030,9 @@ cpp_buf_line_and_col (pbuf, linep, colp)
}
}
/* Return the cpp_buffer that corresponds to a file (not a macro). */
/* Return the cpp_buffer that corresponds to a file (not a macro). */
cpp_buffer*
cpp_buffer *
cpp_file_buffer (pfile)
cpp_reader *pfile;
{
@ -2199,7 +2201,7 @@ macarg (pfile, rest_args)
goto found;
break;
found:
/* Remove ',' or ')' from argument buffer. */
/* Remove ',' or ')' from argument buffer. */
CPP_ADJUST_WRITTEN (pfile, -1);
goto done;
default: ;
@ -2261,7 +2263,7 @@ timestamp (pfile)
cpp_reader *pfile;
{
if (!pfile->timebuf) {
time_t t = time ((time_t *)0);
time_t t = time ((time_t *) 0);
pfile->timebuf = localtime (&t);
}
return pfile->timebuf;
@ -2420,7 +2422,7 @@ special_symbol (hp, pfile)
if (pcp_outfile && pcp_inside_if
&& (hp->type == T_CONST
|| (hp->type == T_MACRO && hp->value.defn->predefined)))
/* Output a precondition for this macro use. */
/* Output a precondition for this macro use. */
fprintf (pcp_outfile, "#define %s\n", hp->name);
#endif
buf = " 1 ";
@ -2535,7 +2537,7 @@ initialize_builtins (pfile)
}
/* Return 1 iff a token ending in C1 followed directly by a token C2
could cause mis-tokenization. */
could cause mis-tokenization. */
static int
unsafe_chars (c1, c2)
@ -2556,7 +2558,7 @@ unsafe_chars (c1, c2)
goto letter;
case 'L':
if (c2 == '\'' || c2 == '\"')
return 1; /* Could turn into L"xxx" or L'xxx'. */
return 1; /* Could turn into L"xxx" or L'xxx'. */
goto letter;
letter:
case '_':
@ -2570,7 +2572,7 @@ unsafe_chars (c1, c2)
case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
/* We're in the middle of either a name or a pre-processing number. */
/* We're in the middle of either a name or a pre-processing number. */
return (is_idchar[c2] || c2 == '.');
case '<': case '>': case '!': case '%': case '#': case ':':
case '^': case '&': case '|': case '*': case '/': case '=':
@ -2638,7 +2640,7 @@ macroexpand (pfile, hp)
/* Parse all the macro args that are supplied. I counts them.
The first NARGS args are stored in ARGS.
The rest are discarded. If rest_args is set then we assume
macarg absorbed the rest of the args. */
macarg absorbed the rest of the args. */
i = 0;
rest_args = 0;
rest_args = 0;
@ -2746,7 +2748,7 @@ macroexpand (pfile, hp)
int c;
/* Initially need_space is -1. Otherwise, 1 means the
previous character was a space, but we suppressed it;
0 means the previous character was a non-space. */
0 means the previous character was a non-space. */
int need_space = -1;
i = 0;
arg->stringified = CPP_WRITTEN (pfile);
@ -2956,7 +2958,7 @@ macroexpand (pfile, hp)
}
/* if there is anything left of the definition
after handling the arg list, copy that in too. */
after handling the arg list, copy that in too. */
for (i = offset; i < defn->length; i++)
{
@ -2980,7 +2982,7 @@ macroexpand (pfile, hp)
push_macro_expansion (pfile, xbuf, xbuf_len, hp);
CPP_BUFFER (pfile)->has_escapes = 1;
/* Pop the space we've used in the token_buffer for argument expansion. */
/* Pop the space we've used in the token_buffer for argument expansion. */
CPP_SET_WRITTEN (pfile, old_written);
/* Recursive macro use sometimes works traditionally.
@ -3048,7 +3050,7 @@ get_directive_token (pfile)
case CPP_POP:
if (! CPP_IS_MACRO_BUFFER (CPP_BUFFER (pfile)))
return token;
/* ... else fall though ... */
/* ... else fall though ... */
case CPP_HSPACE: case CPP_COMMENT:
CPP_SET_WRITTEN (pfile, old_written);
break;
@ -3064,7 +3066,7 @@ get_directive_token (pfile)
The input is normally in part of the output_buffer following
CPP_WRITTEN, and will get overwritten by output_line_command.
I.e. in input file specification has been popped by handle_directive.
This is safe. */
This is safe. */
static int
do_include (pfile, keyword, unused1, unused2)
@ -3091,7 +3093,7 @@ do_include (pfile, keyword, unused1, unused2)
int f; /* file number */
int retried = 0; /* Have already tried macro
expanding the include line*/
expanding the include line */
int angle_brackets = 0; /* 0 for "...", 1 for <...> */
int pcf = -1;
char *pcfbuf;
@ -3133,12 +3135,12 @@ do_include (pfile, keyword, unused1, unused2)
if (CPP_OPTIONS (pfile)->first_bracket_include)
search_start = CPP_OPTIONS (pfile)->first_bracket_include;
}
/* If -I- was specified, don't search current dir, only spec'd ones. */
/* If -I- was specified, don't search current dir, only spec'd ones. */
else if (! CPP_OPTIONS (pfile)->ignore_srcdir)
{
cpp_buffer *fp = CPP_BUFFER (pfile);
/* We have "filename". Figure out directory this source
file is coming from and put it on the front of the list. */
file is coming from and put it on the front of the list. */
for ( ; fp != CPP_NULL_BUFFER (pfile); fp = CPP_PREV_BUFFER (fp))
{
@ -3379,18 +3381,18 @@ do_include (pfile, keyword, unused1, unused2)
/* Check to see if this include file is a once-only include file.
If so, give up. */
struct file_name_list* ptr;
struct file_name_list *ptr;
for (ptr = pfile->dont_repeat_files; ptr; ptr = ptr->next) {
if (!strcmp (ptr->fname, fname)) {
close (f);
return 0; /* This file was once'd. */
return 0; /* This file was once'd. */
}
}
for (ptr = pfile->all_include_files; ptr; ptr = ptr->next) {
if (!strcmp (ptr->fname, fname))
break; /* This file was included before. */
break; /* This file was included before. */
}
if (ptr == 0) {
@ -3425,7 +3427,7 @@ do_include (pfile, keyword, unused1, unused2)
/* Actually process the file. */
/* Record file on "seen" list for #import. */
/* Record file on "seen" list for #import. */
add_import (pfile, f, fname);
pcftry = (char *) alloca (strlen (fname) + 30);
@ -3546,6 +3548,7 @@ is_system_include (pfile, filename)
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
static ASSERTION_HASHNODE *
assertion_install (pfile, name, len, hash)
cpp_reader *pfile;
@ -3623,8 +3626,8 @@ delete_assertion (hp)
tail = next;
}
/* make sure that the bucket chain header that
the deleted guy was on points to the right thing afterwards. */
/* Make sure that the bucket chain header that
the deleted guy was on points to the right thing afterwards. */
if (hp == *hp->bucket_hdr)
*hp->bucket_hdr = hp->next;
@ -3637,7 +3640,7 @@ delete_assertion (hp)
The value returned in the end of the string written to RESULT,
or NULL on error. */
static U_CHAR*
static U_CHAR *
convert_string (pfile, result, in, limit, handle_escapes)
cpp_reader *pfile;
register U_CHAR *result, *in, *limit;
@ -3940,7 +3943,7 @@ do_ident (pfile, keyword, buf, limit)
if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p)
cpp_pedwarn (pfile, "ANSI C does not allow `#ident'");
/* Leave rest of line to be read by later calls to cpp_get_token. */
/* Leave rest of line to be read by later calls to cpp_get_token. */
return 0;
}
@ -4102,6 +4105,7 @@ do_elif (pfile, keyword, buf, limit)
* evaluate a #if expression in BUF, of length LENGTH,
* then parse the result as a C expression and return the value as an int.
*/
static HOST_WIDE_INT
eval_if_expression (pfile, buf, length)
cpp_reader *pfile;
@ -4138,7 +4142,7 @@ do_xifdef (pfile, keyword, unused1, unused2)
{
int skip;
cpp_buffer *ip = CPP_BUFFER (pfile);
U_CHAR* ident;
U_CHAR *ident;
int ident_length;
enum cpp_token token;
int start_of_file = 0;
@ -4246,6 +4250,7 @@ conditional_skip (pfile, skip, type, control_macro)
* leaves input ptr at the sharp sign found.
* If ANY is nonzero, return at next directive of any sort.
*/
static void
skip_if_group (pfile, any)
cpp_reader *pfile;
@ -4363,7 +4368,7 @@ skip_if_group (pfile, any)
}
c = GETC ();
}
/* We're in the middle of a line. Skip the rest of it. */
/* We're in the middle of a line. Skip the rest of it. */
for (;;) {
switch (c)
{
@ -4542,9 +4547,8 @@ validate_else (pfile, directive)
}
/* Get the next token, and add it to the text in pfile->token_buffer.
Return the kind of token we got. */
Return the kind of token we got. */
enum cpp_token
cpp_get_token (pfile)
cpp_reader *pfile;
@ -4577,7 +4581,7 @@ cpp_get_token (pfile)
{
/* We're about to return from an #include file.
Emit #line information now (as part of the CPP_POP) result.
But the #line refers to the file we will pop to. */
But the #line refers to the file we will pop to. */
cpp_buffer *cur_buffer = CPP_BUFFER (pfile);
CPP_BUFFER (pfile) = next_buf;
pfile->input_stack_listing_current = 0;
@ -4612,7 +4616,7 @@ cpp_get_token (pfile)
"unterminated comment");
goto handle_eof;
}
c = '/'; /* Initial letter of comment. */
c = '/'; /* Initial letter of comment. */
return_comment:
/* Comments are equivalent to spaces.
For -traditional, a comment is equivalent to nothing. */
@ -4637,7 +4641,7 @@ cpp_get_token (pfile)
{
#if 0
/* This may not work if cpp_get_token is called recursively,
since many places look for horizontal space. */
since many places look for horizontal space. */
if (newlines)
{
/* Copy the newlines into the output buffer, in order to
@ -4678,7 +4682,7 @@ cpp_get_token (pfile)
/* OK, now bring us back to the state we were in before we entered
this branch. We need #line b/c the newline for the pragma
could fuck things up. */
could fuck things up. */
output_line_command (pfile, 0, same_file);
*(obp++) = ' '; /* just in case, if comments are copied thru */
*(obp++) = '/';
@ -4776,7 +4780,7 @@ cpp_get_token (pfile)
cc = GETC();
if (cc == '\n')
{
/* Backslash newline is replaced by nothing at all. */
/* Backslash newline is replaced by nothing at all. */
CPP_ADJUST_WRITTEN (pfile, -1);
pfile->lineno++;
}
@ -4840,7 +4844,7 @@ cpp_get_token (pfile)
/* Chill style comment */
if (opts->put_out_comments)
parse_set_mark (&start_mark, pfile);
FORWARD(1); /* Skip second '-'. */
FORWARD(1); /* Skip second '-'. */
for (;;)
{
c = GETC ();
@ -4848,7 +4852,7 @@ cpp_get_token (pfile)
break;
if (c == '\n')
{
/* Don't consider final '\n' to be part of comment. */
/* Don't consider final '\n' to be part of comment. */
FORWARD(-1);
break;
}
@ -5061,7 +5065,7 @@ cpp_get_token (pfile)
if (hp->type == T_DISABLED)
{
if (pfile->output_escapes)
{ /* Return "@-IDENT", followed by '\0'. */
{ /* Return "@-IDENT", followed by '\0'. */
int i;
CPP_RESERVE (pfile, 3);
ident = pfile->token_buffer + before_name_written;
@ -5107,7 +5111,7 @@ cpp_get_token (pfile)
if (!is_macro_call)
return CPP_NAME;
}
/* This is now known to be a macro call. */
/* This is now known to be a macro call. */
/* it might not actually be a macro. */
if (hp->type != T_MACRO) {
@ -5131,7 +5135,7 @@ cpp_get_token (pfile)
/* An extra "@ " is added to the end of a macro expansion
to prevent accidental token pasting. We prefer to avoid
unneeded extra spaces (for the sake of cpp-using tools like
imake). Here we remove the space if it is safe to do so. */
imake). Here we remove the space if it is safe to do so. */
if (pfile->buffer->rlimit - pfile->buffer->cur >= 3
&& pfile->buffer->rlimit[-2] == '@'
&& pfile->buffer->rlimit[-1] == ' ')
@ -5188,7 +5192,8 @@ cpp_get_token (pfile)
}
}
/* Like cpp_get_token, but skip spaces and comments. */
/* Like cpp_get_token, but skip spaces and comments. */
enum cpp_token
cpp_get_non_space_token (pfile)
cpp_reader *pfile;
@ -5204,7 +5209,7 @@ cpp_get_non_space_token (pfile)
}
}
/* Parse an identifier starting with C. */
/* Parse an identifier starting with C. */
int
parse_name (pfile, c)
@ -5223,7 +5228,7 @@ parse_name (pfile, c)
break;
}
CPP_RESERVE(pfile, 2); /* One more for final NUL. */
CPP_RESERVE(pfile, 2); /* One more for final NUL. */
CPP_PUTC_Q (pfile, c);
c = GETC();
if (c == EOF)
@ -5368,7 +5373,8 @@ read_filename_string (ch, f)
return alloc;
}
/* This structure holds a linked list of file name maps, one per directory. */
/* This structure holds a linked list of file name maps, one per directory. */
struct file_name_map_list
{
struct file_name_map_list *map_list_next;
@ -5591,7 +5597,7 @@ finclude (pfile, f, fname, system_header_p, dirptr)
} else {
/* Cannot count its file size before reading.
First read the entire file into heap and
copy them into buffer on stack. */
copy them into buffer on stack. */
int bsize = 2000;
@ -5783,7 +5789,7 @@ cpp_start_read (pfile, fname)
/* Now handle the command line options. */
/* Do -U's, -D's and -A's in the order they were seen. */
/* First reverse the list. */
/* First reverse the list. */
opts->pending = nreverse_pending (opts->pending);
for (pend = opts->pending; pend; pend = pend->next)
@ -5811,8 +5817,8 @@ cpp_start_read (pfile, fname)
opts->done_initializing = 1;
{ /* read the appropriate environment variable and if it exists
replace include_defaults with the listed path. */
{ /* Read the appropriate environment variable and if it exists
replace include_defaults with the listed path. */
char *epath = 0;
switch ((opts->objc << 1) + opts->cplusplus)
{
@ -6139,7 +6145,7 @@ cpp_start_read (pfile, fname)
}
pfile->no_record_file--;
/* Free the pending list. */
/* Free the pending list. */
for (pend = opts->pending; pend; )
{
struct cpp_pending *next = pend->next;
@ -6173,7 +6179,7 @@ cpp_reader_init (pfile)
pfile->get_token = cpp_get_token;
pfile->token_buffer_size = 200;
pfile->token_buffer = (U_CHAR*)xmalloc (pfile->token_buffer_size);
pfile->token_buffer = (U_CHAR *) xmalloc (pfile->token_buffer_size);
CPP_SET_WRITTEN (pfile, 0);
pfile->system_include_depth = 0;
@ -6207,7 +6213,7 @@ push_pending (pfile, cmd, arg)
char *arg;
{
struct cpp_pending *pend
= (struct cpp_pending*)xmalloc (sizeof (struct cpp_pending));
= (struct cpp_pending *) xmalloc (sizeof (struct cpp_pending));
pend->cmd = cmd;
pend->arg = arg;
pend->next = CPP_OPTIONS (pfile)->pending;
@ -6736,7 +6742,7 @@ cpp_finish (pfile)
}
/* Free resources used by PFILE.
This is the cpp_reader 'finalizer' or 'destructor' (in C++ terminology). */
This is the cpp_reader 'finalizer' or 'destructor' (in C++ terminology). */
void
cpp_cleanup (pfile)
@ -7209,7 +7215,8 @@ savestring (input)
return output;
}
/* Initialize PMARK to remember the current position of PFILE. */
/* Initialize PMARK to remember the current position of PFILE. */
void
parse_set_mark (pmark, pfile)
struct parse_marker *pmark;
@ -7222,7 +7229,8 @@ parse_set_mark (pmark, pfile)
pmark->position = pbuf->cur - pbuf->buf;
}
/* Cleanup PMARK - we no longer need it. */
/* Cleanup PMARK - we no longer need it. */
void
parse_clear_mark (pmark)
struct parse_marker *pmark;
@ -7235,7 +7243,7 @@ parse_clear_mark (pmark)
*pp = pmark->next;
}
/* Backup the current position of PFILE to that saved in PMARK. */
/* Backup the current position of PFILE to that saved in PMARK. */
void
parse_goto_mark (pmark, pfile)
@ -7249,7 +7257,7 @@ parse_goto_mark (pmark, pfile)
}
/* Reset PMARK to point to the current position of PFILE. (Same
as parse_clear_mark (PMARK), parse_set_mark (PMARK, PFILE) but faster. */
as parse_clear_mark (PMARK), parse_set_mark (PMARK, PFILE) but faster. */
void
parse_move_mark (pmark, pfile)
@ -7427,7 +7435,7 @@ cpp_pedwarn_with_file_and_line (pfile, file, line, msg, arg1, arg2, arg3)
msg, arg1, arg2, arg3);
}
/* This defines "errno" properly for VMS, and gives us EACCES. */
/* This defines "errno" properly for VMS, and gives us EACCES. */
#include <errno.h>
#ifndef errno
extern int errno;
@ -7448,9 +7456,8 @@ char *strerror ();
char *strerror (int,...);
#endif
/*
* my_strerror - return the descriptive text associated with an `errno' code.
*/
/* my_strerror - return the descriptive text associated with an
`errno' code. */
char *
my_strerror (errnum)

View file

@ -76,8 +76,8 @@ enum cpp_token {
#endif
#endif /* !PARAMS */
typedef enum cpp_token (*parse_underflow_t) PARAMS((cpp_reader*));
typedef int (*parse_cleanup_t) PARAMS((cpp_buffer *, cpp_reader*));
typedef enum cpp_token (*parse_underflow_t) PARAMS((cpp_reader *));
typedef int (*parse_cleanup_t) PARAMS((cpp_buffer *, cpp_reader *));
/* A parse_marker indicates a previous position,
which we can backtrack to. */
@ -88,18 +88,18 @@ struct parse_marker {
int position;
};
extern void parse_set_mark PARAMS ((struct parse_marker*, cpp_reader*));
extern void parse_clear_mark PARAMS ((struct parse_marker*));
extern void parse_goto_mark PARAMS((struct parse_marker*, cpp_reader*));
extern void parse_move_mark PARAMS((struct parse_marker*, cpp_reader*));
extern void parse_set_mark PARAMS ((struct parse_marker *, cpp_reader *));
extern void parse_clear_mark PARAMS ((struct parse_marker *));
extern void parse_goto_mark PARAMS((struct parse_marker *, cpp_reader *));
extern void parse_move_mark PARAMS((struct parse_marker *, cpp_reader *));
extern int cpp_handle_options PARAMS ((cpp_reader*, int, char**));
extern enum cpp_token cpp_get_token PARAMS ((struct parse_marker*));
extern void cpp_skip_hspace PARAMS((cpp_reader*));
extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **));
extern enum cpp_token cpp_get_token PARAMS ((struct parse_marker *));
extern void cpp_skip_hspace PARAMS((cpp_reader *));
extern enum cpp_token cpp_get_non_space_token PARAMS ((cpp_reader *));
/* This frees resources used by PFILE. */
extern void cpp_cleanup PARAMS ((cpp_reader* PFILE));
extern void cpp_cleanup PARAMS ((cpp_reader *PFILE));
/* Maintain and search list of included files, for #import. */
@ -304,7 +304,7 @@ struct cpp_reader {
#define CPP_ADJUST_WRITTEN(PFILE,DELTA) ((PFILE)->limit += (DELTA))
#define CPP_SET_WRITTEN(PFILE,N) ((PFILE)->limit = (PFILE)->token_buffer + (N))
#define CPP_OPTIONS(PFILE) ((cpp_options*)(PFILE)->data)
#define CPP_OPTIONS(PFILE) ((cpp_options *) (PFILE)->data)
#define CPP_BUFFER(PFILE) ((PFILE)->buffer)
#define CPP_PREV_BUFFER(BUFFER) ((BUFFER)+1)
@ -631,9 +631,9 @@ struct if_stack {
};
typedef struct if_stack IF_STACK_FRAME;
extern void cpp_buf_line_and_col PARAMS((cpp_buffer*, long*, long*));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader*));
extern void cpp_define PARAMS ((cpp_reader*, unsigned char*));
extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
extern void cpp_define PARAMS ((cpp_reader*, unsigned char *));
extern void cpp_error ();
extern void cpp_warning ();
@ -646,13 +646,13 @@ extern void cpp_error_from_errno ();
extern void cpp_perror_with_name ();
extern void cpp_pfatal_with_name ();
extern void cpp_grow_buffer PARAMS ((cpp_reader*, long));
extern int cpp_parse_escape PARAMS ((cpp_reader*, char**));
extern cpp_buffer* cpp_push_buffer PARAMS ((cpp_reader *,
unsigned char*, long));
extern cpp_buffer* cpp_pop_buffer PARAMS ((cpp_reader *));
extern void cpp_grow_buffer PARAMS ((cpp_reader *, long));
extern int cpp_parse_escape PARAMS ((cpp_reader *, char **));
extern cpp_buffer *cpp_push_buffer PARAMS ((cpp_reader *,
unsigned char *, long));
extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *));
extern cpp_hashnode* cpp_lookup PARAMS ((cpp_reader*, const unsigned char*,
extern cpp_hashnode *cpp_lookup PARAMS ((cpp_reader *, const unsigned char *,
int, int));
#ifdef __cplusplus

View file

@ -53,7 +53,7 @@ main (argc, argv)
{
char *p;
int i;
int argi = 1; /* Next argument to handle. */
int argi = 1; /* Next argument to handle. */
struct cpp_options *opts = &options;
p = argv[0] + strlen (argv[0]);

View file

@ -123,6 +123,7 @@ __do_global_dtors_aux ()
}
/* Stick a call to __do_global_dtors_aux into the .fini section. */
static void
fini_dummy ()
{
@ -142,6 +143,7 @@ fini_dummy ()
function. It is externally callable so that __main can invoke it when
INVOKE__main is defined. This has the additional effect of forcing cc1
to switch to the .text section. */
static void __do_global_ctors_aux ();
void __do_global_ctors ()
{
@ -161,7 +163,7 @@ asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */
crti.o may do something, such as bump the stack, which we have to
undo before we reach the function prologue code for __do_global_ctors
(directly below). For such systems, define the macro INIT_SECTION_PREAMBLE
to expand into the code needed to undo the actions of the crti.o file. */
to expand into the code needed to undo the actions of the crti.o file. */
#ifdef INIT_SECTION_PREAMBLE
INIT_SECTION_PREAMBLE;
@ -235,6 +237,7 @@ __do_global_ctors_aux ()
}
/* Stick a call to __do_global_ctors_aux into the .init section. */
static void
init_dummy ()
{
@ -248,7 +251,7 @@ init_dummy ()
/* This is a kludge. The i386 Linux dynamic linker needs ___brk_addr,
__environ and atexit (). We have to make sure they are in the .dynsym
section. We accomplish it by making a dummy call here. This
code is never reached. */
code is never reached. */
#if defined(__linux__) && defined(__PIC__) && defined(__i386__)
{
@ -282,7 +285,7 @@ init_dummy ()
other libraries, etc. That's because those other initializations may
include setup operations for very primitive things (e.g. initializing
the state of the floating-point coprocessor, etc.) which should be done
before we start to execute any of the user's code. */
before we start to execute any of the user's code. */
static void
__do_global_ctors_aux () /* prologue goes in .text section */

View file

@ -534,7 +534,7 @@ static int constant_pool_entries_cost;
struct write_data
{
int sp : 1; /* Invalidate stack pointer. */
int sp : 1; /* Invalidate stack pointer. */
int var : 1; /* Invalidate variable addresses. */
int nonscalar : 1; /* Invalidate all but scalar variables. */
int all : 1; /* Invalidate all memory refs. */
@ -559,7 +559,7 @@ struct cse_basic_block_data {
int path_size;
/* Current branch path, indicating which branches will be taken. */
struct branch_path {
/* The branch insn. */
/* The branch insn. */
rtx branch;
/* Whether it should be taken or not. AROUND is the same as taken
except that it is used when the destination label is not preceded
@ -1466,7 +1466,7 @@ merge_equiv_classes (class1, class2)
/* Remove old entry, make a new one in CLASS1's class.
Don't do this for invalid entries as we cannot find their
hash code (it also isn't necessary). */
hash code (it also isn't necessary). */
if (GET_CODE (exp) == REG || exp_equiv_p (exp, exp, 1, 0))
{
hash_arg_in_memory = 0;
@ -1886,7 +1886,7 @@ canon_hash (x, mode)
/* On some machines, we can't record any non-fixed hard register,
because extending its life will cause reload problems. We
consider ap, fp, and sp to be fixed for this purpose.
On all machines, we can't record any global registers. */
On all machines, we can't record any global registers. */
if (regno < FIRST_PSEUDO_REGISTER
&& (global_regs[regno]
@ -3179,7 +3179,7 @@ simplify_unary_operation (code, mode, op, op_mode)
}
/* We can do some operations on integer CONST_DOUBLEs. Also allow
for a DImode operation on a CONST_INT. */
for a DImode operation on a CONST_INT. */
else if (GET_MODE (op) == VOIDmode && width <= HOST_BITS_PER_INT * 2
&& (GET_CODE (op) == CONST_DOUBLE || GET_CODE (op) == CONST_INT))
{
@ -3525,7 +3525,7 @@ simplify_binary_operation (code, mode, op0, op1)
neg_double (l2, h2, &lv, &hv);
l2 = lv, h2 = hv;
/* .. fall through ... */
/* .. fall through ... */
case PLUS:
add_double (l1, h1, l2, h2, &lv, &hv);
@ -3962,7 +3962,7 @@ simplify_binary_operation (code, mode, op0, op1)
&& (arg1 = exact_log2 (INTVAL (op1))) > 0)
return gen_rtx (LSHIFTRT, mode, op0, GEN_INT (arg1));
/* ... fall through ... */
/* ... fall through ... */
case DIV:
if (op1 == CONST1_RTX (mode))
@ -4008,7 +4008,7 @@ simplify_binary_operation (code, mode, op0, op1)
&& exact_log2 (INTVAL (op1)) > 0)
return gen_rtx (AND, mode, op0, GEN_INT (INTVAL (op1) - 1));
/* ... fall through ... */
/* ... fall through ... */
case MOD:
if ((op0 == const0_rtx || op1 == const1_rtx)
@ -4024,7 +4024,7 @@ simplify_binary_operation (code, mode, op0, op1)
&& ! side_effects_p (op1))
return op0;
/* ... fall through ... */
/* ... fall through ... */
case ASHIFT:
case ASHIFTRT:
@ -5381,12 +5381,14 @@ fold_rtx (x, insn)
if (mode_arg0 == VOIDmode || GET_MODE_CLASS (mode_arg0) == MODE_CC)
break;
/* If we do not now have two constants being compared, see if we
can nevertheless deduce some things about the comparison. */
/* If we do not now have two constants being compared, see
if we can nevertheless deduce some things about the
comparison. */
if (const_arg0 == 0 || const_arg1 == 0)
{
/* Is FOLDED_ARG0 frame-pointer plus a constant? Or non-explicit
constant? These aren't zero, but we don't know their sign. */
/* Is FOLDED_ARG0 frame-pointer plus a constant? Or
non-explicit constant? These aren't zero, but we
don't know their sign. */
if (const_arg1 == const0_rtx
&& (NONZERO_BASE_PLUS_P (folded_arg0)
#if 0 /* Sad to say, on sysvr4, #pragma weak can make a symbol address
@ -5589,7 +5591,7 @@ fold_rtx (x, insn)
NULL_RTX);
}
/* ... fall through ... */
/* ... fall through ... */
from_plus:
case SMIN: case SMAX: case UMIN: case UMAX:
@ -6169,7 +6171,7 @@ cse_insn (insn, in_libcall_block)
someplace else, so it isn't worth cse'ing (and on 80386 is unsafe)!
Ensure we invalidate the destination register. On the 80386 no
other code would invalidate it since it is a fixed_reg.
We need not check the return of apply_change_group; see canon_reg. */
We need not check the return of apply_change_group; see canon_reg. */
else if (GET_CODE (SET_SRC (x)) == CALL)
{
@ -6741,7 +6743,7 @@ cse_insn (insn, in_libcall_block)
that are when they are equal cost. Note that we can never
worsen an insn as the current contents will also succeed.
If we find an equivalent identical to the destination, use it as best,
since this insn will probably be eliminated in that case. */
since this insn will probably be eliminated in that case. */
if (src)
{
if (rtx_equal_p (src, dest))
@ -7563,7 +7565,7 @@ note_mem_written (written, writes_ptr)
*writes_ptr = everything;
else if (GET_CODE (written) == MEM)
{
/* Pushing or popping the stack invalidates just the stack pointer. */
/* Pushing or popping the stack invalidates just the stack pointer. */
rtx addr = XEXP (written, 0);
if ((GET_CODE (addr) == PRE_DEC || GET_CODE (addr) == PRE_INC
|| GET_CODE (addr) == POST_DEC || GET_CODE (addr) == POST_INC)
@ -7995,7 +7997,8 @@ cse_set_around_loop (x, insn, loop_start)
if (writes_memory.var)
invalidate_memory (&writes_memory);
/* See comment on similar code in cse_insn for explanation of these tests. */
/* See comment on similar code in cse_insn for explanation of these
tests. */
if (GET_CODE (SET_DEST (x)) == REG || GET_CODE (SET_DEST (x)) == SUBREG
|| (GET_CODE (SET_DEST (x)) == MEM && ! writes_memory.all
&& ! cse_rtx_addr_varies_p (SET_DEST (x))))

View file

@ -571,7 +571,7 @@ dbxout_source_line (file, filename, lineno)
/* At the end of compilation, finish writing the symbol table.
Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is
to do nothing. */
to do nothing. */
void
dbxout_finish (file, filename)
@ -873,7 +873,7 @@ dbxout_type_methods (type)
/* Get past const and volatile qualifiers. */
while (*method_name == 'C' || *method_name == 'V')
method_name++;
/* Skip digits for length of type_encoding. */
/* Skip digits for length of type_encoding. */
while (*method_name == *length_ptr && *length_ptr)
length_ptr++, method_name++;
if (! strncmp (method_name,
@ -890,7 +890,7 @@ dbxout_type_methods (type)
char *length_ptr = formatted_type_identifier_length;
while (*ctor_name == 'C' || *ctor_name == 'V')
ctor_name++;
/* Skip digits for length of type_encoding. */
/* Skip digits for length of type_encoding. */
while (*ctor_name == *length_ptr && *length_ptr)
length_ptr++, ctor_name++;
if (!strncmp (IDENTIFIER_POINTER (type_encoding), ctor_name,
@ -925,7 +925,7 @@ dbxout_type_methods (type)
/* Emit a "range" type specification, which has the form:
"r<index type>;<lower bound>;<upper bound>;".
TYPE is an INTEGER_TYPE. */
TYPE is an INTEGER_TYPE. */
static void
dbxout_range_type (type)
@ -942,7 +942,7 @@ dbxout_range_type (type)
were defined to be sub-ranges of int. Unfortunately, this
does not allow us to distinguish true sub-ranges from integer
types. So, instead we define integer (non-sub-range) types as
sub-ranges of themselves. */
sub-ranges of themselves. */
dbxout_type_index (type);
}
if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST)
@ -1222,7 +1222,7 @@ dbxout_type (type, full, show_arg_types)
fprintf (asmfile, "@s%d;",
BITS_PER_UNIT * int_size_in_bytes (type));
/* Check if a bitstring type, which in Chill is
different from a [power]set. */
different from a [power]set. */
if (TYPE_STRING_FLAG (type))
fprintf (asmfile, "@S;");
}
@ -1237,7 +1237,7 @@ dbxout_type (type, full, show_arg_types)
followed by a reference to the target-type.
ar1;0;N;M for a C array of type M and size N+1. */
/* Check if a character string type, which in Chill is
different from an array of characters. */
different from an array of characters. */
if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions)
{
have_used_extensions = 1;

View file

@ -163,7 +163,7 @@ struct filename_entry {
typedef struct filename_entry filename_entry;
/* Pointer to an array of elements, each one having the structure above. */
/* Pointer to an array of elements, each one having the structure above. */
static filename_entry *filename_table;
@ -202,7 +202,7 @@ static char *last_filename;
static unsigned next_block_number = 2;
/* Counter to generate unique names for DIEs. */
/* Counter to generate unique names for DIEs. */
static unsigned next_unused_dienum = 1;
@ -1736,7 +1736,7 @@ output_bound_representation (bound, dim_num, u_or_l)
case NOP_EXPR:
bound = TREE_OPERAND (bound, 0);
/* ... fall thru... */
/* ... fall thru... */
case SAVE_EXPR:
{
@ -2081,8 +2081,7 @@ location_attribute (rtl)
object" which will be given in the AT_byte_size attribute for this
bit-field. (See the `byte_size_attribute' function below.) It is
also used when calculating the value of the AT_bit_offset attribute.
(See the `bit_offset_attribute' function below.)
*/
(See the `bit_offset_attribute' function below.) */
static void
data_member_location_attribute (decl)
@ -2462,7 +2461,7 @@ subscript_data_attribute (type)
if (! type_is_fundamental (domain))
abort ();
/* Output the representation format byte for this dimension. */
/* Output the representation format byte for this dimension. */
ASM_OUTPUT_DWARF_FMT_BYTE (asm_out_file,
FMT_CODE (1,
@ -3133,6 +3132,7 @@ output_set_type_die (arg)
#if 0
/* Implement this when there is a GNU FORTRAN or GNU Ada front end. */
static void
output_entry_point_die (arg)
register void *arg;
@ -3475,7 +3475,7 @@ output_member_die (arg)
member_attribute (DECL_CONTEXT (decl));
type_attribute (member_declared_type (decl),
TREE_READONLY (decl), TREE_THIS_VOLATILE (decl));
if (DECL_BIT_FIELD_TYPE (decl)) /* If this is a bit field... */
if (DECL_BIT_FIELD_TYPE (decl)) /* If this is a bit field... */
{
byte_size_attribute (decl);
bit_size_attribute (decl);
@ -3488,9 +3488,9 @@ output_member_die (arg)
/* Don't generate either pointer_type DIEs or reference_type DIEs. Use
modified types instead.
We keep this code here just in case these types of DIEs may be needed
to represent certain things in other languages (e.g. Pascal) someday.
*/
We keep this code here just in case these types of DIEs may be
needed to represent certain things in other languages (e.g. Pascal)
someday. */
static void
output_pointer_type_die (arg)
@ -3834,11 +3834,11 @@ end_sibling_chain ()
parameters as specified in some function type specification (except
for those which appear as part of a function *definition*).
Note that we must be careful here to output all of the parameter DIEs
*before* we output any DIEs needed to represent the types of the formal
parameters. This keeps svr4 SDB happy because it (incorrectly) thinks
that the first non-parameter DIE it sees ends the formal parameter list.
*/
Note that we must be careful here to output all of the parameter
DIEs *before* we output any DIEs needed to represent the types of
the formal parameters. This keeps svr4 SDB happy because it
(incorrectly) thinks that the first non-parameter DIE it sees ends
the formal parameter list. */
static void
output_formal_types (function_or_method_type)
@ -3983,7 +3983,7 @@ type_ok_for_scope (type, scope)
Note that we have to process the list in beginning-to-end order,
because the call made here to output_type may cause yet more types
to be added to the end of the list, and we may have to output some
of them too. */
of them too. */
static void
output_pending_types_for_scope (containing_scope)
@ -4611,7 +4611,7 @@ output_decl (decl, containing_scope)
if (fn_arg_types)
{
/* this is the prototyped case, check for ... */
/* this is the prototyped case, check for ... */
if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node)
output_die (output_unspecified_parameters_die, decl);
}
@ -5592,7 +5592,7 @@ dwarfout_finish ()
(or blame). I didn't think of this scheme. I just conformed to it.
*/
output_die (output_padded_null_die, (void *)0);
output_die (output_padded_null_die, (void *) 0);
dienum_pop ();
sprintf (label, DIE_BEGIN_LABEL_FMT, NEXT_DIE_NUM);

View file

@ -73,9 +73,9 @@ char *opcode_name[] =
/* Commonly used modes. */
enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT. */
enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD. */
enum machine_mode ptr_mode; /* Mode whose width is POINTER_SIZE. */
enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT. */
enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD. */
enum machine_mode ptr_mode; /* Mode whose width is POINTER_SIZE. */
/* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function.
After rtl generation, it is 1 plus the largest register number used. */
@ -249,7 +249,7 @@ struct sequence_stack *sequence_stack;
static struct sequence_stack *sequence_element_free_list;
static rtx sequence_result[SEQUENCE_RESULT_SIZE];
/* During RTL generation, we also keep a list of free INSN rtl codes. */
/* During RTL generation, we also keep a list of free INSN rtl codes. */
static rtx free_insn;
extern int rtx_equal_function_value_matters;
@ -753,7 +753,7 @@ gen_lowpart_common (mode, x)
low = CONST_DOUBLE_LOW (x), high = CONST_DOUBLE_HIGH (x);
/* REAL_VALUE_TARGET_DOUBLE takes the addressing order of the
target machine. */
target machine. */
if (WORDS_BIG_ENDIAN)
i[0] = high, i[1] = low;
else
@ -975,7 +975,7 @@ gen_highpart (mode, x)
*/
if (REGNO (x) < FIRST_PSEUDO_REGISTER
/* integrate.c can't handle parts of a return value register. */
/* integrate.c can't handle parts of a return value register. */
&& (! REG_FUNCTION_VALUE_P (x)
|| ! rtx_equal_function_value_matters)
/* We want to keep the stack, frame, and arg pointers special. */
@ -1493,7 +1493,8 @@ restore_emit_status (p)
regno_pointer_flag_length = p->regno_pointer_flag_length;
regno_reg_rtx = p->regno_reg_rtx;
/* Clear our cache of rtx expressions for start_sequence and gen_sequence. */
/* Clear our cache of rtx expressions for start_sequence and
gen_sequence. */
sequence_element_free_list = 0;
for (i = 0; i < SEQUENCE_RESULT_SIZE; i++)
sequence_result[i] = 0;
@ -1560,7 +1561,7 @@ copy_rtx_if_shared (orig)
case PC:
case CC0:
case SCRATCH:
/* SCRATCH must be shared because they represent distinct values. */
/* SCRATCH must be shared because they represent distinct values. */
return x;
case CONST:
@ -1871,7 +1872,7 @@ prev_nonnote_insn (insn)
/* Return the next INSN, CALL_INSN or JUMP_INSN after INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
SEQUENCEs. */
rtx
next_real_insn (insn)

View file

@ -1,5 +1,5 @@
/* Everything you wanted to know about your machine and C compiler,
but didn't know who to ask. */
but didn't know who to ask. */
#ifndef VERSION
#define VERSION "4.3"
@ -307,7 +307,7 @@
#endif /* NO_FILE */
#endif /* FILENAME */
/* If PASS isn't defined, then this is the first pass over this file. */
/* If PASS isn't defined, then this is the first pass over this file. */
#ifndef PASS
#ifndef SEP
#define PASS 1
@ -620,7 +620,7 @@ Procedure croak(place) int place; {
farewell(bugs+1); /* An exit isn't essential here, but avoids loops */
}
/* This is here in case alloca.c is used, which calls this. */
/* This is here in case alloca.c is used, which calls this. */
char *xmalloc(size) unsigned size; {
char *value = (char *)malloc(size);
if (value == 0) {
@ -806,7 +806,7 @@ Procedure i_define(desc, extra, sort, name, val, lim, req, mark)
} else if (val + lim < 0) {
/* We may not produce a constant like -1024 if the max
allowable value is 1023. It has then to be output as
-1023-1. lim is the max allowable value. */
-1023-1. lim is the max allowable value. */
printf("#define %s%s (%ld%s%ld%s)\n",
sort, name, -lim, mark, val+lim, mark);
} else {
@ -1090,7 +1090,7 @@ int promotions() {
eek_a_bug("promotions don't work properly in conditional expressions\n");
}
showtype("unsigned short promotes to", Promoted((unsigned short)0));
showtype("unsigned short promotes to", Promoted((unsigned short) 0));
showtype("long+unsigned gives", sl+ui);
return 0;
}
@ -1108,7 +1108,7 @@ Procedure check_defines() {
usign= Signed;
#else
/* Implementations promote unsigned short differently */
usign= is_signed((unsigned short)0);
usign= is_signed((unsigned short) 0);
#endif
if (L) {
@ -1554,7 +1554,7 @@ if (V) printf ("%s%s %s %s%s\n", co, "Type size_t is",
/* Alignment constants ********************************************/
#define alignment(TYPE) \
((long)((char *)&((struct{char c; TYPE d;}*)0)->d - (char *)0))
((long)((char *)&((struct{char c; TYPE d;}*)0)->d - (char *) 0))
Vprintf("\n%sALIGNMENTS%s\n", co, oc);
@ -2691,7 +2691,7 @@ int FPROP(bits_per_byte) int bits_per_byte; {
mantbits=floor_log(2, (Long_double)f_radix)*f_mant_dig;
if (mantbits == 64
&& iexp == 15
&& f_max_exp+f_min_exp > 0 /* ??? f_min_exp may be wrong. */
&& f_max_exp+f_min_exp > 0 /* ??? f_min_exp may be wrong. */
&& mantbits+iexp+17 == (int)sizeof(Number)*bits_per_byte) {
Vprintf("%sArithmetic probably doesn't use a hidden bit%s\n", co, oc);
Vprintf("%sIt's probably 80387 or 68881 extended real%s\n", co, oc);

View file

@ -815,7 +815,8 @@ round_push (size)
else
{
/* CEIL_DIV_EXPR needs to worry about the addition overflowing,
but we know it can't. So add ourselves and then do TRUNC_DIV_EXPR. */
but we know it can't. So add ourselves and then do
TRUNC_DIV_EXPR. */
size = expand_binop (Pmode, add_optab, size, GEN_INT (align - 1),
NULL_RTX, 1, OPTAB_LIB_WIDEN);
size = expand_divmod (0, TRUNC_DIV_EXPR, Pmode, size, GEN_INT (align),
@ -1117,7 +1118,8 @@ allocate_dynamic_stack_space (size, target, known_align)
if (MUST_ALIGN)
{
/* CEIL_DIV_EXPR needs to worry about the addition overflowing,
but we know it can't. So add ourselves and then do TRUNC_DIV_EXPR. */
but we know it can't. So add ourselves and then do
TRUNC_DIV_EXPR. */
target = expand_binop (Pmode, add_optab, target,
GEN_INT (BIGGEST_ALIGNMENT / BITS_PER_UNIT - 1),
NULL_RTX, 1, OPTAB_LIB_WIDEN);

View file

@ -1470,7 +1470,7 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
#ifdef SLOW_ZERO_EXTEND
/* Always generate an `and' if
we just zero-extended op0 and SLOW_ZERO_EXTEND, since it
will combine fruitfully with the zero-extend. */
will combine fruitfully with the zero-extend. */
|| tmode != mode
#endif
#endif
@ -2474,7 +2474,7 @@ invert_mod2n (x, n)
unsigned HOST_WIDE_INT x;
int n;
{
/* Solve x*y == 1 (mod 2^n), where x is odd. Return y. */
/* Solve x*y == 1 (mod 2^n), where x is odd. Return y. */
/* The algorithm notes that the choice y = x satisfies
x*y == 1 mod 2^3, since x is assumed odd.
@ -3909,7 +3909,7 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
/* For some comparisons with 1 and -1, we can convert this to
comparisons with zero. This will often produce more opportunities for
store-flag insns. */
store-flag insns. */
switch (code)
{

View file

@ -239,7 +239,7 @@ enum insn_code movstr_optab[NUM_MACHINE_MODES];
/* This array records the insn_code of insns to perform block clears. */
enum insn_code clrstr_optab[NUM_MACHINE_MODES];
/* SLOW_UNALIGNED_ACCESS is non-zero if unaligned accesses are very slow. */
/* SLOW_UNALIGNED_ACCESS is non-zero if unaligned accesses are very slow. */
#ifndef SLOW_UNALIGNED_ACCESS
#define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT
@ -253,13 +253,14 @@ enum insn_code clrstr_optab[NUM_MACHINE_MODES];
#define OUTGOING_REGNO(IN) (IN)
#endif
/* Maps used to convert modes to const, load, and store bytecodes. */
/* Maps used to convert modes to const, load, and store bytecodes. */
enum bytecode_opcode mode_to_const_map[MAX_MACHINE_MODE];
enum bytecode_opcode mode_to_load_map[MAX_MACHINE_MODE];
enum bytecode_opcode mode_to_store_map[MAX_MACHINE_MODE];
/* Initialize maps used to convert modes to const, load, and store
bytecodes. */
bytecodes. */
void
bc_init_mode_to_opcode_maps ()
{
@ -2807,7 +2808,7 @@ expand_assignment (to, from, want_value, suggest_reg)
dest_innermost = bc_expand_address (to);
/* Can't deduce from TYPE that we're dealing with a bitfield, so
take care of it here. */
take care of it here. */
bc_store_memory (TREE_TYPE (to), dest_innermost);
return NULL;
@ -3375,7 +3376,7 @@ mostly_zeros_p (exp)
so the statistic will be somewhat inaccurate.
We do make a more accurate count in store_constructor itself,
so since this function is only used for nested array elements,
this should be close enough. */
this should be close enough. */
if (mostly_zeros_p (TREE_VALUE (elt)))
zeros++;
elts++;
@ -3427,7 +3428,7 @@ store_constructor_field (target, bitsize, bitpos,
/* Store the value of constructor EXP into the rtx TARGET.
TARGET is either a REG or a MEM.
CLEARED is true if TARGET is known to have been zero'd. */
CLEARED is true if TARGET is known to have been zero'd. */
static void
store_constructor (exp, target, cleared)
@ -3611,7 +3612,7 @@ store_constructor (exp, target, cleared)
zero_count += this_node_count;
}
/* Clear the entire array first if there are any missing elements,
or if the incidence of zero elements is >= 75%. */
or if the incidence of zero elements is >= 75%. */
if (count < maxelt - minelt + 1
|| 4 * zero_count >= 3 * count)
need_to_clear = 1;
@ -3658,7 +3659,7 @@ store_constructor (exp, target, cleared)
HOST_WIDE_INT lo, hi, count;
tree position;
/* If the range is constant and "small", unroll the loop. */
/* If the range is constant and "small", unroll the loop. */
if (TREE_CODE (lo_index) == INTEGER_CST
&& TREE_CODE (hi_index) == INTEGER_CST
&& (lo = TREE_INT_CST_LOW (lo_index),
@ -3695,14 +3696,15 @@ store_constructor (exp, target, cleared)
if (TREE_CODE (value) == SAVE_EXPR
&& SAVE_EXPR_RTL (value) == 0)
{
/* Make sure value gets expanded once before the loop. */
/* Make sure value gets expanded once before the
loop. */
expand_expr (value, const0_rtx, VOIDmode, 0);
emit_queue ();
}
store_expr (lo_index, index_r, 0);
loop = expand_start_loop (0);
/* Assign value to element index. */
/* Assign value to element index. */
position = size_binop (EXACT_DIV_EXPR, TYPE_SIZE (elttype),
size_int (BITS_PER_UNIT));
position = size_binop (MULT_EXPR,
@ -3783,9 +3785,9 @@ store_constructor (exp, target, cleared)
probably better to set it using memset (if available) or bzero.
Also, if a large set has just a single range, it may also be
better to first clear all the first clear the set (using
bzero/memset), and set the bits we want. */
bzero/memset), and set the bits we want. */
/* Check for all zeros. */
/* Check for all zeros. */
if (elt == NULL_TREE)
{
if (!cleared)
@ -3812,11 +3814,11 @@ store_constructor (exp, target, cleared)
{
int set_word_size = TYPE_ALIGN (TREE_TYPE (exp));
enum machine_mode mode = mode_for_size (set_word_size, MODE_INT, 1);
char *bit_buffer = (char*) alloca (nbits);
char *bit_buffer = (char *) alloca (nbits);
HOST_WIDE_INT word = 0;
int bit_pos = 0;
int ibit = 0;
int offset = 0; /* In bytes from beginning of set. */
int offset = 0; /* In bytes from beginning of set. */
elt = get_set_constructor_bits (exp, bit_buffer, nbits);
for (;;)
{
@ -3834,8 +3836,9 @@ store_constructor (exp, target, cleared)
{
rtx datum = GEN_INT (word);
rtx to_rtx;
/* The assumption here is that it is safe to use XEXP if
the set is multi-word, but not if it's single-word. */
/* The assumption here is that it is safe to use
XEXP if the set is multi-word, but not if
it's single-word. */
if (GET_CODE (target) == MEM)
{
to_rtx = plus_constant (XEXP (target, 0), offset);
@ -3857,7 +3860,7 @@ store_constructor (exp, target, cleared)
}
else if (!cleared)
{
/* Don't bother clearing storage if the set is all ones. */
/* Don't bother clearing storage if the set is all ones. */
if (TREE_CHAIN (elt) != NULL_TREE
|| (TREE_PURPOSE (elt) == NULL_TREE
? nbits != 1
@ -3915,7 +3918,7 @@ store_constructor (exp, target, cleared)
#ifdef TARGET_MEM_FUNCTIONS
/* Optimization: If startbit and endbit are
constants divisible by BITS_PER_UNIT,
call memset instead. */
call memset instead. */
if (TREE_CODE (startbit) == INTEGER_CST
&& TREE_CODE (endbit) == INTEGER_CST
&& (startb = TREE_INT_CST_LOW (startbit)) % BITS_PER_UNIT == 0
@ -4580,7 +4583,7 @@ safe_from_p (x, exp)
return safe_from_p (x, TREE_OPERAND (exp, 1));
case METHOD_CALL_EXPR:
/* This takes a rtx argument, but shouldn't appear here. */
/* This takes a rtx argument, but shouldn't appear here. */
abort ();
}
@ -4747,7 +4750,7 @@ expand_expr (exp, target, tmode, modifier)
else if ((code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR)
&& ! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1)))
/* If the second operand has no side effects, just evaluate
the first. */
the first. */
return expand_expr (TREE_OPERAND (exp, 0), const0_rtx,
VOIDmode, modifier);
@ -4798,7 +4801,7 @@ expand_expr (exp, target, tmode, modifier)
return CONST0_RTX (mode);
}
/* ... fall through ... */
/* ... fall through ... */
case VAR_DECL:
/* If a static var's type was incomplete when the decl was written,
@ -4813,7 +4816,7 @@ expand_expr (exp, target, tmode, modifier)
pop_obstacks ();
}
/* ... fall through ... */
/* ... fall through ... */
case FUNCTION_DECL:
case RESULT_DECL:
@ -5017,7 +5020,7 @@ expand_expr (exp, target, tmode, modifier)
/* If the mode of SAVE_EXPR_RTL does not match that of the expression, it
must be a promoted value. We return a SUBREG of the wanted mode,
but mark it so that we know that it was already extended. */
but mark it so that we know that it was already extended. */
if (GET_CODE (SAVE_EXPR_RTL (exp)) == REG
&& GET_MODE (SAVE_EXPR_RTL (exp)) != mode)
@ -5282,7 +5285,7 @@ expand_expr (exp, target, tmode, modifier)
for any array for which this case will be reached. */
/* Don't forget the const or volatile flag from the array
element. */
element. */
tree variant_type = build_type_variant (type,
TREE_READONLY (exp),
TREE_THIS_VOLATILE (exp));
@ -5811,7 +5814,8 @@ expand_expr (exp, target, tmode, modifier)
return target;
case PLUS_EXPR:
/* We come here from MINUS_EXPR when the second operand is a constant. */
/* We come here from MINUS_EXPR when the second operand is a
constant. */
plus_expr:
this_optab = add_optab;
@ -6330,7 +6334,7 @@ expand_expr (exp, target, tmode, modifier)
if (temp != 0)
return temp;
/* For foo != 0, load foo, and if it is nonzero load 1 instead. */
/* For foo != 0, load foo, and if it is nonzero load 1 instead. */
if (code == NE_EXPR && integer_zerop (TREE_OPERAND (exp, 1))
&& original_target
&& GET_CODE (original_target) == REG
@ -6404,7 +6408,7 @@ expand_expr (exp, target, tmode, modifier)
/* Used to save a pointer to the place to put the setting of
the flag that indicates if this side of the conditional was
taken. We backpatch the code, if we find out later that we
have any conditional cleanups that need to be performed. */
have any conditional cleanups that need to be performed. */
rtx dest_right_flag = NULL_RTX;
rtx dest_left_flag = NULL_RTX;
@ -6556,7 +6560,7 @@ expand_expr (exp, target, tmode, modifier)
else
jumpifnot (TREE_OPERAND (exp, 0), op0);
/* Allows cleanups up to here. */
/* Allows cleanups up to here. */
old_cleanups = cleanups_this_call;
if (binary_op && temp == 0)
/* Just touch the other operand. */
@ -6602,7 +6606,7 @@ expand_expr (exp, target, tmode, modifier)
dest_left_flag = get_last_insn ();
jumpifnot (TREE_OPERAND (exp, 0), op0);
/* Allows cleanups up to here. */
/* Allows cleanups up to here. */
old_cleanups = cleanups_this_call;
store_expr (TREE_OPERAND (exp, 1), temp, 0);
op1 = op0;
@ -6627,7 +6631,7 @@ expand_expr (exp, target, tmode, modifier)
dest_left_flag = get_last_insn ();
jumpif (TREE_OPERAND (exp, 0), op0);
/* Allows cleanups up to here. */
/* Allows cleanups up to here. */
old_cleanups = cleanups_this_call;
store_expr (TREE_OPERAND (exp, 2), temp, 0);
op1 = op0;
@ -6647,7 +6651,7 @@ expand_expr (exp, target, tmode, modifier)
dest_left_flag = get_last_insn ();
jumpifnot (TREE_OPERAND (exp, 0), op0);
/* Allows cleanups up to here. */
/* Allows cleanups up to here. */
old_cleanups = cleanups_this_call;
store_expr (TREE_OPERAND (exp, 1), temp, 0);
op1 = op0;
@ -6658,7 +6662,7 @@ expand_expr (exp, target, tmode, modifier)
op1 = gen_label_rtx ();
jumpifnot (TREE_OPERAND (exp, 0), op0);
/* Allows cleanups up to here. */
/* Allows cleanups up to here. */
old_cleanups = cleanups_this_call;
if (temp != 0)
store_expr (TREE_OPERAND (exp, 1), temp, 0);
@ -6667,7 +6671,7 @@ expand_expr (exp, target, tmode, modifier)
ignore ? const0_rtx : NULL_RTX, VOIDmode, 0);
dest_left_flag = get_last_insn ();
/* Handle conditional cleanups, if any. */
/* Handle conditional cleanups, if any. */
left_cleanups = defer_cleanups_to (old_cleanups);
emit_queue ();
@ -6682,14 +6686,14 @@ expand_expr (exp, target, tmode, modifier)
dest_right_flag = get_last_insn ();
}
/* Handle conditional cleanups, if any. */
/* Handle conditional cleanups, if any. */
right_cleanups = defer_cleanups_to (old_cleanups);
emit_queue ();
emit_label (op1);
OK_DEFER_POP;
/* Add back in, any conditional cleanups. */
/* Add back in, any conditional cleanups. */
if (left_cleanups || right_cleanups)
{
tree new_cleanups;
@ -6697,18 +6701,18 @@ expand_expr (exp, target, tmode, modifier)
rtx last;
/* Now that we know that a flag is needed, go back and add in the
setting of the flag. */
setting of the flag. */
/* Do the left side flag. */
/* Do the left side flag. */
last = get_last_insn ();
/* Flag left cleanups as needed. */
/* Flag left cleanups as needed. */
emit_move_insn (flag, const1_rtx);
/* ??? deprecated, use sequences instead. */
reorder_insns (NEXT_INSN (last), get_last_insn (), dest_left_flag);
/* Do the right side flag. */
/* Do the right side flag. */
last = get_last_insn ();
/* Flag left cleanups as needed. */
/* Flag left cleanups as needed. */
emit_move_insn (flag, const0_rtx);
/* ??? deprecated, use sequences instead. */
reorder_insns (NEXT_INSN (last), get_last_insn (), dest_right_flag);
@ -6717,7 +6721,7 @@ expand_expr (exp, target, tmode, modifier)
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */
/* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
RTL_EXPR_RTL (cond) = flag;
@ -6932,7 +6936,7 @@ expand_expr (exp, target, tmode, modifier)
case ADDR_EXPR:
/* If nonzero, TEMP will be set to the address of something that might
be a MEM corresponding to a stack slot. */
be a MEM corresponding to a stack slot. */
temp = 0;
/* Are we taking the address of a nested function? */
@ -6982,7 +6986,7 @@ expand_expr (exp, target, tmode, modifier)
|| GET_CODE (op0) == CONCAT)
{
/* If this object is in a register, it must be not
be BLKmode. */
be BLKmode. */
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
rtx memloc = assign_temp (inner_type, 1, 1, 1);
@ -7138,7 +7142,8 @@ expand_expr (exp, target, tmode, modifier)
}
/* Emit bytecode to evaluate the given expression EXP to the stack. */
/* Emit bytecode to evaluate the given expression EXP to the stack. */
void
bc_expand_expr (exp)
tree exp;
@ -7253,7 +7258,7 @@ bc_expand_expr (exp)
/* Allocate a location for the return value and push its
address on the evaluation stack. Also make an entry
at the front of the calldesc for the return value type. */
at the front of the calldesc for the return value type. */
type = TREE_TYPE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))));
retval = bc_allocate_local (int_size_in_bytes (type), TYPE_ALIGN (type));
@ -7274,7 +7279,7 @@ bc_expand_expr (exp)
r = output_constant_def (calldesc);
bc_load_externaddr (r);
/* Push the address of the function to be called. */
/* Push the address of the function to be called. */
bc_expand_expr (TREE_OPERAND (exp, 0));
/* Call the function, popping its address and the calldesc vector
@ -7910,7 +7915,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
case BUILT_IN_SIN:
case BUILT_IN_COS:
/* Treat these like sqrt, but only if the user asks for them. */
/* Treat these like sqrt, but only if the user asks for them. */
if (! flag_fast_math)
break;
case BUILT_IN_FSQRT:
@ -7996,7 +8001,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
}
#else
/* We can't set errno=EDOM directly; let the library call do it.
Pop the arguments right away in case the call gets deleted. */
Pop the arguments right away in case the call gets deleted. */
NO_DEFER_POP;
expand_call (exp, target, 0);
OK_DEFER_POP;
@ -8005,7 +8010,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
emit_label (lab1);
}
/* Output the entire sequence. */
/* Output the entire sequence. */
insns = get_insns ();
end_sequence ();
emit_insns (insns);
@ -8385,15 +8390,15 @@ expand_builtin (exp, target, subtarget, mode, ignore)
enum machine_mode insn_mode = value_mode, char_mode;
enum insn_code icode;
/* If the length is known, just return it. */
/* If the length is known, just return it. */
if (len != 0)
return expand_expr (len, target, mode, 0);
/* If SRC is not a pointer type, don't do this operation inline. */
/* If SRC is not a pointer type, don't do this operation inline. */
if (align == 0)
break;
/* Call a function if we can't compute strlen in the right mode. */
/* Call a function if we can't compute strlen in the right mode. */
while (insn_mode != VOIDmode)
{
@ -8973,12 +8978,12 @@ static enum machine_mode apply_result_mode[FIRST_PSEUDO_REGISTER];
/* For each register that may be used for calling a function, this
gives the offset of that register into the block returned by
__builtin_apply_args. 0 indicates that the register is not
used for calling a function. */
used for calling a function. */
static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER];
/* Return the offset of register REGNO into the block returned by
__builtin_apply_args. This is not declared static, since it is
needed in objc-act.c. */
needed in objc-act.c. */
int
apply_args_register_offset (regno)
@ -8987,7 +8992,7 @@ apply_args_register_offset (regno)
apply_args_size ();
/* Arguments are always put in outgoing registers (in the argument
block) if such make sense. */
block) if such make sense. */
#ifdef OUTGOING_REGNO
regno = OUTGOING_REGNO(regno);
#endif
@ -9958,11 +9963,11 @@ do_jump (exp, if_false_label, if_true_label)
tree new_cleanups;
tree cond;
/* Flag cleanups as not needed. */
/* Flag cleanups as not needed. */
emit_move_insn (flag, const0_rtx);
emit_insns (seq1);
/* Flag cleanups as needed. */
/* Flag cleanups as needed. */
emit_move_insn (flag, const1_rtx);
emit_insns (seq2);
@ -9970,7 +9975,7 @@ do_jump (exp, if_false_label, if_true_label)
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */
/* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
RTL_EXPR_RTL (cond) = flag;
@ -10022,11 +10027,11 @@ do_jump (exp, if_false_label, if_true_label)
tree new_cleanups;
tree cond;
/* Flag cleanups as not needed. */
/* Flag cleanups as not needed. */
emit_move_insn (flag, const0_rtx);
emit_insns (seq1);
/* Flag cleanups as needed. */
/* Flag cleanups as needed. */
emit_move_insn (flag, const1_rtx);
emit_insns (seq2);
@ -10034,7 +10039,7 @@ do_jump (exp, if_false_label, if_true_label)
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */
/* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
RTL_EXPR_RTL (cond) = flag;
@ -10661,7 +10666,7 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
#if 0
/* There's no need to do this now that combine.c can eliminate lots of
sign extensions. This can be less efficient in certain cases on other
machines. */
machines. */
/* If this is a signed equality comparison, we can do it as an
unsigned comparison since zero-extension is cheaper than sign
@ -11047,7 +11052,7 @@ do_tablejump (index, mode, range, table_label, default_label)
/* Emit a suitable bytecode to load a value from memory, assuming a pointer
to that value is on the top of the stack. The resulting type is TYPE, and
the source declaration is DECL. */
the source declaration is DECL. */
void
bc_load_memory (type, decl)
@ -11058,7 +11063,7 @@ bc_load_memory (type, decl)
/* Bit fields are special. We only know about signed and
unsigned ints, and enums. The latter are treated as
signed integers. */
signed integers. */
if (DECL_BIT_FIELD (decl))
if (TREE_CODE (type) == ENUMERAL_TYPE
@ -11067,7 +11072,7 @@ bc_load_memory (type, decl)
else
abort ();
else
/* See corresponding comment in bc_store_memory(). */
/* See corresponding comment in bc_store_memory(). */
if (TYPE_MODE (type) == BLKmode
|| TYPE_MODE (type) == VOIDmode)
return;
@ -11087,7 +11092,7 @@ bc_load_memory (type, decl)
/* Store the contents of the second stack slot to the address in the
top stack slot. DECL is the declaration of the destination and is used
to determine whether we're dealing with a bitfield. */
to determine whether we're dealing with a bitfield. */
void
bc_store_memory (type, decl)
@ -11113,7 +11118,7 @@ bc_store_memory (type, decl)
structure size in size units (usually bytes). The two first arguments
are already on the stack; so we just put the size on level 1. For some
other languages, the size may be variable, this is why we don't encode
it as a storeBLK literal, but rather treat it as a full-fledged expression. */
it as a storeBLK literal, but rather treat it as a full-fledged expression. */
bc_expand_expr (TYPE_SIZE (type));
opcode = storeBLK;
@ -11169,7 +11174,7 @@ bc_allocate_local (size, alignment)
/* Allocate variable-sized local array. Variable-sized arrays are
actually pointers to the address in memory where they are stored. */
actually pointers to the address in memory where they are stored. */
rtx
bc_allocate_variable_array (size)
@ -11192,6 +11197,7 @@ bc_allocate_variable_array (size)
/* Push the machine address for the given external variable offset. */
void
bc_load_externaddr (externaddr)
rtx externaddr;
@ -11207,6 +11213,7 @@ bc_load_externaddr (externaddr)
/* Like above, but expects an IDENTIFIER. */
void
bc_load_externaddr_id (id, offset)
tree id;
@ -11225,6 +11232,7 @@ bc_load_externaddr_id (id, offset)
/* Push the machine address for the given local variable offset. */
void
bc_load_localaddr (localaddr)
rtx localaddr;
@ -11234,7 +11242,8 @@ bc_load_localaddr (localaddr)
/* Push the machine address for the given parameter offset.
NOTE: offset is in bits. */
NOTE: offset is in bits. */
void
bc_load_parmaddr (parmaddr)
rtx parmaddr;
@ -11245,6 +11254,7 @@ bc_load_parmaddr (parmaddr)
/* Convert a[i] into *(a + i). */
tree
bc_canonicalize_array_ref (exp)
tree exp;
@ -11280,7 +11290,7 @@ bc_canonicalize_array_ref (exp)
/* Load the address of the component referenced by the given
COMPONENT_REF expression.
Returns innermost lvalue. */
Returns innermost lvalue. */
tree
bc_expand_component_address (exp)
@ -11330,6 +11340,7 @@ bc_expand_component_address (exp)
/* Emit code to push two SI constants */
void
bc_push_offset_and_size (offset, size)
HOST_WIDE_INT offset, size;
@ -11343,7 +11354,7 @@ bc_push_offset_and_size (offset, size)
the stack. If it's a bit field, we also push offset and size info.
Returns innermost component, which allows us to determine not only
its type, but also whether it's a bitfield. */
its type, but also whether it's a bitfield. */
tree
bc_expand_address (exp)
@ -11370,7 +11381,7 @@ bc_expand_address (exp)
/* For variable-sized types: retrieve pointer. Sometimes the
TYPE_SIZE tree is NULL. Is this a bug or a feature? Let's
also make sure we have an operand, just in case... */
also make sure we have an operand, just in case... */
if (TREE_OPERAND (exp, 0)
&& TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 0)))
@ -11457,7 +11468,7 @@ bc_expand_address (exp)
break;
}
/* Most lvalues don't have components. */
/* Most lvalues don't have components. */
return (exp);
}
@ -11499,6 +11510,7 @@ bc_runtime_type_code (type)
/* Generate constructor label */
char *
bc_gen_constr_label ()
{
@ -11516,7 +11528,7 @@ bc_gen_constr_label ()
The pointer is put in the pointer table and is retrieved by a constP
bytecode instruction. We then loop and store each constructor member in
the corresponding component. Finally, we return the original pointer on
the stack. */
the stack. */
void
bc_expand_constructor (constr)
@ -11529,7 +11541,7 @@ bc_expand_constructor (constr)
/* Literal constructors are handled as constants, whereas
non-literals are evaluated and stored element by element
into the data segment. */
into the data segment. */
/* Allocate space in proper segment and push pointer to space on stack.
*/
@ -11554,18 +11566,18 @@ bc_expand_constructor (constr)
/* Add reference to pointer table and recall pointer to stack;
this code is common for both types of constructors: literals
and non-literals. */
and non-literals. */
ptroffs = bc_define_pointer (l);
bc_emit_instruction (constP, ptroffs);
/* This is all that has to be done if it's a literal. */
/* This is all that has to be done if it's a literal. */
if (TREE_CONSTANT (constr))
return;
/* At this point, we have the pointer to the structure on top of the stack.
Generate sequences of store_memory calls for the constructor. */
Generate sequences of store_memory calls for the constructor. */
/* constructor type is structure */
if (TREE_CODE (TREE_TYPE (constr)) == RECORD_TYPE)
@ -11632,7 +11644,7 @@ bc_expand_constructor (constr)
/* Store each element of the constructor into the corresponding
element of TARGET, determined by counting the elements. */
element of TARGET, determined by counting the elements. */
for (elt = CONSTRUCTOR_ELTS (constr), i = 0;
elt;
@ -11712,6 +11724,7 @@ bc_store_field (field, bitsize, bitpos, mode, exp, type,
/* Store SI/SU in bitfield */
void
bc_store_bit_field (offset, size, unsignedp)
int offset, size, unsignedp;
@ -11725,6 +11738,7 @@ bc_store_bit_field (offset, size, unsignedp)
/* Load SI/SU from bitfield */
void
bc_load_bit_field (offset, size, unsignedp)
int offset, size, unsignedp;
@ -11740,7 +11754,7 @@ bc_load_bit_field (offset, size, unsignedp)
/* Adjust interpreter stack by NLEVELS. Positive means drop NLEVELS
(adjust stack pointer upwards), negative means add that number of
levels (adjust the stack pointer downwards). Only positive values
normally make sense. */
normally make sense. */
void
bc_adjust_stack (nlevels)

View file

@ -628,12 +628,12 @@ extern void emit_group_load PROTO((rtx, rtx));
extern void emit_group_store PROTO((rtx, rtx));
/* Mark REG as holding a parameter for the next CALL_INSN. */
extern void use_reg PROTO((rtx*, rtx));
extern void use_reg PROTO((rtx *, rtx));
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the next CALL_INSN. */
extern void use_regs PROTO((rtx*, int, int));
extern void use_regs PROTO((rtx *, int, int));
/* Mark a PARALLEL as holding a parameter for the next CALL_INSN. */
extern void use_group_regs PROTO((rtx*, rtx));
extern void use_group_regs PROTO((rtx *, rtx));
/* Write zeros through the storage of OBJECT.
If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is its

View file

@ -338,7 +338,7 @@ end_final (filename)
7: address of table of function names (LPBX4).
8: address of table of line numbers (LPBX5) or 0.
9: address of table of file names (LPBX6) or 0.
10: space reserved for basic block profiling. */
10: space reserved for basic block profiling. */
ASM_OUTPUT_ALIGN (asm_out_file, align);
@ -709,7 +709,7 @@ shorten_branches (first)
#endif
/* Inside a delay slot sequence, we do not do any branch shortening
if the shortening could change the number of delay slots
of the branch. */
of the branch. */
for (i = 0; i < XVECLEN (body, 0); i++)
{
rtx inner_insn = XVECEXP (body, 0, i);
@ -897,7 +897,7 @@ final_start_function (first, file, optimize)
/* For SDB and XCOFF, the function beginning must be marked between
the function label and the prologue. We always need this, even when
-g1 was used. Defer on MIPS systems so that parameter descriptions
follow function entry. */
follow function entry. */
#if defined(SDB_DEBUGGING_INFO) && !defined(MIPS_DEBUGGING_INFO)
if (write_symbols == SDB_DEBUG)
sdbout_begin_function (last_linenum);
@ -1152,7 +1152,7 @@ add_bb_string (string, perm_p)
string = p;
}
else
for (ptr = sbb_head; ptr != (struct bb_str *)0; ptr = ptr->next)
for (ptr = sbb_head; ptr != (struct bb_str *) 0; ptr = ptr->next)
if (ptr->string == string)
break;
@ -1321,7 +1321,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
{
#if defined(SDB_DEBUGGING_INFO) && defined(MIPS_DEBUGGING_INFO)
/* MIPS stabs require the parameter descriptions to be after the
function entry point rather than before. */
function entry point rather than before. */
if (write_symbols == SDB_DEBUG)
sdbout_begin_function (last_linenum);
else
@ -2768,8 +2768,8 @@ asm_fprintf VPROTO((FILE *file, char *p, ...))
VA_START (argptr, p);
#ifndef __STDC__
file = va_arg (argptr, FILE*);
p = va_arg (argptr, char*);
file = va_arg (argptr, FILE *);
p = va_arg (argptr, char *);
#endif
buf[0] = '%';
@ -2991,7 +2991,7 @@ split_double (value, first, second)
/* Note, this converts the REAL_VALUE_TYPE to the target's
format, splits up the floating point double and outputs
exactly 32 bits of it into each of l[0] and l[1] --
not necessarily BITS_PER_WORD bits. */
not necessarily BITS_PER_WORD bits. */
REAL_VALUE_TO_TARGET_DOUBLE (r, l);
*first = GEN_INT ((HOST_WIDE_INT) l[0]);

View file

@ -68,7 +68,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
if anything needs to be done. (e.g. ./include/stdio.h)
* OPTIONS are such as you would pass to cpp.
Written by Per Bothner <bothner@cygnus.com>, July 1993. */
Written by Per Bothner <bothner@cygnus.com>, July 1993. */
#include <stdio.h>
#include <ctype.h>
@ -105,7 +105,7 @@ int missing_extern_C_count = 0;
#include "xsys-protos.h"
#ifdef FIXPROTO_IGNORE_LIST
/* This is a currently unused feature. */
/* This is a currently unused feature. */
/* List of files and directories to ignore.
A directory name (ending in '/') means ignore anything in that
@ -135,23 +135,23 @@ enum special_file
};
/* A NAMELIST is a sequence of names, separated by '\0', and terminated
by an empty name (i.e. by "\0\0"). */
by an empty name (i.e. by "\0\0"). */
typedef const char* namelist;
typedef const char *namelist;
/* The following macros provide the bits for symbol_flags. */
/* The following macros provide the bits for symbol_flags. */
typedef int symbol_flags;
/* Used to mark names defined in the ANSI/ISO C standard. */
/* Used to mark names defined in the ANSI/ISO C standard. */
#define ANSI_SYMBOL 1
/* Used to mark names defined in the Posix.1 or Posix.2 standard. */
/* Used to mark names defined in the Posix.1 or Posix.2 standard. */
#define POSIX1_SYMBOL 2
#define POSIX2_SYMBOL 4
/* Used to mark names defined in X/Open Portability Guide. */
/* Used to mark names defined in X/Open Portability Guide. */
#define XOPEN_SYMBOL 8
/* Used to mark names defined in X/Open UNIX Extensions. */
/* Used to mark names defined in X/Open UNIX Extensions. */
#define XOPEN_EXTENDED_SYMBOL 16
/* Used to indicate names that are not functions */
@ -176,7 +176,7 @@ add_symbols (flags, names)
cur_symbol_table_size++;
if (cur_symbol_table_size >= SYMBOL_TABLE_SIZE)
fatal ("too many calls to add_symbols");
symbol_table[cur_symbol_table_size].names = NULL; /* Termination. */
symbol_table[cur_symbol_table_size].names = NULL; /* Termination. */
}
struct std_include_entry {
@ -185,9 +185,9 @@ struct std_include_entry {
namelist names;
};
const char NONE[] = ""; /* The empty namelist. */
const char NONE[] = ""; /* The empty namelist. */
/* Special name to indicate a continuation line in std_include_table. */
/* Special name to indicate a continuation line in std_include_table. */
const char CONTINUED[] = "";
struct std_include_entry *include_entry;
@ -201,7 +201,7 @@ isprint\0ispunct\0isspace\0isupper\0isxdigit\0tolower\0toupper\0" },
{ "errno.h", ANSI_SYMBOL|MACRO_SYMBOL, "errno\0" },
/* ANSI_SYMBOL is wrong, but ... */
/* ANSI_SYMBOL is wrong, but ... */
{ "curses.h", ANSI_SYMBOL, "box\0delwin\0endwin\0getcurx\0getcury\0initscr\0\
mvcur\0mvwprintw\0mvwscanw\0newwin\0overlay\0overwrite\0\
scroll\0subwin\0touchwin\0waddstr\0wclear\0wclrtobot\0wclrtoeol\0\
@ -226,14 +226,14 @@ tan\0tanh\0" },
{ "pwd.h", POSIX1_SYMBOL, "getpwnam\0getpwuid\0" },
/* Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. */
/* Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. */
{ "setjmp.h", ANSI_SYMBOL, "longjmp\0setjmp\0" },
/* Left out signal() - its prototype is too complex for us!
Also left out "sigaction sigaddset sigdelset sigemptyset
sigfillset sigismember sigpending sigprocmask sigsuspend"
because these need sigset_t or struct sigaction.
Most systems that provide them will also declare them. */
Most systems that provide them will also declare them. */
{ "signal.h", ANSI_SYMBOL, "kill\0raise\0" },
{ "stdio.h", ANSI_SYMBOL,
@ -244,7 +244,7 @@ printf\0putc\0putchar\0puts\0remove\0rename\0rewind\0scanf\0setbuf\0\
setvbuf\0sprintf\0sscanf\0vprintf\0vsprintf\0vfprintf\0tmpfile\0\
tmpnam\0ungetc\0" },
{ CONTINUED, POSIX1_SYMBOL, "fdopen\0fileno\0" },
{ CONTINUED, POSIX2_SYMBOL, "pclose\0popen\0" }, /* I think ... */
{ CONTINUED, POSIX2_SYMBOL, "pclose\0popen\0" }, /* I think ... */
/* Should perhaps also handle NULL, EOF, ... ? */
/* "div ldiv", - ignored because these depend on div_t, ldiv_t
@ -270,7 +270,7 @@ strtok\0strxfrm\0" },
/* Actually, XPG4 does not seem to have <sys/ioctl.h>, but defines
ioctl in <strops.h>. However, many systems have it is sys/ioctl.h,
and many systems do have <sys/ioctl.h> but not <strops.h>. */
and many systems do have <sys/ioctl.h> but not <strops.h>. */
{ "sys/ioctl.h", XOPEN_EXTENDED_SYMBOL, "ioctl\0" },
{ "sys/socket.h", XOPEN_EXTENDED_SYMBOL, "socket\0" },
@ -324,7 +324,7 @@ ttyname\0unlink\0write\0" },
enum special_file special_file_handling = no_special;
/* They are set if the corresponding macro has been seen. */
/* They are set if the corresponding macro has been seen. */
/* The following are only used when handling sys/stat.h */
int seen_S_IFBLK = 0, seen_S_ISBLK = 0;
int seen_S_IFCHR = 0, seen_S_ISCHR = 0;
@ -337,7 +337,7 @@ int seen_errno = 0;
/* The following are only used when handling stdlib.h */
int seen_EXIT_FAILURE = 0, seen_EXIT_SUCCESS = 0;
/* Wrapper around free, to avoid prototype clashes. */
/* Wrapper around free, to avoid prototype clashes. */
void
xfree (ptr)
@ -361,6 +361,7 @@ fancy_abort ()
struct obstack scan_file_obstack;
/* NOTE: If you edit this, also edit gen-protos.c !! */
struct fn_decl *
lookup_std_proto (name, name_length)
const char *name;
@ -435,10 +436,10 @@ void
recognized_macro (fname)
char *fname;
{
/* The original include file defines fname as a macro. */
/* The original include file defines fname as a macro. */
struct fn_decl *fn = lookup_std_proto (fname, strlen (fname));
/* Since fname is a macro, don't require a prototype for it. */
/* Since fname is a macro, don't require a prototype for it. */
if (fn)
{
if (REQUIRED (fn))
@ -498,7 +499,7 @@ recognized_extern (name, name_length, type, type_length)
KIND is 'I' for an inline function;
'F' if a normal function declaration preceded by 'extern "C"'
(or nested inside 'extern "C"' braces); or
'f' for other function declarations. */
'f' for other function declarations. */
void
recognized_function (fname, fname_length,
@ -523,7 +524,7 @@ recognized_function (fname, fname_length,
fn = lookup_std_proto (fname, fname_length);
/* Remove the function from the list of required function. */
/* Remove the function from the list of required function. */
if (fn)
{
if (REQUIRED (fn))
@ -531,7 +532,7 @@ recognized_function (fname, fname_length,
SET_SEEN (fn);
}
/* If we have a full prototype, we're done. */
/* If we have a full prototype, we're done. */
if (have_arg_list)
return;
@ -539,7 +540,7 @@ recognized_function (fname, fname_length,
return;
/* If the partial prototype was included from some other file,
we don't need to patch it up (in this run). */
we don't need to patch it up (in this run). */
i = strlen (file_seen);
if (i < inc_filename_length
|| strcmp (inc_filename, file_seen + (i - inc_filename_length)) != 0)
@ -551,9 +552,9 @@ recognized_function (fname, fname_length,
return;
/* We only have a partial function declaration,
so remember that we have to add a complete prototype. */
so remember that we have to add a complete prototype. */
partial_count++;
partial = (struct partial_proto*)
partial = (struct partial_proto *)
obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
partial->fname = obstack_alloc (&scan_file_obstack, fname_length + 1);
bcopy (fname, partial->fname, fname_length);
@ -573,7 +574,7 @@ recognized_function (fname, fname_length,
}
/* For any name in NAMES that is defined as a macro,
call recognized_macro on it. */
call recognized_macro on it. */
void
check_macro_names (pfile, names)
@ -626,7 +627,7 @@ read_scan_file (in_fname, argc, argv)
exit (0);
/* Traditionally, getc and putc are defined in terms of _filbuf and _flsbuf.
If so, those functions are also required. */
If so, those functions are also required. */
if (special_file_handling == stdio_h
&& (fn = lookup_std_proto ("_filbuf", 7)) != NULL)
{
@ -636,13 +637,13 @@ read_scan_file (in_fname, argc, argv)
int old_written = CPP_WRITTEN (&scan_in);
int seen_filbuf = 0;
/* Scan the macro expansion of "getchar();". */
/* Scan the macro expansion of "getchar();". */
for (;;)
{
enum cpp_token token = cpp_get_token (&scan_in);
int length = CPP_WRITTEN (&scan_in) - old_written;
CPP_SET_WRITTEN (&scan_in, old_written);
if (token == CPP_EOF) /* Should not happen ... */
if (token == CPP_EOF) /* Should not happen ... */
break;
if (token == CPP_POP && CPP_BUFFER (&scan_in) == buf)
{
@ -660,7 +661,7 @@ read_scan_file (in_fname, argc, argv)
int need_flsbuf
= flsbuf_fn && !SEEN (flsbuf_fn) && !REQUIRED (flsbuf_fn);
/* Append "_filbuf" and/or "_flsbuf" to the required functions. */
/* Append "_filbuf" and/or "_flsbuf" to the required functions. */
if (need_filbuf + need_flsbuf)
{
char *new_list;
@ -723,7 +724,7 @@ write_rbrac ()
#endif
}
/* Now we print out prototypes for those functions that we haven't seen. */
/* Now we print out prototypes for those functions that we haven't seen. */
for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++)
{
int if_was_emitted = 0;
@ -854,7 +855,7 @@ xstrdup (str)
*/
#define INF_GET() (inf_ptr < inf_limit ? *(unsigned char*)inf_ptr++ : EOF)
#define INF_GET() (inf_ptr < inf_limit ? *(unsigned char *) inf_ptr++ : EOF)
#define INF_UNGET(c) ((c)!=EOF && inf_ptr--)
int
@ -894,7 +895,7 @@ inf_skip_spaces (c)
return c;
}
/* Read into STR from inf_buffer upto DELIM. */
/* Read into STR from inf_buffer upto DELIM. */
int
inf_read_upto (str, delim)
@ -938,7 +939,7 @@ inf_scan_ident (s, c)
/* Returns 1 if the file is correctly protected against multiple
inclusion, setting *ifndef_line to the line number of the initial #ifndef
and setting *endif_line to the final #endif.
Otherwise return 0. */
Otherwise return 0. */
int
check_protection (ifndef_line, endif_line)
@ -949,7 +950,7 @@ check_protection (ifndef_line, endif_line)
char *protect_name = NULL; /* Identifier following initial #ifndef */
int define_seen = 0;
/* Skip initial white space (including comments). */
/* Skip initial white space (including comments). */
for (;; lineno++)
{
c = inf_skip_spaces (' ');
@ -964,7 +965,7 @@ check_protection (ifndef_line, endif_line)
if (SSTRING_LENGTH (&buf) == 0 || strcmp (buf.base, "ifndef") != 0)
return 0;
/* So far so good: We've seen an initial #ifndef. */
/* So far so good: We've seen an initial #ifndef. */
*ifndef_line = lineno;
c = inf_scan_ident (&buf, inf_skip_spaces (c));
if (SSTRING_LENGTH (&buf) == 0 || c == EOF)
@ -1032,7 +1033,7 @@ check_protection (ifndef_line, endif_line)
if (!define_seen)
return 0;
*endif_line = lineno;
/* Skip final white space (including comments). */
/* Skip final white space (including comments). */
for (;;)
{
c = inf_skip_spaces (' ');
@ -1130,7 +1131,7 @@ main (argc, argv)
else
symbol_table[0].names = NULL;
/* Count and mark the prototypes required for this include file. */
/* Count and mark the prototypes required for this include file. */
for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++)
{
int name_len;
@ -1165,7 +1166,7 @@ main (argc, argv)
exit (-1);
}
inf_size = sbuf.st_size;
inf_buffer = (char*) xmalloc (inf_size + 2);
inf_buffer = (char *) xmalloc (inf_size + 2);
inf_buffer[inf_size] = '\n';
inf_buffer[inf_size + 1] = '\0';
inf_limit = inf_buffer + inf_size;
@ -1191,7 +1192,7 @@ main (argc, argv)
close (inf_fd);
/* If file doesn't end with '\n', add one. */
/* If file doesn't end with '\n', add one. */
if (inf_limit > inf_buffer && inf_limit[-1] != '\n')
inf_limit++;
@ -1218,7 +1219,7 @@ main (argc, argv)
rbrac_line = -1;
}
/* Reset input file. */
/* Reset input file. */
inf_ptr = inf_buffer;
lineno = 1;
@ -1242,7 +1243,7 @@ main (argc, argv)
fn = lookup_std_proto (buf.base, strlen (buf.base));
/* We only want to edit the declaration matching the one
seen by scan-decls, as there can be multiple
declarations, selected by #ifdef __STDC__ or whatever. */
declarations, selected by #ifdef __STDC__ or whatever. */
if (fn && fn->partial && fn->partial->line_seen == lineno)
{
c = inf_skip_spaces (' ');
@ -1285,7 +1286,7 @@ main (argc, argv)
}
/* Stub error functions. These replace cpperror.c,
because we want to suppress error messages. */
because we want to suppress error messages. */
void
cpp_file_line_for_message (pfile, filename, line, column)
@ -1308,6 +1309,7 @@ cpp_print_containing_files (pfile)
}
/* IS_ERROR is 2 for fatal error, 1 for error, 0 for warning */
void cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
int is_error;
cpp_reader *pfile;

View file

@ -315,6 +315,11 @@ extern int flag_pedantic_errors;
extern int flag_pic;
/* Nonzero means generate extra code for exception handling and enable
exception handling. */
extern int flag_exceptions;
/* Nonzero means don't place uninitialized global data in common storage
by default. */

838
gcc/floatlib.c Normal file
View file

@ -0,0 +1,838 @@
/*
** libgcc support for software floating point.
** Copyright (C) 1991 by Pipeline Associates, Inc. All rights reserved.
** Permission is granted to do *anything* you want with this file,
** commercial or otherwise, provided this message remains intact. So there!
** I would appreciate receiving any updates/patches/changes that anyone
** makes, and am willing to be the repository for said changes (am I
** making a big mistake?).
Warning! Only single-precision is actually implemented. This file
won't really be much use until double-precision is supported.
However, once that is done, this file might eventually become a
replacement for libgcc1.c. It might also make possible
cross-compilation for an IEEE target machine from a non-IEEE
host such as a VAX.
If you'd like to work on completing this, please talk to rms@gnu.ai.mit.edu.
**
** Pat Wood
** Pipeline Associates, Inc.
** pipeline!phw@motown.com or
** sun!pipeline!phw or
** uunet!motown!pipeline!phw
**
** 05/01/91 -- V1.0 -- first release to gcc mailing lists
** 05/04/91 -- V1.1 -- added float and double prototypes and return values
** -- fixed problems with adding and subtracting zero
** -- fixed rounding in truncdfsf2
** -- fixed SWAP define and tested on 386
*/
/*
** The following are routines that replace the libgcc soft floating point
** routines that are called automatically when -msoft-float is selected.
** The support single and double precision IEEE format, with provisions
** for byte-swapped machines (tested on 386). Some of the double-precision
** routines work at full precision, but most of the hard ones simply punt
** and call the single precision routines, producing a loss of accuracy.
** long long support is not assumed or included.
** Overall accuracy is close to IEEE (actually 68882) for single-precision
** arithmetic. I think there may still be a 1 in 1000 chance of a bit
** being rounded the wrong way during a multiply. I'm not fussy enough to
** bother with it, but if anyone is, knock yourself out.
**
** Efficiency has only been addressed where it was obvious that something
** would make a big difference. Anyone who wants to do this right for
** best speed should go in and rewrite in assembler.
**
** I have tested this only on a 68030 workstation and 386/ix integrated
** in with -msoft-float.
*/
/* the following deal with IEEE single-precision numbers */
#define D_PHANTOM_BIT 0x00100000
#define EXCESS 126
#define SIGNBIT 0x80000000
#define HIDDEN (1 << 23)
#define SIGN(fp) ((fp) & SIGNBIT)
#define EXP(fp) (((fp) >> 23) & 0xFF)
#define MANT(fp) (((fp) & 0x7FFFFF) | HIDDEN)
#define PACK(s,e,m) ((s) | ((e) << 23) | (m))
/* the following deal with IEEE double-precision numbers */
#define EXCESSD 1022
#define HIDDEND (1 << 20)
#define EXPD(fp) (((fp.l.upper) >> 20) & 0x7FF)
#define SIGND(fp) ((fp.l.upper) & SIGNBIT)
#define MANTD(fp) (((((fp.l.upper) & 0xFFFFF) | HIDDEND) << 10) | \
(fp.l.lower >> 22))
/* define SWAP for 386/960 reverse-byte-order brain-damaged CPUs */
union double_long
{
double d;
#ifdef SWAP
struct {
unsigned long lower;
long upper;
} l;
#else
struct {
long upper;
unsigned long lower;
} l;
#endif
};
union float_long
{
float f;
long l;
};
struct _ieee {
#ifdef SWAP
unsigned mantissa2 : 32;
unsigned mantissa1 : 20;
unsigned exponent : 11;
unsigned sign : 1;
#else
unsigned exponent : 11;
unsigned sign : 1;
unsigned mantissa2 : 32;
unsigned mantissa1 : 20;
#endif
};
union _doubleu {
double d;
struct _ieee ieee;
#ifdef SWAP
struct {
unsigned long lower;
long upper;
} l;
#else
struct {
long upper;
unsigned long lower;
} l;
#endif
};
/* add two floats */
float
__addsf3 (float a1, float a2)
{
register long mant1, mant2;
register union float_long fl1, fl2;
register int exp1, exp2;
int sign = 0;
fl1.f = a1;
fl2.f = a2;
/* check for zero args */
if (!fl1.l)
return (fl2.f);
if (!fl2.l)
return (fl1.f);
exp1 = EXP (fl1.l);
exp2 = EXP (fl2.l);
if (exp1 > exp2 + 25)
return (fl1.l);
if (exp2 > exp1 + 25)
return (fl2.l);
/* do everything in excess precision so's we can round later */
mant1 = MANT (fl1.l) << 6;
mant2 = MANT (fl2.l) << 6;
if (SIGN (fl1.l))
mant1 = -mant1;
if (SIGN (fl2.l))
mant2 = -mant2;
if (exp1 > exp2)
{
mant2 >>= exp1 - exp2;
}
else
{
mant1 >>= exp2 - exp1;
exp1 = exp2;
}
mant1 += mant2;
if (mant1 < 0)
{
mant1 = -mant1;
sign = SIGNBIT;
}
else if (!mant1)
return (0);
/* normalize up */
while (!(mant1 & 0xE0000000))
{
mant1 <<= 1;
exp1--;
}
/* normalize down? */
if (mant1 & (1 << 30))
{
mant1 >>= 1;
exp1++;
}
/* round to even */
mant1 += (mant1 & 0x40) ? 0x20 : 0x1F;
/* normalize down? */
if (mant1 & (1 << 30))
{
mant1 >>= 1;
exp1++;
}
/* lose extra precision */
mant1 >>= 6;
/* turn off hidden bit */
mant1 &= ~HIDDEN;
/* pack up and go home */
fl1.l = PACK (sign, exp1, mant1);
return (fl1.f);
}
/* subtract two floats */
float
__subsf3 (float a1, float a2)
{
register union float_long fl1, fl2;
fl1.f = a1;
fl2.f = a2;
/* check for zero args */
if (!fl2.l)
return (fl1.f);
if (!fl1.l)
return (-fl2.f);
/* twiddle sign bit and add */
fl2.l ^= SIGNBIT;
return __addsf3 (a1, fl2.f);
}
/* compare two floats */
long
__cmpsf2 (float a1, float a2)
{
register union float_long fl1, fl2;
fl1.f = a1;
fl2.f = a2;
if (SIGN (fl1.l) && SIGN (fl2.l))
{
fl1.l ^= SIGNBIT;
fl2.l ^= SIGNBIT;
}
if (fl1.l < fl2.l)
return (-1);
if (fl1.l > fl2.l)
return (1);
return (0);
}
/* multiply two floats */
float
__mulsf3 (float a1, float a2)
{
register union float_long fl1, fl2;
register unsigned long result;
register int exp;
int sign;
fl1.f = a1;
fl2.f = a2;
if (!fl1.l || !fl2.l)
return (0);
/* compute sign and exponent */
sign = SIGN (fl1.l) ^ SIGN (fl2.l);
exp = EXP (fl1.l) - EXCESS;
exp += EXP (fl2.l);
fl1.l = MANT (fl1.l);
fl2.l = MANT (fl2.l);
/* the multiply is done as one 16x16 multiply and two 16x8 multiples */
result = (fl1.l >> 8) * (fl2.l >> 8);
result += ((fl1.l & 0xFF) * (fl2.l >> 8)) >> 8;
result += ((fl2.l & 0xFF) * (fl1.l >> 8)) >> 8;
if (result & 0x80000000)
{
/* round */
result += 0x80;
result >>= 8;
}
else
{
/* round */
result += 0x40;
result >>= 7;
exp--;
}
result &= ~HIDDEN;
/* pack up and go home */
fl1.l = PACK (sign, exp, result);
return (fl1.f);
}
/* divide two floats */
float
__divsf3 (float a1, float a2)
{
register union float_long fl1, fl2;
register int result;
register int mask;
register int exp, sign;
fl1.f = a1;
fl2.f = a2;
/* subtract exponents */
exp = EXP (fl1.l) - EXP (fl2.l) + EXCESS;
/* compute sign */
sign = SIGN (fl1.l) ^ SIGN (fl2.l);
/* divide by zero??? */
if (!fl2.l)
/* return NaN or -NaN */
return (sign ? 0xFFFFFFFF : 0x7FFFFFFF);
/* numerator zero??? */
if (!fl1.l)
return (0);
/* now get mantissas */
fl1.l = MANT (fl1.l);
fl2.l = MANT (fl2.l);
/* this assures we have 25 bits of precision in the end */
if (fl1.l < fl2.l)
{
fl1.l <<= 1;
exp--;
}
/* now we perform repeated subtraction of fl2.l from fl1.l */
mask = 0x1000000;
result = 0;
while (mask)
{
if (fl1.l >= fl2.l)
{
result |= mask;
fl1.l -= fl2.l;
}
fl1.l <<= 1;
mask >>= 1;
}
/* round */
result += 1;
/* normalize down */
exp++;
result >>= 1;
result &= ~HIDDEN;
/* pack up and go home */
fl1.l = PACK (sign, exp, result);
return (fl1.f);
}
/* convert int to double */
double
__floatsidf (register long a1)
{
register int sign = 0, exp = 31 + EXCESSD;
union double_long dl;
if (!a1)
{
dl.l.upper = dl.l.lower = 0;
return (dl.d);
}
if (a1 < 0)
{
sign = SIGNBIT;
a1 = -a1;
}
while (a1 < 0x1000000)
{
a1 <<= 4;
exp -= 4;
}
while (a1 < 0x40000000)
{
a1 <<= 1;
exp--;
}
/* pack up and go home */
dl.l.upper = sign;
dl.l.upper |= exp << 20;
dl.l.upper |= (a1 >> 10) & ~HIDDEND;
dl.l.lower = a1 << 22;
return (dl.d);
}
/* negate a float */
float
__negsf2 (float a1)
{
register union float_long fl1;
fl1.f = a1;
if (!fl1.l)
return (0);
fl1.l ^= SIGNBIT;
return (fl1.f);
}
/* negate a double */
double
__negdf2 (double a1)
{
register union double_long dl1;
dl1.d = a1;
if (!dl1.l.upper && !dl1.l.lower)
return (dl1.d);
dl1.l.upper ^= SIGNBIT;
return (dl1.d);
}
/* convert float to double */
double
__extendsfdf2 (float a1)
{
register union float_long fl1;
register union double_long dl;
register int exp;
fl1.f = a1;
if (!fl1.l)
{
dl.l.upper = dl.l.lower = 0;
return (dl.d);
}
dl.l.upper = SIGN (fl1.l);
exp = EXP (fl1.l) - EXCESS + EXCESSD;
dl.l.upper |= exp << 20;
dl.l.upper |= (MANT (fl1.l) & ~HIDDEN) >> 3;
dl.l.lower = MANT (fl1.l) << 29;
return (dl.d);
}
/* convert double to float */
float
__truncdfsf2 (double a1)
{
register int exp;
register long mant;
register union float_long fl;
register union double_long dl1;
dl1.d = a1;
if (!dl1.l.upper && !dl1.l.lower)
return (0);
exp = EXPD (dl1) - EXCESSD + EXCESS;
/* shift double mantissa 6 bits so we can round */
mant = MANTD (dl1) >> 6;
/* now round and shift down */
mant += 1;
mant >>= 1;
/* did the round overflow? */
if (mant & 0xFF000000)
{
mant >>= 1;
exp++;
}
mant &= ~HIDDEN;
/* pack up and go home */
fl.l = PACK (SIGND (dl1), exp, mant);
return (fl.f);
}
/* compare two doubles */
long
__cmpdf2 (double a1, double a2)
{
register union double_long dl1, dl2;
dl1.d = a1;
dl2.d = a2;
if (SIGND (dl1) && SIGND (dl2))
{
dl1.l.upper ^= SIGNBIT;
dl2.l.upper ^= SIGNBIT;
}
if (dl1.l.upper < dl2.l.upper)
return (-1);
if (dl1.l.upper > dl2.l.upper)
return (1);
if (dl1.l.lower < dl2.l.lower)
return (-1);
if (dl1.l.lower > dl2.l.lower)
return (1);
return (0);
}
/* convert double to int */
long
__fixdfsi (double a1)
{
register union double_long dl1;
register int exp;
register long l;
dl1.d = a1;
if (!dl1.l.upper && !dl1.l.lower)
return (0);
exp = EXPD (dl1) - EXCESSD - 31;
l = MANTD (dl1);
if (exp > 0)
return (0x7FFFFFFF | SIGND (dl1)); /* largest integer */
/* shift down until exp = 0 or l = 0 */
if (exp < 0 && exp > -32 && l)
l >>= -exp;
else
return (0);
return (SIGND (dl1) ? -l : l);
}
/* convert double to unsigned int */
unsigned
long __fixunsdfsi (double a1)
{
register union double_long dl1;
register int exp;
register unsigned long l;
dl1.d = a1;
if (!dl1.l.upper && !dl1.l.lower)
return (0);
exp = EXPD (dl1) - EXCESSD - 32;
l = (((((dl1.l.upper) & 0xFFFFF) | HIDDEND) << 11) | (dl1.l.lower >> 21));
if (exp > 0)
return (0xFFFFFFFF); /* largest integer */
/* shift down until exp = 0 or l = 0 */
if (exp < 0 && exp > -32 && l)
l >>= -exp;
else
return (0);
return (l);
}
/* For now, the hard double-precision routines simply
punt and do it in single */
/* addtwo doubles */
double
__adddf3 (double a1, double a2)
{
return ((float) a1 + (float) a2);
}
/* subtract two doubles */
double
__subdf3 (double a1, double a2)
{
return ((float) a1 - (float) a2);
}
/* multiply two doubles */
double
__muldf3 (double a1, double a2)
{
return ((float) a1 * (float) a2);
}
/*
*
* Name: Barrett Richardson
* E-mail: barrett@iglou.com
* When: Thu Dec 15 10:31:11 EST 1994
*
* callable function:
*
* double __divdf3(double a1, double a2);
*
* Does software divide of a1 / a2.
*
* Based largely on __divsf3() in floatlib.c in the gcc
* distribution.
*
* Purpose: To be used in conjunction with the -msoft-float
* option of gcc. You should be able to tack it to the
* end of floatlib.c included in the gcc distribution,
* and delete the __divdf3() already there which just
* calls the single precision function (or may just
* use the floating point processor with some configurations).
*
* You may use this code for whatever your heart desires.
*/
/*
* Compare the the mantissas of two doubles.
* Each mantissa is in two longs.
*
* return 1 if x1's mantissa is greater than x2's
* -1 if x1's mantissa is less than x2's
* 0 if the two mantissa's are equal.
*
* The Mantissas won't fit into a 4 byte word, so they are
* broken up into two parts.
*
* This function is used internally by __divdf3()
*/
int
__dcmp (long x1m1, long x1m2, long x2m1, long x2m2)
{
if (x1m1 > x2m1)
return 1;
if (x1m1 < x2m1)
return -1;
/* If the first word in the two mantissas were equal check the second word */
if (x1m2 > x2m2)
return 1;
if (x1m2 < x2m2)
return -1;
return 0;
}
/* divide two doubles */
double
__divdf3 (double a1, double a2)
{
int sign,
exponent,
bit_bucket;
register unsigned long mantissa1,
mantissa2,
x1m1,
x1m2,
x2m1,
x2m2,
mask;
union _doubleu x1,
x2,
result;
x1.d = a1;
x2.d = a2;
exponent = x1.ieee.exponent - x2.ieee.exponent + EXCESSD;
sign = x1.ieee.sign ^ x2.ieee.sign;
x2.ieee.sign = 0; /* don't want the sign bit to affect any zero */
/* comparisons when checking for zero divide */
if (!x2.l.lower && !x2.l.upper) { /* check for zero divide */
result.l.lower = 0x0;
if (sign)
result.l.upper = 0xFFF00000; /* negative infinity */
else
result.l.upper = 0x7FF00000; /* positive infinity */
return result.d;
}
if (!x1.l.upper && !x1.l.lower) /* check for 0.0 numerator */
return (0.0);
x1m1 = x1.ieee.mantissa1 | D_PHANTOM_BIT; /* turn on phantom bit */
x1m2 = x1.ieee.mantissa2;
x2m1 = x2.ieee.mantissa1 | D_PHANTOM_BIT; /* turn on phantom bit */
x2m2 = x2.ieee.mantissa2;
if (__dcmp(x1m1,x1m2,x2m1,x2m2) < 0) {
/* if x1's mantissa is less than x2's shift it left one and decrement */
/* the exponent to accomodate the change in the mantissa */
x1m1 <<= 1; /* */
bit_bucket = x1m2 >> 31; /* Shift mantissa left one */
x1m1 |= bit_bucket; /* */
x1m2 <<= 1; /* */
exponent--;
}
mantissa1 = 0;
mantissa2 = 0;
/* Get the first part of the results mantissa using successive */
/* subtraction. */
mask = 0x00200000;
while (mask) {
if (__dcmp(x1m1,x1m2,x2m1,x2m2) >= 0) {
/* subtract x2's mantissa from x1's */
mantissa1 |= mask; /* turn on a bit in the result */
if (x2m2 > x1m2)
x1m1--;
x1m2 -= x2m2;
x1m1 -= x2m1;
}
x1m1 <<= 1; /* */
bit_bucket = x1m2 >> 31; /* Shift mantissa left one */
x1m1 |= bit_bucket; /* */
x1m2 <<= 1; /* */
mask >>= 1;
}
/* Get the second part of the results mantissa using successive */
/* subtraction. */
mask = 0x80000000;
while (mask) {
if (__dcmp(x1m1,x1m2,x2m1,x2m2) >= 0) {
/* subtract x2's mantissa from x1's */
mantissa2 |= mask; /* turn on a bit in the result */
if (x2m2 > x1m2)
x1m1--;
x1m2 -= x2m2;
x1m1 -= x2m1;
}
x1m1 <<= 1; /* */
bit_bucket = x1m2 >> 31; /* Shift mantissa left one */
x1m1 |= bit_bucket; /* */
x1m2 <<= 1; /* */
mask >>= 1;
}
/* round up by adding 1 to mantissa */
if (mantissa2 == 0xFFFFFFFF) { /* check for over flow */
/* spill if overflow */
mantissa2 = 0;
mantissa1++;
}
else
mantissa2++;
exponent++; /* increment exponent (mantissa must be shifted right */
/* also) */
/* shift mantissa right one and assume a phantom bit (which really gives */
/* 53 bits of precision in the mantissa) */
mantissa2 >>= 1;
bit_bucket = mantissa1 & 1;
mantissa2 |= (bit_bucket << 31);
mantissa1 >>= 1;
/* put all the info into the result */
result.ieee.exponent = exponent;
result.ieee.sign = sign;
result.ieee.mantissa1 = mantissa1;
result.ieee.mantissa2 = mantissa2;
return result.d;
}

View file

@ -154,7 +154,8 @@ int n_basic_blocks;
int max_regno;
/* Maximum number of SCRATCH rtx's used in any basic block of this function. */
/* Maximum number of SCRATCH rtx's used in any basic block of this
function. */
int max_scratch;
@ -327,7 +328,7 @@ flow_analysis (f, nregs, file)
#endif
/* Record which registers will be eliminated. We use this in
mark_used_regs. */
mark_used_regs. */
CLEAR_HARD_REG_SET (elim_reg_set);
@ -969,7 +970,7 @@ life_analysis (f, nregs)
/* Record which insns refer to any volatile memory
or for any reason can't be deleted just because they are dead stores.
Also, delete any insns that copy a register to itself. */
Also, delete any insns that copy a register to itself. */
for (insn = f; insn; insn = NEXT_INSN (insn))
{
@ -1300,7 +1301,7 @@ allocate_for_life_analysis ()
register regset tem;
regset_size = ((max_regno + REGSET_ELT_BITS - 1) / REGSET_ELT_BITS);
regset_bytes = regset_size * sizeof (*(regset)0);
regset_bytes = regset_size * sizeof (*(regset) 0);
reg_n_refs = (int *) oballoc (max_regno * sizeof (int));
bzero ((char *) reg_n_refs, max_regno * sizeof (int));
@ -1775,7 +1776,7 @@ insn_dead_p (x, needed, call_ok)
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* Make sure insns to set arg pointer are never deleted
(if the arg pointer isn't fixed, there will be a USE for
it, so we can treat it normally). */
it, so we can treat it normally). */
|| (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
#endif
|| (needed[offset] & bit) != 0)
@ -2430,7 +2431,7 @@ mark_used_regs (needed, live, x, final, insn)
return;
}
/* ... fall through ... */
/* ... fall through ... */
case REG:
/* See a register other than being set
@ -2720,7 +2721,7 @@ try_pre_increment_1 (insn)
if (y != 0
&& BLOCK_NUM (y) == BLOCK_NUM (insn)
/* Don't do this if the reg dies, or gets set in y; a standard addressing
mode would be better. */
mode would be better. */
&& ! dead_or_set_p (y, SET_DEST (x))
&& try_pre_increment (y, SET_DEST (PATTERN (insn)),
amount))

View file

@ -4626,7 +4626,7 @@ fold (expr)
/* For NE, we can only do this simplification if integer. */
if (! INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
break;
/* ... fall through ... */
/* ... fall through ... */
case GT_EXPR:
case LT_EXPR:
t = build_int_2 (0, 0);

View file

@ -60,7 +60,7 @@ Boston, MA 02111-1307, USA. */
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
must define both, or neither. */
must define both, or neither. */
#ifndef NAME__MAIN
#define NAME__MAIN "__main"
#define SYMBOL__MAIN __main
@ -153,7 +153,7 @@ int current_function_args_size;
int current_function_pretend_args_size;
/* # of bytes of outgoing arguments. If ACCUMULATE_OUTGOING_ARGS is
defined, the needed space is pushed by the prologue. */
defined, the needed space is pushed by the prologue. */
int current_function_outgoing_args_size;
@ -299,13 +299,6 @@ static int max_parm_reg;
if we discover that that parm must go in the stack. */
static rtx *parm_reg_stack_loc;
#if 0 /* Turned off because 0 seems to work just as well. */
/* Cleanup lists are required for binding levels regardless of whether
that binding level has cleanups or not. This node serves as the
cleanup list whenever an empty list is required. */
static tree empty_cleanup_list;
#endif
/* Nonzero once virtual register instantiation has been done.
assign_stack_local uses frame_pointer_rtx when this is nonzero. */
static int virtuals_instantiated;
@ -345,7 +338,7 @@ struct temp_slot
{
/* Points to next temporary slot. */
struct temp_slot *next;
/* The rtx to used to reference the slot. */
/* The rtx to used to reference the slot. */
rtx slot;
/* The rtx used to represent the address if not the address of the
slot above. May be an EXPR_LIST if multiple addresses exist. */
@ -941,7 +934,7 @@ assign_temp (type, keep, memory_required, dont_promote)
/* Unfortunately, we don't yet know how to allocate variable-sized
temporaries. However, sometimes we have a fixed upper limit on
the size (which is stored in TYPE_ARRAY_MAX_SIZE) and can use that
instead. This is the case for Chill variable-sized strings. */
instead. This is the case for Chill variable-sized strings. */
if (size == -1 && TREE_CODE (type) == ARRAY_TYPE
&& TYPE_ARRAY_MAX_SIZE (type) != NULL_TREE
&& TREE_CODE (TYPE_ARRAY_MAX_SIZE (type)) == INTEGER_CST)
@ -1465,7 +1458,7 @@ fixup_var_refs (var, promoted_mode, unsignedp)
/* REPLACEMENTS is a pointer to a list of the struct fixup_replacement and X is
some part of an insn. Return a struct fixup_replacement whose OLD
value is equal to X. Allocate a new structure if no such entry exists. */
value is equal to X. Allocate a new structure if no such entry exists. */
static struct fixup_replacement *
find_fixup_replacement (replacements, x)
@ -1919,7 +1912,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
}
/* If SET_DEST is now a paradoxical SUBREG, put the result of this
insn into a pseudo and store the low part of the pseudo into VAR. */
insn into a pseudo and store the low part of the pseudo into VAR. */
if (GET_CODE (SET_DEST (x)) == SUBREG
&& SUBREG_REG (SET_DEST (x)) == var
&& (GET_MODE_SIZE (GET_MODE (SET_DEST (x)))
@ -2191,7 +2184,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
If any insns must be emitted to compute NEWADDR, put them before INSN.
UNCRITICAL nonzero means accept paradoxical subregs.
This is used for subregs found inside REG_NOTES. */
This is used for subregs found inside REG_NOTES. */
static rtx
fixup_memory_subreg (x, insn, uncritical)
@ -2605,7 +2598,7 @@ instantiate_decls (fndecl, valid_only)
int_size_in_bytes (TREE_TYPE (decl)), valid_only);
}
/* Now process all variables defined in the function or its subblocks. */
/* Now process all variables defined in the function or its subblocks. */
instantiate_decls_1 (DECL_INITIAL (fndecl), valid_only);
if (DECL_INLINE (fndecl) || DECL_DEFER_OUTPUT (fndecl))
@ -2864,7 +2857,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
in the case of old offset equals new just changing the register
will yield a valid insn. In the interests of a little efficiency,
however, we only call validate change once (we don't queue up the
changes and then call apply_change_group). */
changes and then call apply_change_group). */
old = XEXP (x, 0);
if (offset == 0
@ -3287,7 +3280,7 @@ assign_parms (fndecl, second_time)
/* Nonzero if function takes extra anonymous args.
This means the last named arg must be on the stack
right before the anonymous ones. */
right before the anonymous ones. */
int stdarg
= (TYPE_ARG_TYPES (fntype) != 0
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
@ -3585,7 +3578,7 @@ assign_parms (fndecl, second_time)
FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode,
passed_type, ! last_named);
/* If this is our second time through, we are done with this parm. */
/* If this is our second time through, we are done with this parm. */
if (second_time)
continue;
@ -4802,7 +4795,7 @@ all_blocks (block, vector)
return n_blocks;
}
/* Build bytecode call descriptor for function SUBR. */
/* Build bytecode call descriptor for function SUBR. */
rtx
bc_build_calldesc (subr)
@ -5035,7 +5028,7 @@ expand_main_function ()
extern struct obstack permanent_obstack;
/* Expand start of bytecode function. See comment at
expand_function_start below for details. */
expand_function_start below for details. */
void
bc_expand_function_start (subr, parms_have_cleanups)
@ -5065,7 +5058,7 @@ bc_expand_function_start (subr, parms_have_cleanups)
}
else
{
/* Variable-sized objects are pointers to their storage. */
/* Variable-sized objects are pointers to their storage. */
DECL_RTL (thisarg) = bc_gen_rtx ((char *) 0, argsz, (struct bc_label *) 0);
argsz += POINTER_SIZE;
}
@ -5084,7 +5077,7 @@ bc_expand_function_start (subr, parms_have_cleanups)
/* Expand end of bytecode function. See details the comment of
expand_function_end(), below. */
expand_function_end(), below. */
void
bc_expand_function_end ()
@ -5095,7 +5088,7 @@ bc_expand_function_end ()
/* Emit any fixup code. This must be done before the call to
to BC_END_FUNCTION (), since that will cause the bytecode
segment to be finished off and closed. */
segment to be finished off and closed. */
expand_fixups (NULL_RTX);

View file

@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. */
#endif
#ifndef NULL_PTR
#define NULL_PTR ((GENERIC_PTR)0)
#define NULL_PTR ((GENERIC_PTR) 0)
#endif
#ifdef __STDC__

View file

@ -45,7 +45,7 @@ extern void atexit (void (*) (void));
#define ON_EXIT(FUNC,ARG) atexit ((FUNC))
#else
#ifdef sun
extern int on_exit (void*, void*); /* The man page says it returns int. */
extern int on_exit (void *, void *); /* The man page says it returns int. */
#define ON_EXIT(FUNC,ARG) on_exit ((FUNC), (ARG))
#endif
#endif

View file

@ -81,7 +81,7 @@ extern int pwait PROTO ((int, int *, int));
#define WEXITSTATUS(S) (((S) & 0xff00) >> 8)
#endif
/* Define O_RDONLY if the system hasn't defined it for us. */
/* Define O_RDONLY if the system hasn't defined it for us. */
#ifndef O_RDONLY
#define O_RDONLY 0
#endif
@ -105,7 +105,7 @@ extern int pwait PROTO ((int, int *, int));
#define EXECUTABLE_SUFFIX ""
#endif
/* By default, the suffix for object files is ".o". */
/* By default, the suffix for object files is ".o". */
#ifdef OBJECT_SUFFIX
#define HAVE_OBJECT_SUFFIX
#else
@ -161,7 +161,7 @@ static int print_search_dirs;
static char *print_file_name = NULL;
/* As print_file_name, but search for executable file. */
/* As print_file_name, but search for executable file. */
static char *print_prog_name = NULL;
@ -1144,23 +1144,24 @@ skip_whitespace (p)
return p;
}
/* Structure to keep track of the specs that have been defined so far. These
are accessed using %(specname) or %[specname] in a compiler or link spec. */
/* Structure to keep track of the specs that have been defined so far.
These are accessed using %(specname) or %[specname] in a compiler
or link spec. */
struct spec_list
{
char *name; /* Name of the spec. */
char *spec; /* The spec itself. */
struct spec_list *next; /* Next spec in linked list. */
char *name; /* Name of the spec. */
char *spec; /* The spec itself. */
struct spec_list *next; /* Next spec in linked list. */
};
/* List of specs that have been defined so far. */
/* List of specs that have been defined so far. */
static struct spec_list *specs = (struct spec_list *) 0;
/* Change the value of spec NAME to SPEC. If SPEC is empty, then the spec is
removed; If the spec starts with a + then SPEC is added to the end of the
current spec. */
current spec. */
static void
set_spec (name, spec)
@ -1279,12 +1280,12 @@ static int signal_count;
static char *programname;
/* Structures to keep track of prefixes to try when looking for files. */
/* Structures to keep track of prefixes to try when looking for files. */
struct prefix_list
{
char *prefix; /* String to prepend to the path. */
struct prefix_list *next; /* Next in linked list. */
char *prefix; /* String to prepend to the path. */
struct prefix_list *next; /* Next in linked list. */
int require_machine_suffix; /* Don't use without machine_suffix. */
/* 2 means try both machine_suffix and just_machine_suffix. */
int *used_flag_ptr; /* 1 if a file was found with this prefix. */
@ -1297,11 +1298,11 @@ struct path_prefix
char *name; /* Name of this list (used in config stuff) */
};
/* List of prefixes to try when looking for executables. */
/* List of prefixes to try when looking for executables. */
static struct path_prefix exec_prefixes = { 0, 0, "exec" };
/* List of prefixes to try when looking for startup (crt0) files. */
/* List of prefixes to try when looking for startup (crt0) files. */
static struct path_prefix startfile_prefixes = { 0, 0, "startfile" };
@ -1642,7 +1643,8 @@ build_search_list (paths, prefix, check_dir_p)
return obstack_finish (&collect_obstack);
}
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables for collect. */
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
for collect. */
static void
putenv_from_prefixes (paths, env_var)
@ -1654,7 +1656,7 @@ putenv_from_prefixes (paths, env_var)
/* Search for NAME using the prefix list PREFIXES. MODE is passed to
access to check permissions.
Return 0 if not found, otherwise return its name, allocated with malloc. */
Return 0 if not found, otherwise return its name, allocated with malloc. */
static char *
find_a_file (pprefix, name, mode)
@ -1856,7 +1858,7 @@ unused_prefix_warnings (pprefix)
}
}
/* Get rid of all prefixes built up so far in *PLISTP. */
/* Get rid of all prefixes built up so far in *PLISTP. */
static void
free_path_prefix (pprefix)
@ -3484,7 +3486,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
int len;
/* The string after the S/P is the name of a spec that is to be
processed. */
processed. */
while (*p && *p != ')' && *p != ']')
p++;
@ -3832,7 +3834,7 @@ check_live_switch (switchnum, prefix_length)
case 'W': case 'f': case 'm':
if (! strncmp (name + 1, "no-", 3))
{
/* We have Xno-YYY, search for XYYY. */
/* We have Xno-YYY, search for XYYY. */
for (i = switchnum + 1; i < n_switches; i++)
if (switches[i].part1[0] == name[0]
&& ! strcmp (&switches[i].part1[1], &name[4]))
@ -4030,7 +4032,7 @@ main (argc, argv)
char **q = multilib_raw;
obstack_init (&multilib_obstack);
while ((p = *q++) != (char *)0)
while ((p = *q++) != (char *) 0)
obstack_grow (&multilib_obstack, p, strlen (p));
obstack_1grow (&multilib_obstack, 0);
@ -4500,7 +4502,7 @@ concat VPROTO((char *first, ...))
char *first;
#endif
/* First compute the size of the result and get sufficient memory. */
/* First compute the size of the result and get sufficient memory. */
VA_START (args, first);
#ifndef __STDC__
@ -4519,7 +4521,7 @@ concat VPROTO((char *first, ...))
newstr = (char *) xmalloc (length + 1);
va_end (args);
/* Now copy the individual pieces to the result string. */
/* Now copy the individual pieces to the result string. */
VA_START (args, first);
#ifndef __STDC__
@ -4606,7 +4608,7 @@ fatal VPROTO((char *format, ...))
VA_START (ap, format);
#ifndef __STDC__
format = va_arg (ap, char*);
format = va_arg (ap, char *);
#endif
fprintf (stderr, "%s: ", programname);
@ -4628,7 +4630,7 @@ error VPROTO((char *format, ...))
VA_START (ap, format);
#ifndef __STDC__
format = va_arg (ap, char*);
format = va_arg (ap, char *);
#endif
fprintf (stderr, "%s: ", programname);

View file

@ -57,7 +57,7 @@ fancy_abort ()
int
main (argc, argv)
int argc;
char** argv;
char **argv;
{
FILE *inf = stdin;
FILE *outf = stdout;

View file

@ -146,12 +146,12 @@ void fancy_abort ();
struct insn_def
{
int insn_code; /* Instruction number. */
int insn_index; /* Expression numer in file, for errors. */
struct insn_def *next; /* Next insn in chain. */
rtx def; /* The DEFINE_... */
int insn_code; /* Instruction number. */
int insn_index; /* Expression numer in file, for errors. */
struct insn_def *next; /* Next insn in chain. */
rtx def; /* The DEFINE_... */
int num_alternatives; /* Number of alternatives. */
int vec_idx; /* Index of attribute vector in `def'. */
int vec_idx; /* Index of attribute vector in `def'. */
};
/* Once everything has been read in, we store in each attribute value a list
@ -182,15 +182,15 @@ struct attr_value
struct attr_desc
{
char *name; /* Name of attribute. */
struct attr_desc *next; /* Next attribute. */
int is_numeric; /* Values of this attribute are numeric. */
char *name; /* Name of attribute. */
struct attr_desc *next; /* Next attribute. */
int is_numeric; /* Values of this attribute are numeric. */
int negative_ok; /* Allow negative numeric values. */
int unsigned_p; /* Make the output function unsigned int. */
int is_const; /* Attribute value constant for each run. */
int is_special; /* Don't call `write_attr_set'. */
struct attr_value *first_value; /* First value of this attribute. */
struct attr_value *default_val; /* Default value for this attribute. */
int is_special; /* Don't call `write_attr_set'. */
struct attr_value *first_value; /* First value of this attribute. */
struct attr_value *default_val; /* Default value for this attribute. */
};
#define NULL_ATTR (struct attr_desc *) NULL
@ -208,7 +208,7 @@ struct range
struct delay_desc
{
rtx def; /* DEFINE_DELAY expression. */
struct delay_desc *next; /* Next DEFINE_DELAY. */
struct delay_desc *next; /* Next DEFINE_DELAY. */
int num; /* Number of DEFINE_DELAY, starting at 1. */
};
@ -236,7 +236,7 @@ struct function_unit
int multiplicity; /* Number of units of this type. */
int simultaneity; /* Maximum number of simultaneous insns
on this function unit or 0 if unlimited. */
rtx condexp; /* Expression TRUE for insn needing unit. */
rtx condexp; /* Expression TRUE for insn needing unit. */
int num_opclasses; /* Number of different operation types. */
struct function_unit_op *ops; /* Pointer to first operation type. */
int needs_conflict_function; /* Nonzero if a conflict function required. */
@ -299,7 +299,7 @@ struct dimension
int num_values; /* Length of the values list. */
};
/* Other variables. */
/* Other variables. */
static int insn_code_number;
static int insn_index_number;
@ -741,7 +741,7 @@ attr_printf VPROTO((register int len, char *fmt, ...))
#ifndef __STDC__
len = va_arg (p, int);
fmt = va_arg (p, char*);
fmt = va_arg (p, char *);
#endif
/* Print the string into a temporary location. */
@ -1152,7 +1152,7 @@ check_attr_value (exp, attr)
/* A constant SYMBOL_REF is valid as a constant attribute test and
is expanded later by make_canonical into a COND. */
return attr_rtx (SYMBOL_REF, XSTR (exp, 0));
/* Otherwise, fall through... */
/* Otherwise, fall through... */
default:
fatal ("Invalid operation `%s' for attribute value",
@ -1239,7 +1239,7 @@ convert_set_attr (exp, num_alt, insn_code, insn_index)
/* Scan all definitions, checking for validity. Also, convert any SET_ATTR
and SET_ATTR_ALTERNATIVE expressions to the corresponding SET
expressions. */
expressions. */
static void
check_defs ()
@ -1403,7 +1403,7 @@ make_canonical (attr, exp)
int allsame = 1;
rtx defval;
/* First, check for degenerate COND. */
/* First, check for degenerate COND. */
if (XVECLEN (exp, 0) == 0)
return make_canonical (attr, XEXP (exp, 1));
defval = XEXP (exp, 1) = make_canonical (attr, XEXP (exp, 1));
@ -2728,7 +2728,7 @@ evaluate_eq_attr (exp, value, insn_code, insn_index)
For each possible COND value, call ourselves recursively.
The extra TRUE and FALSE expressions will be eliminated by another
call to the simplification routine. */
call to the simplification routine. */
orexp = false_rtx;
andexp = true_rtx;
@ -3089,7 +3089,7 @@ simplify_test_exp (exp, insn_code, insn_index)
fatal ("Invalid alternative specified for pattern number %d",
insn_index);
/* If all alternatives are excluded, this is false. */
/* If all alternatives are excluded, this is false. */
i ^= insn_alternatives[insn_code];
if (i == 0)
return false_rtx;
@ -3182,7 +3182,7 @@ simplify_test_exp (exp, insn_code, insn_index)
fatal ("Invalid alternative specified for pattern number %d",
insn_index);
/* If all alternatives are included, this is true. */
/* If all alternatives are included, this is true. */
i ^= insn_alternatives[insn_code];
if (i == 0)
return true_rtx;
@ -4019,7 +4019,7 @@ gen_attr (exp)
if (! strcmp (attr->name, "length") && ! attr->is_numeric)
fatal ("`length' attribute must take numeric values");
/* Set up the default value. */
/* Set up the default value. */
XEXP (exp, 2) = check_attr_value (XEXP (exp, 2), attr);
attr->default_val = get_attr_value (XEXP (exp, 2), attr, -2);
}
@ -4472,7 +4472,7 @@ write_test_expr (exp, in_comparison)
XSTR (exp, 1), XINT (exp, 0), GET_MODE_NAME (GET_MODE (exp)));
break;
/* Constant integer. */
/* Constant integer. */
case CONST_INT:
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
printf ("%d", XWINT (exp, 0));
@ -4481,7 +4481,7 @@ write_test_expr (exp, in_comparison)
#endif
break;
/* A random C expression. */
/* A random C expression. */
case SYMBOL_REF:
printf ("%s", XSTR (exp, 0));
break;
@ -4630,7 +4630,7 @@ write_attr_get (attr)
struct attr_value *av, *common_av;
/* Find the most used attribute value. Handle that as the `default' of the
switch we will generate. */
switch we will generate. */
common_av = find_most_used (attr);
/* Write out start of function, then all values with explicit `case' lines,
@ -5546,7 +5546,7 @@ main (argc, argv)
{
struct rlimit rlim;
/* Set the stack limit huge so that alloca does not fail. */
/* Set the stack limit huge so that alloca does not fail. */
getrlimit (RLIMIT_STACK, &rlim);
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
@ -5676,7 +5676,7 @@ from the machine description file `md'. */\n\n");
/* Construct extra attributes for `length'. */
make_length_attrs ();
/* Perform any possible optimizations to speed up compilation. */
/* Perform any possible optimizations to speed up compilation. */
optimize_attrs ();
/* Now write out all the `gen_attr_...' routines. Do these before the

View file

@ -272,7 +272,7 @@ gen_insn (insn)
/* See if the pattern for this insn ends with a group of CLOBBERs of (hard)
registers or MATCH_SCRATCHes. If so, store away the information for
later. */
later. */
if (XVEC (insn, 1))
{
@ -506,6 +506,7 @@ gen_expand (expand)
}
/* Like gen_expand, but generates a SEQUENCE. */
static void
gen_split (split)
rtx split;

View file

@ -140,7 +140,7 @@ gen_insn (insn)
link = (struct code_ptr *) xmalloc (sizeof (struct code_ptr));
link->insn_code = insn_code_number;
/* See if we find something that already had this extraction method. */
/* See if we find something that already had this extraction method. */
for (p = extractions; p; p = p->next)
{

View file

@ -50,6 +50,7 @@ static struct obstack call_obstack, normal_obstack;
static int max_id_len;
/* Count the number of match_operand's found. */
static int
num_operands (x)
rtx x;
@ -87,6 +88,7 @@ num_operands (x)
}
/* Print out prototype information for a function. */
static void
gen_proto (insn)
rtx insn;
@ -108,6 +110,7 @@ gen_proto (insn)
}
/* Print out a function declaration without a prototype. */
static void
gen_nonproto (insn)
rtx insn;
@ -258,7 +261,7 @@ from the machine description file `md'. */\n\n");
}
/* Print out the prototypes now. */
dummy = (rtx)0;
dummy = (rtx) 0;
obstack_grow (&call_obstack, &dummy, sizeof (rtx));
call_insns = (rtx *) obstack_finish (&call_obstack);

View file

@ -120,7 +120,7 @@ static int next_number;
static int next_insn_code;
/* Similar, but counts all expressions in the MD file; used for
error messages. */
error messages. */
static int next_index;
@ -498,7 +498,7 @@ add_to_sequence (pattern, last, position)
if (GET_CODE (XEXP (pattern, 0)) == CC0)
break;
/* ... fall through ... */
/* ... fall through ... */
case COMPARE:
/* Enforce the mode on the first operand to avoid ambiguous insns. */
@ -572,7 +572,7 @@ not_both_true (d1, d2, toplevel)
struct decision *p1, *p2;
/* If they are both to test modes and the modes are different, they aren't
both true. Similarly for codes, integer elements, and vector lengths. */
both true. Similarly for codes, integer elements, and vector lengths. */
if ((d1->enforce_mode && d2->enforce_mode
&& d1->mode != VOIDmode && d2->mode != VOIDmode && d1->mode != d2->mode)
@ -1139,7 +1139,7 @@ write_tree_1 (tree, prevpos, afterward, type)
seen any of the codes that are valid for the predicate, we
can write a series of "case" statement, one for each possible
code. Since we are already in a switch, these redundant tests
are very cheap and will reduce the number of predicate called. */
are very cheap and will reduce the number of predicate called. */
if (p->pred >= 0)
{
@ -1309,7 +1309,7 @@ write_tree_1 (tree, prevpos, afterward, type)
}
/* Now that most mode and code tests have been done, we can write out
a label for an inner node, if we haven't already. */
a label for an inner node, if we haven't already. */
if (p->label_needed)
printf ("%sL%d:\n", indents[indent - 2], p->number);

329
gcc/gmon.c Normal file
View file

@ -0,0 +1,329 @@
/*-
* Copyright (c) 1991 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef lint
static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91";
#endif /* not lint */
#if 0
#include <unistd.h>
#endif
#ifdef DEBUG
#include <stdio.h>
#endif
#include "gmon.h"
extern mcount() asm ("mcount");
extern char *minbrk asm ("minbrk");
#ifdef __alpha
extern char *sbrk ();
#endif
/*
* froms is actually a bunch of unsigned shorts indexing tos
*/
static int profiling = 3;
static unsigned short *froms;
static struct tostruct *tos = 0;
static long tolimit = 0;
static char *s_lowpc = 0;
static char *s_highpc = 0;
static unsigned long s_textsize = 0;
static int ssiz;
static char *sbuf;
static int s_scale;
/* see profil(2) where this is describe (incorrectly) */
#define SCALE_1_TO_1 0x10000L
#define MSG "No space for profiling buffer(s)\n"
monstartup(lowpc, highpc)
char *lowpc;
char *highpc;
{
int monsize;
char *buffer;
register int o;
/*
* round lowpc and highpc to multiples of the density we're using
* so the rest of the scaling (here and in gprof) stays in ints.
*/
lowpc = (char *)
ROUNDDOWN((unsigned) lowpc, HISTFRACTION*sizeof(HISTCOUNTER));
s_lowpc = lowpc;
highpc = (char *)
ROUNDUP((unsigned) highpc, HISTFRACTION*sizeof(HISTCOUNTER));
s_highpc = highpc;
s_textsize = highpc - lowpc;
monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr);
buffer = sbrk( monsize );
if ( buffer == (char *) -1 ) {
write( 2 , MSG , sizeof(MSG) );
return;
}
froms = (unsigned short *) sbrk( s_textsize / HASHFRACTION );
if ( froms == (unsigned short *) -1 ) {
write( 2 , MSG , sizeof(MSG) );
froms = 0;
return;
}
tolimit = s_textsize * ARCDENSITY / 100;
if ( tolimit < MINARCS ) {
tolimit = MINARCS;
} else if ( tolimit > 65534 ) {
tolimit = 65534;
}
tos = (struct tostruct *) sbrk( tolimit * sizeof( struct tostruct ) );
if ( tos == (struct tostruct *) -1 ) {
write( 2 , MSG , sizeof(MSG) );
froms = 0;
tos = 0;
return;
}
minbrk = sbrk(0);
tos[0].link = 0;
sbuf = buffer;
ssiz = monsize;
( (struct phdr *) buffer ) -> lpc = lowpc;
( (struct phdr *) buffer ) -> hpc = highpc;
( (struct phdr *) buffer ) -> ncnt = ssiz;
monsize -= sizeof(struct phdr);
if ( monsize <= 0 )
return;
o = highpc - lowpc;
if( monsize < o )
#ifndef hp300
s_scale = ( (float) monsize / o ) * SCALE_1_TO_1;
#else /* avoid floating point */
{
int quot = o / monsize;
if (quot >= 0x10000)
s_scale = 1;
else if (quot >= 0x100)
s_scale = 0x10000 / quot;
else if (o >= 0x800000)
s_scale = 0x1000000 / (o / (monsize >> 8));
else
s_scale = 0x1000000 / ((o << 8) / monsize);
}
#endif
else
s_scale = SCALE_1_TO_1;
moncontrol(1);
}
_mcleanup()
{
int fd;
int fromindex;
int endfrom;
char *frompc;
int toindex;
struct rawarc rawarc;
moncontrol(0);
fd = creat( "gmon.out" , 0666 );
if ( fd < 0 ) {
perror( "mcount: gmon.out" );
return;
}
# ifdef DEBUG
fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz );
# endif DEBUG
write( fd , sbuf , ssiz );
endfrom = s_textsize / (HASHFRACTION * sizeof(*froms));
for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) {
if ( froms[fromindex] == 0 ) {
continue;
}
frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof(*froms));
for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) {
# ifdef DEBUG
fprintf( stderr ,
"[mcleanup] frompc 0x%x selfpc 0x%x count %d\n" ,
frompc , tos[toindex].selfpc , tos[toindex].count );
# endif DEBUG
rawarc.raw_frompc = (unsigned long) frompc;
rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc;
rawarc.raw_count = tos[toindex].count;
write( fd , &rawarc , sizeof rawarc );
}
}
close( fd );
}
mcount()
{
register char *selfpc;
register unsigned short *frompcindex;
register struct tostruct *top;
register struct tostruct *prevtop;
register long toindex;
/*
* find the return address for mcount,
* and the return address for mcount's caller.
*/
/* selfpc = pc pushed by mcount call.
This identifies the function that was just entered. */
selfpc = (void *) __builtin_return_address (0);
/* frompcindex = pc in preceding frame.
This identifies the caller of the function just entered. */
frompcindex = (void *) __builtin_return_address (1);
/*
* check that we are profiling
* and that we aren't recursively invoked.
*/
if (profiling) {
goto out;
}
profiling++;
/*
* check that frompcindex is a reasonable pc value.
* for example: signal catchers get called from the stack,
* not from text space. too bad.
*/
frompcindex = (unsigned short *) ((long) frompcindex - (long) s_lowpc);
if ((unsigned long) frompcindex > s_textsize) {
goto done;
}
frompcindex =
&froms[((long) frompcindex) / (HASHFRACTION * sizeof(*froms))];
toindex = *frompcindex;
if (toindex == 0) {
/*
* first time traversing this arc
*/
toindex = ++tos[0].link;
if (toindex >= tolimit) {
goto overflow;
}
*frompcindex = toindex;
top = &tos[toindex];
top->selfpc = selfpc;
top->count = 1;
top->link = 0;
goto done;
}
top = &tos[toindex];
if (top->selfpc == selfpc) {
/*
* arc at front of chain; usual case.
*/
top->count++;
goto done;
}
/*
* have to go looking down chain for it.
* top points to what we are looking at,
* prevtop points to previous top.
* we know it is not at the head of the chain.
*/
for (; /* goto done */; ) {
if (top->link == 0) {
/*
* top is end of the chain and none of the chain
* had top->selfpc == selfpc.
* so we allocate a new tostruct
* and link it to the head of the chain.
*/
toindex = ++tos[0].link;
if (toindex >= tolimit) {
goto overflow;
}
top = &tos[toindex];
top->selfpc = selfpc;
top->count = 1;
top->link = *frompcindex;
*frompcindex = toindex;
goto done;
}
/*
* otherwise, check the next arc on the chain.
*/
prevtop = top;
top = &tos[top->link];
if (top->selfpc == selfpc) {
/*
* there it is.
* increment its count
* move it to the head of the chain.
*/
top->count++;
toindex = prevtop->link;
prevtop->link = top->link;
top->link = *frompcindex;
*frompcindex = toindex;
goto done;
}
}
done:
profiling--;
/* and fall through */
out:
return; /* normal return restores saved registers */
overflow:
profiling++; /* halt further profiling */
# define TOLIMIT "mcount: tos overflow\n"
write(2, TOLIMIT, sizeof(TOLIMIT));
goto out;
}
/* Control profiling
profiling is what mcount checks to see if
all the data structures are ready. */
moncontrol(mode)
int mode;
{
if (mode) {
/* start */
profil(sbuf + sizeof(struct phdr), ssiz - sizeof(struct phdr),
(int)s_lowpc, s_scale);
profiling = 0;
} else {
/* stop */
profil((char *) 0, 0, 0, 0);
profiling = 3;
}
}

View file

@ -135,7 +135,7 @@ half_pic_hash (name, len, create_p)
/* name not in hash table. */
if (!create_p)
return (struct all_refs *)0;
return (struct all_refs *) 0;
ptr = (struct all_refs *) obstack_alloc (&half_pic_obstack, sizeof (struct all_refs));
*ptr = zero_all_refs;
@ -144,7 +144,7 @@ half_pic_hash (name, len, create_p)
ptr->real_len = len;
/* Update circular links. */
if (first == (struct all_refs *)0)
if (first == (struct all_refs *) 0)
ptr->hash_next = ptr;
else
@ -342,7 +342,7 @@ half_pic_address_p (addr)
return FALSE;
ptr = half_pic_hash (name, len, FALSE);
if (ptr == (struct all_refs *)0)
if (ptr == (struct all_refs *) 0)
return FALSE;
if (ptr->external_p)
@ -376,7 +376,7 @@ half_pic_ptr (operand)
name = XSTR (operand, 0);
len = strlen (name);
p = half_pic_hash (name, len, FALSE);
if (p == (struct all_refs *)0 || !p->external_p)
if (p == (struct all_refs *) 0 || !p->external_p)
return operand;
if (!p->pointer_p)

View file

@ -394,7 +394,7 @@ save_for_inline_copying (fndecl)
char *new, *new1;
/* Make and emit a return-label if we have not already done so.
Do this before recording the bounds on label numbers. */
Do this before recording the bounds on label numbers. */
if (return_label == 0)
{
@ -1466,7 +1466,7 @@ expand_inline_function (fndecl, parms, target, ignore, type,
that flag set if it is a register.
Also, don't allow hard registers here; they might not be valid
when substituted into insns. */
when substituted into insns. */
if ((GET_CODE (copy) != REG && GET_CODE (copy) != SUBREG)
|| (GET_CODE (copy) == REG && REG_USERVAR_P (loc)
@ -1497,7 +1497,7 @@ expand_inline_function (fndecl, parms, target, ignore, type,
that flag set if it is a register.
Also, don't allow hard registers here; they might not be valid
when substituted into insns. */
when substituted into insns. */
rtx locreal = gen_realpart (GET_MODE (XEXP (loc, 0)), loc);
rtx locimag = gen_imagpart (GET_MODE (XEXP (loc, 0)), loc);
rtx copyreal = gen_realpart (GET_MODE (locreal), copy);
@ -2152,7 +2152,7 @@ copy_rtx_and_substitute (orig, map)
else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM)
{
/* Do the same for a block to contain any arguments referenced
in memory. */
in memory. */
rtx loc, seq;
int size = FUNCTION_ARGS_SIZE (DECL_SAVED_INSNS (map->fndecl));
@ -2161,7 +2161,7 @@ copy_rtx_and_substitute (orig, map)
loc = XEXP (loc, 0);
/* When arguments grow downward, the virtual incoming
args pointer points to the top of the argument block,
so the remapped location better do the same. */
so the remapped location better do the same. */
#ifdef ARGS_GROW_DOWNWARD
loc = plus_constant (loc, size);
#endif
@ -2345,7 +2345,7 @@ copy_rtx_and_substitute (orig, map)
will not have valid reg_map entries. This can cause try_constants()
to fail because assumes that all registers in the rtx have valid
reg_map entries, and it may end up replacing one of these new
registers with junk. */
registers with junk. */
if (! memory_address_p (GET_MODE (temp), XEXP (temp, 0)))
temp = change_address (temp, GET_MODE (temp), XEXP (temp, 0));

View file

@ -100,7 +100,7 @@ int can_reach_end;
Normally they are not significant, because of A and B jump to C,
and R dies in A, it must die in B. But this might not be true after
stack register conversion, and we must compare death notes in that
case. */
case. */
static int cross_jump_death_matters = 0;
@ -499,7 +499,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
else if (GET_CODE (body) == PARALLEL)
{
/* If each part is a set between two identical registers or
a USE or CLOBBER, delete the insn. */
a USE or CLOBBER, delete the insn. */
int i, sreg, dreg;
rtx tem;
@ -943,7 +943,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
/* Finally, handle the case where two insns are used to
compute EXP but a temporary register is used. Here we must
ensure that the temporary register is not used anywhere else. */
ensure that the temporary register is not used anywhere else. */
if (! reload_completed
&& after_regscan
@ -1924,7 +1924,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
/* Now that the jump has been tensioned,
try cross jumping: check for identical code
before the jump and before its target label. */
before the jump and before its target label. */
/* First, cross jumping of conditional jumps: */
@ -1959,7 +1959,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
INSN_CODE (insn) = -1;
emit_barrier_after (insn);
/* Add to jump_chain unless this is a new label
whose UID is too large. */
whose UID is too large. */
if (INSN_UID (JUMP_LABEL (insn)) < max_jump_chain)
{
jump_chain[INSN_UID (insn)]
@ -2441,13 +2441,13 @@ find_cross_jump (e1, e2, minimum, f1, f2)
#ifdef STACK_REGS
/* If cross_jump_death_matters is not 0, the insn's mode
indicates whether or not the insn contains any stack-like
regs. */
regs. */
if (!lose && cross_jump_death_matters && GET_MODE (i1) == QImode)
{
/* If register stack conversion has already been done, then
death notes must also be compared before it is certain that
the two instruction streams match. */
the two instruction streams match. */
rtx note;
HARD_REG_SET i1_regset, i2_regset;
@ -4422,7 +4422,7 @@ rtx_equal_for_thread_p (x, y, yinsn)
case MEM:
/* If memory modified or either volatile, not equivalent.
Else, check address. */
Else, check address. */
if (modified_mem || MEM_VOLATILE_P (x) || MEM_VOLATILE_P (y))
return 0;

View file

@ -533,7 +533,7 @@ __udivmoddi4 (n, d, rp)
udiv_qrnnd (q1, n1, n2, n1, d0);
}
/* n1 != d0... */
/* n1 != d0... */
udiv_qrnnd (q0, n0, n1, n0, d0);
@ -1404,7 +1404,7 @@ asm ("___builtin_saveregs:");
asm (" sw $7,12($30)");
asm (" j $31");
asm (" .end __builtin_saveregs");
#else /* not __mips__, etc. */
#else /* not __mips__, etc. */
void *
__builtin_saveregs ()
@ -1517,7 +1517,7 @@ __bb_exit_func (void)
/* We check the length field explicitly in order to allow compatibility
with older GCC's which did not provide it. */
for (ptr = bb_head; ptr != (struct bb *)0; ptr = ptr->next)
for (ptr = bb_head; ptr != (struct bb *) 0; ptr = ptr->next)
{
int i;
int func_p = (ptr->nwords >= sizeof (struct bb) && ptr->nwords <= 1000);
@ -1609,7 +1609,7 @@ void
__bb_init_func (struct bb *blocks)
{
/* User is supposed to check whether the first word is non-0,
but just in case.... */
but just in case.... */
if (blocks->zero_word)
return;
@ -1635,16 +1635,16 @@ __bb_init_func (struct bb *blocks)
#include <string.h>
/* Number of buckets in hashtable of basic block addresses. */
/* Number of buckets in hashtable of basic block addresses. */
#define BB_BUCKETS 311
/* Maximum length of string in file bb.in. */
/* Maximum length of string in file bb.in. */
#define BBINBUFSIZE 500
/* BBINBUFSIZE-1 with double quotes. We could use #BBINBUFSIZE or
"BBINBUFSIZE" but want to avoid trouble with preprocessors. */
"BBINBUFSIZE" but want to avoid trouble with preprocessors. */
#define BBINBUFSIZESTR "499"
@ -1671,7 +1671,7 @@ struct bb_func
/* This is the connection to the outside world.
The BLOCK_PROFILER macro must set __bb.blocks
and __bb.blockno. */
and __bb.blockno. */
struct {
unsigned long blockno;
@ -1679,18 +1679,18 @@ struct {
} __bb;
/* Vars to store addrs of source and destination basic blocks
of a jump. */
of a jump. */
static unsigned long bb_src = 0;
static unsigned long bb_dst = 0;
static FILE *bb_tracefile = (FILE*)0;
static struct bb_edge **bb_hashbuckets = (struct bb_edge**)0;
static struct bb_func *bb_func_head = (struct bb_func*)0;
static FILE *bb_tracefile = (FILE *) 0;
static struct bb_edge **bb_hashbuckets = (struct bb_edge **) 0;
static struct bb_func *bb_func_head = (struct bb_func *) 0;
static unsigned long bb_callcount = 0;
static int bb_mode = 0;
static unsigned long *bb_stack = (unsigned long *)0;
static unsigned long *bb_stack = (unsigned long *) 0;
static size_t bb_stacksize = 0;
static int reported = 0;
@ -1710,14 +1710,14 @@ bb_mode & 8 != 0 : Insert return instructions in basic block flow.
#include <sys/stat.h>
/*#include <malloc.h>*/
/* Commands executed by gopen. */
/* Commands executed by gopen. */
#define GOPENDECOMPRESS "gzip -cd "
#define GOPENCOMPRESS "gzip -c >"
/* Like fopen but pipes through gzip. mode may only be "r" or "w".
If it does not compile, simply replace gopen by fopen and delete
'.gz' from any first parameter to gopen. */
'.gz' from any first parameter to gopen. */
static FILE *
gopen (fn, mode)
@ -1728,10 +1728,10 @@ gopen (fn, mode)
char *p;
if (mode[1])
return (FILE*)0;
return (FILE *) 0;
if (mode[0] != 'r' && mode[0] != 'w')
return (FILE*)0;
return (FILE *) 0;
p = fn + strlen (fn)-1;
use_gzip = ((p[-1] == '.' && (p[0] == 'Z' || p[0] == 'z')) ||
@ -1742,8 +1742,8 @@ gopen (fn, mode)
if (mode[0]=='r')
{
FILE *f;
char *s = (char*) malloc (sizeof (char) * strlen (fn)
+ sizeof (GOPENDECOMPRESS));
char *s = (char *) malloc (sizeof (char) * strlen (fn)
+ sizeof (GOPENDECOMPRESS));
strcpy (s, GOPENDECOMPRESS);
strcpy (s + (sizeof (GOPENDECOMPRESS)-1), fn);
f = popen (s, mode);
@ -1754,8 +1754,8 @@ gopen (fn, mode)
else
{
FILE *f;
char *s = (char*) malloc (sizeof (char) * strlen (fn)
+ sizeof (GOPENCOMPRESS));
char *s = (char *) malloc (sizeof (char) * strlen (fn)
+ sizeof (GOPENCOMPRESS));
strcpy (s, GOPENCOMPRESS);
strcpy (s + (sizeof (GOPENCOMPRESS)-1), fn);
if (!(f = popen (s, mode)))
@ -1787,7 +1787,7 @@ gclose (f)
#endif /* HAVE_POPEN */
/* Called once per program. */
/* Called once per program. */
static void
__bb_exit_trace_func ()
@ -1812,7 +1812,7 @@ __bb_exit_trace_func ()
#endif /* HAVE_POPEN */
}
/* Check functions in `bb.in'. */
/* Check functions in `bb.in'. */
if (file)
{
@ -1822,14 +1822,14 @@ __bb_exit_trace_func ()
struct bb *ptr;
long blk;
/* This is somewhat type incorrect. */
/* This is somewhat type incorrect. */
time ((void *) &time_value);
for (p = bb_func_head; p != (struct bb_func *)0; p = p->next)
for (p = bb_func_head; p != (struct bb_func *) 0; p = p->next)
{
for (ptr = bb_head; ptr != (struct bb *)0; ptr = ptr->next)
for (ptr = bb_head; ptr != (struct bb *) 0; ptr = ptr->next)
{
if (!ptr->filename || p->filename != (char *)0 && strcmp (p->filename, ptr->filename))
if (!ptr->filename || p->filename != (char *) 0 && strcmp (p->filename, ptr->filename))
continue;
for (blk = 0; blk < ptr->ncounts; blk++)
{
@ -1894,7 +1894,7 @@ found: ;
break;
case 4:
/* Print nothing. */
/* Print nothing. */
break;
case 8:
@ -1945,7 +1945,7 @@ found: ;
if (file)
fclose (file);
/* Free allocated memory. */
/* Free allocated memory. */
f = bb_func_head;
while (f)
@ -1983,7 +1983,7 @@ found: ;
if (b->flags) free (b->flags);
}
/* Called once per program. */
/* Called once per program. */
static void
__bb_init_prg ()
@ -2025,31 +2025,31 @@ __bb_init_prg ()
bb_mode |= 8;
else
{
struct bb_func *f = (struct bb_func*) malloc (sizeof (struct bb_func));
struct bb_func *f = (struct bb_func *) malloc (sizeof (struct bb_func));
if (f)
{
unsigned long l;
f->next = bb_func_head;
if (pos = strchr (p, ':'))
{
if (!(f->funcname = (char*) malloc (strlen (pos+1)+1)))
if (!(f->funcname = (char *) malloc (strlen (pos+1)+1)))
continue;
strcpy (f->funcname, pos+1);
l = pos-p;
if ((f->filename = (char*) malloc (l+1)))
if ((f->filename = (char *) malloc (l+1)))
{
strncpy (f->filename, p, l);
f->filename[l] = '\0';
}
else
f->filename = (char*)0;
f->filename = (char *) 0;
}
else
{
if (!(f->funcname = (char*) malloc (strlen (p)+1)))
if (!(f->funcname = (char *) malloc (strlen (p)+1)))
continue;
strcpy (f->funcname, p);
f->filename = (char*)0;
f->filename = (char *) 0;
}
f->mode = m;
bb_func_head = f;
@ -2091,7 +2091,7 @@ __bb_init_prg ()
}
/* Called upon entering a basic block. */
/* Called upon entering a basic block. */
void
__bb_trace_func ()
@ -2116,7 +2116,7 @@ __bb_trace_func ()
struct bb_edge **startbucket, **oldnext;
oldnext = startbucket =
& bb_hashbuckets[ (((int)bb_src*8)^(int)bb_dst) % BB_BUCKETS ];
& bb_hashbuckets[ (((int) bb_src*8) ^ (int) bb_dst) % BB_BUCKETS ];
bucket = *startbucket;
for (bucket = *startbucket; bucket;
@ -2164,7 +2164,7 @@ skip:
}
/* Called when returning from a function and `__bb_showret__' is set. */
/* Called when returning from a function and `__bb_showret__' is set. */
static void
__bb_trace_func_ret ()
@ -2179,7 +2179,7 @@ __bb_trace_func_ret ()
struct bb_edge **startbucket, **oldnext;
oldnext = startbucket =
& bb_hashbuckets[ (((int)bb_dst*8)^(int)bb_src) % BB_BUCKETS ];
& bb_hashbuckets[ (((int) bb_dst * 8) ^ (int) bb_src) % BB_BUCKETS ];
bucket = *startbucket;
for (bucket = *startbucket; bucket;
@ -2225,7 +2225,7 @@ skip:
}
/* Called upon entering the first function of a file. */
/* Called upon entering the first function of a file. */
static void
__bb_init_file (blocks)
@ -2243,7 +2243,7 @@ __bb_init_file (blocks)
blocks->flags = 0;
if (!bb_func_head ||
!(blocks->flags = (char*) malloc (sizeof (char) * blocks->ncounts)))
!(blocks->flags = (char *) malloc (sizeof (char) * blocks->ncounts)))
return;
for (blk = 0; blk < ncounts; blk++)
@ -2263,7 +2263,7 @@ __bb_init_file (blocks)
}
/* Called when exiting from a function. */
/* Called when exiting from a function. */
void
__bb_trace_ret ()
@ -2287,7 +2287,7 @@ __bb_trace_ret ()
}
/* Called when entering a function. */
/* Called when entering a function. */
void
__bb_init_trace_func (blocks, blockno)
@ -2360,11 +2360,11 @@ stack_overflow:;
#endif /* L_bb */
/* Default free-store management functions for C++, per sections 12.5 and
17.3.3 of the Working Paper. */
17.3.3 of the Working Paper. */
#ifdef L_op_new
/* operator new (size_t), described in 17.3.3.5. This function is used by
C++ programs to allocate a block of memory to hold a single object. */
C++ programs to allocate a block of memory to hold a single object. */
typedef void (*vfp)(void);
extern vfp __new_handler;
@ -2420,7 +2420,7 @@ __builtin_vec_new (size_t sz)
#ifdef L_new_handler
/* set_new_handler (fvoid_t *) and the default new handler, described in
17.3.3.2 and 17.3.3.5. These functions define the result of a failure
to allocate the amount of memory requested from operator new or new []. */
to allocate the amount of memory requested from operator new or new []. */
#ifndef inhibit_libc
/* This gets us __GNU_LIBRARY__. */
@ -2437,7 +2437,7 @@ __builtin_vec_new (size_t sz)
typedef void (*vfp)(void);
void __default_new_handler (void);
vfp __new_handler = (vfp)0;
vfp __new_handler = (vfp) 0;
vfp
set_new_handler (vfp handler)
@ -2470,7 +2470,7 @@ __default_new_handler ()
#ifdef L_op_delete
/* operator delete (void *), described in 17.3.3.3. This function is used
by C++ programs to return to the free store a block of memory allocated
as a single object. */
as a single object. */
#ifdef WEAK_ALIAS
void __builtin_delete (void *ptr)
@ -2490,7 +2490,7 @@ __builtin_delete (void *ptr)
#ifdef L_op_vdel
/* operator delete [] (void *), described in 17.3.3.4. This function is
used by C++ programs to return to the free store a block of memory
allocated as an array. */
allocated as an array. */
extern void __builtin_delete (void *);
@ -2560,7 +2560,7 @@ __clear_cache (beg, end)
= JUMP_AHEAD_INSTRUCTION + INSN_CACHE_LINE_WIDTH;
ptr += INSN_CACHE_LINE_WIDTH;
}
*(INSTRUCTION_TYPE *)(ptr - INSN_CACHE_LINE_WIDTH) = RETURN_INSTRUCTION;
*(INSTRUCTION_TYPE *) (ptr - INSN_CACHE_LINE_WIDTH) = RETURN_INSTRUCTION;
initialized = 1;
}
@ -2739,14 +2739,14 @@ __enable_execute_stack ()
lowest = current;
}
/* Clear instruction cache in case an old trampoline is in it. */
/* Clear instruction cache in case an old trampoline is in it. */
asm ("pich");
}
#endif /* __convex__ */
#ifdef __DOLPHIN__
/* Modified from the convex -code above. */
/* Modified from the convex -code above. */
#include <sys/param.h>
#include <errno.h>
@ -2786,7 +2786,7 @@ __enable_execute_stack ()
#include <sys/vmmac.h>
/* Modified from the convex -code above.
mremap promises to clear the i-cache. */
mremap promises to clear the i-cache. */
void
__enable_execute_stack ()
@ -2809,7 +2809,7 @@ __enable_execute_stack ()
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
must define both, or neither. */
must define both, or neither. */
#ifndef NAME__MAIN
#define NAME__MAIN "__main"
#define SYMBOL__MAIN __main
@ -3008,7 +3008,7 @@ static struct exception_table_node *exception_table_list;
static exception_table *
find_exception_table (pc)
void* pc;
void *pc;
{
register struct exception_table_node *table = exception_table_list;
for ( ; table != 0; table = table->next)
@ -3041,9 +3041,7 @@ find_exception_table (pc)
return the tightest match...
In the advent of a tie, we have to give the last entry, as it represents
an inner block.
*/
an inner block. */
void *
__find_first_exception_table_match(pc)
@ -3053,9 +3051,9 @@ void *pc;
int pos = 0;
int best = 0;
if (table == 0)
return (void*)0;
return (void *) 0;
#if 0
printf("find_first_exception_table_match(): pc = %x!\n",pc);
printf ("find_first_exception_table_match(): pc = %x!\n", pc);
#endif
except_pc = pc;
@ -3068,24 +3066,24 @@ void *pc;
/* found the first table[pos].start > except_pc, so the previous
entry better be the one we want! */
break;
} while(table[pos].exception_handler != (void*)-1);
} while (table[pos].exception_handler != (void *) -1);
--pos;
if (table[pos].start <= except_pc && table[pos].end > except_pc)
{
except_table_pos = pos;
#if 0
printf("find_first_eh_table_match(): found match: %x\n",table[pos].exception_handler);
printf ("find_first_eh_table_match(): found match: %x\n", table[pos].exception_handler);
#endif
return table[pos].exception_handler;
}
#else
while (table[++pos].exception_handler != (void*)-1) {
while (table[++pos].exception_handler != (void *) -1) {
if (table[pos].start <= except_pc && table[pos].end > except_pc)
{
/* This can apply. Make sure it is better or as good as the previous
best. */
/* The best one ends first. */
/* The best one ends first. */
if (best == 0 || (table[pos].end <= table[best].end
/* The best one starts last. */
&& table[pos].start >= table[best].start))
@ -3120,18 +3118,18 @@ __register_exceptions (exception_table *table)
struct exception_table_node *node;
exception_table *range = table + 1;
if (range->start == (void*)-1)
if (range->start == (void *) -1)
return;
node = (struct exception_table_node*)
node = (struct exception_table_node *)
malloc (sizeof (struct exception_table_node));
node->table = table;
/* This look can be optimized away either if the table
is sorted, or if we pass in extra parameters. */
is sorted, or if we pass in extra parameters. */
node->start = range->start;
node->end = range->end;
for (range++ ; range->start != (void*)(-1); range++)
for (range++ ; range->start != (void *) (-1); range++)
{
if (range->start < node->start)
node->start = range->start;
@ -3159,9 +3157,9 @@ __unwind_function(void *ptr)
/* like ret, but stay here */
asm("addl $4,%esp");
/* Now, undo previous frame. */
/* Now, undo previous frame. */
/* This is a test routine, as we have to dynamically probe to find out
what to pop for certain, this is just a guess. */
what to pop for certain, this is just a guess. */
asm("leal -16(%ebp),%esp");
asm("pop %ebx");
asm("pop %esi");
@ -3182,7 +3180,7 @@ __unwind_function(void *ptr)
asm("mr 31,1");
asm("l 1,0(1)");
/* use 31 as a scratch register to restore the link register. */
/* use 31 as a scratch register to restore the link register. */
asm("l 31, 8(1);mtlr 31 # l lr,8(1)");
asm("l 31,-4(1)");
asm("# br");
@ -3198,7 +3196,7 @@ __unwind_function(void *ptr)
asm("mr 31,1");
asm("lwz 1,0(1)");
/* use 31 as a scratch register to restore the link register. */
/* use 31 as a scratch register to restore the link register. */
asm("lwz 31, 8(1);mtlr 31 # l lr,8(1)");
asm("lwz 31,-4(1)");
asm("# br");

View file

@ -103,7 +103,7 @@ static HARD_REG_SET *qty_phys_sugg;
static short *qty_phys_num_copy_sugg;
/* Element Q is the number of suggested registers in qty_phys_sugg. */
/* Element Q is the number of suggested registers in qty_phys_sugg. */
static short *qty_phys_num_sugg;
@ -737,7 +737,7 @@ optimize_reg_copy_1 (insn, dest, src)
break;
/* See if all of SRC dies in P. This test is slightly more
conservative than it needs to be. */
conservative than it needs to be. */
if ((note = find_regno_note (p, REG_DEAD, sregno)) != 0
&& GET_MODE (XEXP (note, 0)) == GET_MODE (src))
{
@ -1461,13 +1461,13 @@ block_alloc (b)
if (qty_sugg_compare (1, 2) > 0)
EXCHANGE (2, 1);
/* ... Fall through ... */
/* ... Fall through ... */
case 2:
/* Put the best one to allocate in qty_order[0]. */
if (qty_sugg_compare (0, 1) > 0)
EXCHANGE (0, 1);
/* ... Fall through ... */
/* ... Fall through ... */
case 1:
case 0:
@ -1510,13 +1510,13 @@ block_alloc (b)
if (qty_compare (1, 2) > 0)
EXCHANGE (2, 1);
/* ... Fall through ... */
/* ... Fall through ... */
case 2:
/* Put the best one to allocate in qty_order[0]. */
if (qty_compare (0, 1) > 0)
EXCHANGE (0, 1);
/* ... Fall through ... */
/* ... Fall through ... */
case 1:
case 0:
@ -1782,7 +1782,7 @@ combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead)
|| (offset > 0 && usize + offset > ssize)
|| (offset < 0 && usize + offset < ssize)
/* Do not combine with a smaller already-assigned object
if that smaller object is already combined with something bigger. */
if that smaller object is already combined with something bigger. */
|| (ssize > usize && ureg >= FIRST_PSEUDO_REGISTER
&& usize < qty_size[reg_qty[ureg]])
/* Can't combine if SREG is not a register we can allocate. */
@ -2139,7 +2139,7 @@ find_free_reg (class, mode, qty, accept_call_clobbered, just_try_suggested,
SET_HARD_REG_BIT (used, eliminables[i].from);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
/* If FRAME_POINTER_REGNUM is not a real register, then protect the one
that it might be eliminated into. */
that it might be eliminated into. */
SET_HARD_REG_BIT (used, HARD_FRAME_POINTER_REGNUM);
#endif
#else

View file

@ -165,11 +165,11 @@
addcs %0, %0, #65536
adds %1, %1, %3, lsl #16
adc %0, %0, %3, lsr #16" \
: "=&r" ((USItype)(xh)), \
"=r" ((USItype)(xl)), \
: "=&r" ((USItype) (xh)), \
"=r" ((USItype) (xl)), \
"=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
: "r" ((USItype)(a)), \
"r" ((USItype)(b)));}
: "r" ((USItype) (a)), \
"r" ((USItype) (b)));}
#define UMUL_TIME 20
#define UDIV_TIME 100
#endif /* __arm__ */
@ -181,8 +181,8 @@
} __xx; \
__asm__ ("mulwux %2,%0" \
: "=r" (__xx.__ll) \
: "%0" ((USItype)(u)), \
"r" ((USItype)(v))); \
: "%0" ((USItype) (u)), \
"r" ((USItype) (v))); \
(w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
#define smul_ppmm(w1, w0, u, v) \
({union {DItype __ll; \
@ -190,15 +190,15 @@
} __xx; \
__asm__ ("mulwx %2,%0" \
: "=r" (__xx.__ll) \
: "%0" ((SItype)(u)), \
"r" ((SItype)(v))); \
: "%0" ((SItype) (u)), \
"r" ((SItype) (v))); \
(w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
#define __umulsidi3(u, v) \
({UDItype __w; \
__asm__ ("mulwux %2,%0" \
: "=r" (__w) \
: "%0" ((USItype)(u)), \
"r" ((USItype)(v))); \
: "%0" ((USItype) (u)), \
"r" ((USItype) (v))); \
__w; })
#endif /* __clipper__ */
@ -206,60 +206,60 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("add.w %5,%1
addx %3,%0" \
: "=g" ((USItype)(sh)), \
"=&g" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=g" ((USItype) (sh)), \
"=&g" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("sub.w %5,%1
subx %3,%0" \
: "=g" ((USItype)(sh)), \
"=&g" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=g" ((USItype) (sh)), \
"=&g" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define umul_ppmm(ph, pl, m0, m1) \
__asm__ ("mulx %3,%0,%1" \
: "=g" ((USItype)(ph)), \
"=r" ((USItype)(pl)) \
: "%0" ((USItype)(m0)), \
"g" ((USItype)(m1)))
: "=g" ((USItype) (ph)), \
"=r" ((USItype) (pl)) \
: "%0" ((USItype) (m0)), \
"g" ((USItype) (m1)))
#define udiv_qrnnd(q, r, nh, nl, d) \
__asm__ ("divx %4,%0,%1" \
: "=g" ((USItype)(q)), \
"=r" ((USItype)(r)) \
: "1" ((USItype)(nh)), \
"0" ((USItype)(nl)), \
"g" ((USItype)(d)))
: "=g" ((USItype) (q)), \
"=r" ((USItype) (r)) \
: "1" ((USItype) (nh)), \
"0" ((USItype) (nl)), \
"g" ((USItype) (d)))
#define count_leading_zeros(count, x) \
__asm__ ("bsch/1 %1,%0" \
: "=g" (count) \
: "g" ((USItype)(x)), \
"0" ((USItype)0))
: "g" ((USItype) (x)), \
"0" ((USItype) 0))
#endif
#if defined (__hppa)
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("add %4,%5,%1
addc %2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%rM" ((USItype)(ah)), \
"rM" ((USItype)(bh)), \
"%rM" ((USItype)(al)), \
"rM" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%rM" ((USItype) (ah)), \
"rM" ((USItype) (bh)), \
"%rM" ((USItype) (al)), \
"rM" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("sub %4,%5,%1
subb %2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "rM" ((USItype)(ah)), \
"rM" ((USItype)(bh)), \
"rM" ((USItype)(al)), \
"rM" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "rM" ((USItype) (ah)), \
"rM" ((USItype) (bh)), \
"rM" ((USItype) (al)), \
"rM" ((USItype) (bl)))
#if defined (_PA_RISC1_1)
#define umul_ppmm(w1, w0, u, v) \
do { \
@ -270,8 +270,8 @@
} __t; \
__asm__ ("xmpyu %1,%2,%0" \
: "=x" (__t.__f) \
: "x" ((USItype)(u)), \
"x" ((USItype)(v))); \
: "x" ((USItype) (u)), \
"x" ((USItype) (v))); \
(w1) = __t.__w1w0.__w1; \
(w0) = __t.__w1w0.__w0; \
} while (0)
@ -307,39 +307,39 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addl %5,%1
adcl %3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subl %5,%1
sbbl %3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("mull %3" \
: "=a" ((USItype)(w0)), \
"=d" ((USItype)(w1)) \
: "%0" ((USItype)(u)), \
"rm" ((USItype)(v)))
: "=a" ((USItype) (w0)), \
"=d" ((USItype) (w1)) \
: "%0" ((USItype) (u)), \
"rm" ((USItype) (v)))
#define udiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("divl %4" \
: "=a" ((USItype)(q)), \
"=d" ((USItype)(r)) \
: "0" ((USItype)(n0)), \
"1" ((USItype)(n1)), \
"rm" ((USItype)(d)))
: "=a" ((USItype) (q)), \
"=d" ((USItype) (r)) \
: "0" ((USItype) (n0)), \
"1" ((USItype) (n1)), \
"rm" ((USItype) (d)))
#define count_leading_zeros(count, x) \
do { \
USItype __cbtmp; \
__asm__ ("bsrl %1,%0" \
: "=r" (__cbtmp) : "rm" ((USItype)(x))); \
: "=r" (__cbtmp) : "rm" ((USItype) (x))); \
(count) = __cbtmp ^ 31; \
} while (0)
#define UMUL_TIME 40
@ -394,15 +394,15 @@
} __xx; \
__asm__ ("emul %2,%1,%0" \
: "=d" (__xx.__ll) \
: "%dI" ((USItype)(u)), \
"dI" ((USItype)(v))); \
: "%dI" ((USItype) (u)), \
"dI" ((USItype) (v))); \
(w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
#define __umulsidi3(u, v) \
({UDItype __w; \
__asm__ ("emul %2,%1,%0" \
: "=d" (__w) \
: "%dI" ((USItype)(u)), \
"dI" ((USItype)(v))); \
: "%dI" ((USItype) (u)), \
"dI" ((USItype) (v))); \
__w; })
#endif /* __i960__ */
@ -410,48 +410,48 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("add%.l %5,%1
addx%.l %3,%0" \
: "=d" ((USItype)(sh)), \
"=&d" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"d" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=d" ((USItype) (sh)), \
"=&d" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"d" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("sub%.l %5,%1
subx%.l %3,%0" \
: "=d" ((USItype)(sh)), \
"=&d" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"d" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=d" ((USItype) (sh)), \
"=&d" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"d" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#if defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("mulu%.l %3,%1:%0" \
: "=d" ((USItype)(w0)), \
"=d" ((USItype)(w1)) \
: "%0" ((USItype)(u)), \
"dmi" ((USItype)(v)))
: "=d" ((USItype) (w0)), \
"=d" ((USItype) (w1)) \
: "%0" ((USItype) (u)), \
"dmi" ((USItype) (v)))
#define UMUL_TIME 45
#define udiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("divu%.l %4,%1:%0" \
: "=d" ((USItype)(q)), \
"=d" ((USItype)(r)) \
: "0" ((USItype)(n0)), \
"1" ((USItype)(n1)), \
"dmi" ((USItype)(d)))
: "=d" ((USItype) (q)), \
"=d" ((USItype) (r)) \
: "0" ((USItype) (n0)), \
"1" ((USItype) (n1)), \
"dmi" ((USItype) (d)))
#define UDIV_TIME 90
#define sdiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("divs%.l %4,%1:%0" \
: "=d" ((USItype)(q)), \
"=d" ((USItype)(r)) \
: "0" ((USItype)(n0)), \
"1" ((USItype)(n1)), \
"dmi" ((USItype)(d)))
: "=d" ((USItype) (q)), \
"=d" ((USItype) (r)) \
: "0" ((USItype) (n0)), \
"1" ((USItype) (n1)), \
"dmi" ((USItype) (d)))
#define count_leading_zeros(count, x) \
__asm__ ("bfffo %1{%b2:%b2},%0" \
: "=d" ((USItype)(count)) \
: "od" ((USItype)(x)), "n" (0))
: "=d" ((USItype) (count)) \
: "od" ((USItype) (x)), "n" (0))
#else /* not mc68020 */
/* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */
#define umul_ppmm(xh, xl, a, b) \
@ -481,10 +481,10 @@
move%.l %/d2,%1
add%.l %/d1,%/d0
move%.l %/d0,%0" \
: "=g" ((USItype)(xh)), \
"=g" ((USItype)(xl)) \
: "g" ((USItype)(a)), \
"g" ((USItype)(b)) \
: "=g" ((USItype) (xh)), \
"=g" ((USItype) (xl)) \
: "g" ((USItype) (a)), \
"g" ((USItype) (b)) \
: "d0", "d1", "d2", "d3", "d4")
#define UMUL_TIME 100
#define UDIV_TIME 400
@ -495,27 +495,27 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addu.co %1,%r4,%r5
addu.ci %0,%r2,%r3" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%rJ" ((USItype)(ah)), \
"rJ" ((USItype)(bh)), \
"%rJ" ((USItype)(al)), \
"rJ" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%rJ" ((USItype) (ah)), \
"rJ" ((USItype) (bh)), \
"%rJ" ((USItype) (al)), \
"rJ" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subu.co %1,%r4,%r5
subu.ci %0,%r2,%r3" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "rJ" ((USItype)(ah)), \
"rJ" ((USItype)(bh)), \
"rJ" ((USItype)(al)), \
"rJ" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "rJ" ((USItype) (ah)), \
"rJ" ((USItype) (bh)), \
"rJ" ((USItype) (al)), \
"rJ" ((USItype) (bl)))
#define count_leading_zeros(count, x) \
do { \
USItype __cbtmp; \
__asm__ ("ff1 %0,%1" \
: "=r" (__cbtmp) \
: "r" ((USItype)(x))); \
: "r" ((USItype) (x))); \
(count) = __cbtmp ^ 31; \
} while (0)
#if defined (__mc88110__)
@ -526,8 +526,8 @@
} __xx; \
__asm__ ("mulu.d %0,%1,%2" \
: "=r" (__xx.__ll) \
: "r" ((USItype)(u)), \
"r" ((USItype)(v))); \
: "r" ((USItype) (u)), \
"r" ((USItype) (v))); \
(wh) = __xx.__i.__h; \
(wl) = __xx.__i.__l; \
} while (0)
@ -540,7 +540,7 @@
__asm__ ("divu.d %0,%1,%2" \
: "=r" (__q) \
: "r" (__xx.__ll), \
"r" ((USItype)(d))); \
"r" ((USItype) (d))); \
(r) = (n0) - __q * (d); (q) = __q; })
#define UMUL_TIME 5
#define UDIV_TIME 25
@ -553,10 +553,10 @@
#if defined (__mips__)
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("multu %2,%3" \
: "=l" ((USItype)(w0)), \
"=h" ((USItype)(w1)) \
: "d" ((USItype)(u)), \
"d" ((USItype)(v)))
: "=l" ((USItype) (w0)), \
"=h" ((USItype) (w1)) \
: "d" ((USItype) (u)), \
"d" ((USItype) (v)))
#define UMUL_TIME 10
#define UDIV_TIME 100
#endif /* __mips__ */
@ -568,15 +568,15 @@
} __xx; \
__asm__ ("meid %2,%0" \
: "=g" (__xx.__ll) \
: "%0" ((USItype)(u)), \
"g" ((USItype)(v))); \
: "%0" ((USItype) (u)), \
"g" ((USItype) (v))); \
(w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
#define __umulsidi3(u, v) \
({UDItype __w; \
__asm__ ("meid %2,%0" \
: "=g" (__w) \
: "%0" ((USItype)(u)), \
"g" ((USItype)(v))); \
: "%0" ((USItype) (u)), \
"g" ((USItype) (v))); \
__w; })
#define udiv_qrnnd(q, r, n1, n0, d) \
({union {UDItype __ll; \
@ -586,7 +586,7 @@
__asm__ ("deid %2,%0" \
: "=g" (__xx.__ll) \
: "0" (__xx.__ll), \
"g" ((USItype)(d))); \
"g" ((USItype) (d))); \
(r) = __xx.__i.__l; (q) = __xx.__i.__h; })
#endif /* __ns32000__ */
@ -595,70 +595,70 @@
do { \
if (__builtin_constant_p (bh) && (bh) == 0) \
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%r" ((USItype)(ah)), \
"%r" ((USItype)(al)), \
"rI" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%r" ((USItype) (ah)), \
"%r" ((USItype) (al)), \
"rI" ((USItype) (bl))); \
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%r" ((USItype)(ah)), \
"%r" ((USItype)(al)), \
"rI" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%r" ((USItype) (ah)), \
"%r" ((USItype) (al)), \
"rI" ((USItype) (bl))); \
else \
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%r" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"%r" ((USItype)(al)), \
"rI" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%r" ((USItype) (ah)), \
"r" ((USItype) (bh)), \
"%r" ((USItype) (al)), \
"rI" ((USItype) (bl))); \
} while (0)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (ah) && (ah) == 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(bh)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (bh)), \
"rI" ((USItype) (al)), \
"r" ((USItype) (bl))); \
else if (__builtin_constant_p (ah) && (ah) ==~(USItype) 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(bh)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (bh)), \
"rI" ((USItype) (al)), \
"r" ((USItype) (bl))); \
else if (__builtin_constant_p (bh) && (bh) == 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(ah)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (ah)), \
"rI" ((USItype) (al)), \
"r" ((USItype) (bl))); \
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(ah)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (ah)), \
"rI" ((USItype) (al)), \
"r" ((USItype) (bl))); \
else \
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (ah)), \
"r" ((USItype) (bh)), \
"rI" ((USItype) (al)), \
"r" ((USItype) (bl))); \
} while (0)
#define count_leading_zeros(count, x) \
__asm__ ("{cntlz|cntlzw} %0,%1" \
: "=r" ((USItype)(count)) \
: "r" ((USItype)(x)))
: "=r" ((USItype) (count)) \
: "r" ((USItype) (x)))
#if defined (_ARCH_PPC)
#define umul_ppmm(ph, pl, m0, m1) \
do { \
@ -686,8 +686,8 @@
do { \
USItype __m0 = (m0), __m1 = (m1); \
__asm__ ("mul %0,%2,%3" \
: "=r" ((USItype)(xh)), \
"=q" ((USItype)(xl)) \
: "=r" ((USItype) (xh)), \
"=q" ((USItype) (xl)) \
: "r" (__m0), \
"r" (__m1)); \
(xh) += ((((SItype) __m0 >> 31) & __m1) \
@ -696,15 +696,15 @@
#define UMUL_TIME 8
#define smul_ppmm(xh, xl, m0, m1) \
__asm__ ("mul %0,%2,%3" \
: "=r" ((SItype)(xh)), \
"=q" ((SItype)(xl)) \
: "=r" ((SItype) (xh)), \
"=q" ((SItype) (xl)) \
: "r" (m0), \
"r" (m1))
#define SMUL_TIME 4
#define sdiv_qrnnd(q, r, nh, nl, d) \
__asm__ ("div %0,%2,%4" \
: "=r" ((SItype)(q)), "=q" ((SItype)(r)) \
: "r" ((SItype)(nh)), "1" ((SItype)(nl)), "r" ((SItype)(d)))
: "=r" ((SItype) (q)), "=q" ((SItype) (r)) \
: "r" ((SItype) (nh)), "1" ((SItype) (nl)), "r" ((SItype) (d)))
#define UDIV_TIME 100
#endif
#endif /* Power architecture variants. */
@ -713,21 +713,21 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addw %5,%1
addwc %3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subw %5,%1
subwb %3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"g" ((USItype) (bl)))
/* This insn works on Pyramids with AP, XP, or MI CPUs, but not with SP. */
#define umul_ppmm(w1, w0, u, v) \
({union {UDItype __ll; \
@ -737,7 +737,7 @@
uemul %2,%0" \
: "=&r" (__xx.__ll) \
: "g" ((USItype) (u)), \
"g" ((USItype)(v))); \
"g" ((USItype) (v))); \
(w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
#endif /* __pyr__ */
@ -745,21 +745,21 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("a %1,%5
ae %0,%3" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"r" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"r" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"r" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("s %1,%5
se %0,%3" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"r" ((USItype)(bl)))
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"r" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"r" ((USItype) (bl)))
#define umul_ppmm(ph, pl, m0, m1) \
do { \
USItype __m0 = (m0), __m1 = (m1); \
@ -784,8 +784,8 @@
m r2,%3
cas %0,r2,r0
mfs r10,%1" \
: "=r" ((USItype)(ph)), \
"=r" ((USItype)(pl)) \
: "=r" ((USItype) (ph)), \
"=r" ((USItype) (pl)) \
: "%r" (__m0), \
"r" (__m1) \
: "r2"); \
@ -798,13 +798,13 @@
do { \
if ((x) >= 0x10000) \
__asm__ ("clz %0,%1" \
: "=r" ((USItype)(count)) \
: "r" ((USItype)(x) >> 16)); \
: "=r" ((USItype) (count)) \
: "r" ((USItype) (x) >> 16)); \
else \
{ \
__asm__ ("clz %0,%1" \
: "=r" ((USItype)(count)) \
: "r" ((USItype)(x))); \
: "=r" ((USItype) (count)) \
: "r" ((USItype) (x))); \
(count) += 16; \
} \
} while (0)
@ -814,47 +814,47 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addcc %r4,%5,%1
addx %r2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%rJ" ((USItype)(ah)), \
"rI" ((USItype)(bh)), \
"%rJ" ((USItype)(al)), \
"rI" ((USItype)(bl)) \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%rJ" ((USItype) (ah)), \
"rI" ((USItype) (bh)), \
"%rJ" ((USItype) (al)), \
"rI" ((USItype) (bl)) \
__CLOBBER_CC)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subcc %r4,%5,%1
subx %r2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "rJ" ((USItype)(ah)), \
"rI" ((USItype)(bh)), \
"rJ" ((USItype)(al)), \
"rI" ((USItype)(bl)) \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "rJ" ((USItype) (ah)), \
"rI" ((USItype) (bh)), \
"rJ" ((USItype) (al)), \
"rI" ((USItype) (bl)) \
__CLOBBER_CC)
#if defined (__sparc_v8__)
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("umul %2,%3,%1;rd %%y,%0" \
: "=r" ((USItype)(w1)), \
"=r" ((USItype)(w0)) \
: "r" ((USItype)(u)), \
"r" ((USItype)(v)))
: "=r" ((USItype) (w1)), \
"=r" ((USItype) (w0)) \
: "r" ((USItype) (u)), \
"r" ((USItype) (v)))
#define udiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\
: "=&r" ((USItype)(q)), \
"=&r" ((USItype)(r)) \
: "r" ((USItype)(n1)), \
"r" ((USItype)(n0)), \
"r" ((USItype)(d)))
: "=&r" ((USItype) (q)), \
"=&r" ((USItype) (r)) \
: "r" ((USItype) (n1)), \
"r" ((USItype) (n0)), \
"r" ((USItype) (d)))
#else
#if defined (__sparclite__)
/* This has hardware multiply but not divide. It also has two additional
instructions scan (ffs from high bit) and divscc. */
#define umul_ppmm(w1, w0, u, v) \
__asm__ ("umul %2,%3,%1;rd %%y,%0" \
: "=r" ((USItype)(w1)), \
"=r" ((USItype)(w0)) \
: "r" ((USItype)(u)), \
"r" ((USItype)(v)))
: "=r" ((USItype) (w1)), \
"=r" ((USItype) (w0)) \
: "r" ((USItype) (u)), \
"r" ((USItype) (v)))
#define udiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("! Inlined udiv_qrnnd
wr %%g0,%2,%%y ! Not a delayed write for sparclite
@ -895,17 +895,17 @@
bl,a 1f
add %1,%4,%1
1: ! End of inline udiv_qrnnd" \
: "=r" ((USItype)(q)), \
"=r" ((USItype)(r)) \
: "r" ((USItype)(n1)), \
"r" ((USItype)(n0)), \
"rI" ((USItype)(d)) \
: "=r" ((USItype) (q)), \
"=r" ((USItype) (r)) \
: "r" ((USItype) (n1)), \
"r" ((USItype) (n0)), \
"rI" ((USItype) (d)) \
: "%g1" __AND_CLOBBER_CC)
#define UDIV_TIME 37
#define count_leading_zeros(count, x) \
__asm__ ("scan %1,0,%0" \
: "=r" ((USItype)(x)) \
: "r" ((USItype)(count)))
: "=r" ((USItype) (x)) \
: "r" ((USItype) (count)))
#else
/* SPARC without integer multiplication and divide instructions.
(i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */
@ -950,10 +950,10 @@
mulscc %%g1,0,%%g1
add %%g1,%%g2,%0
rd %%y,%1" \
: "=r" ((USItype)(w1)), \
"=r" ((USItype)(w0)) \
: "%rI" ((USItype)(u)), \
"r" ((USItype)(v)) \
: "=r" ((USItype) (w1)), \
"=r" ((USItype) (w0)) \
: "%rI" ((USItype) (u)), \
"r" ((USItype) (v)) \
: "%g1", "%g2" __AND_CLOBBER_CC)
#define UMUL_TIME 39 /* 39 instructions */
/* It's quite necessary to add this much assembler for the sparc.
@ -983,11 +983,11 @@
sub %1,%2,%1
3: xnor %0,0,%0
! End of inline udiv_qrnnd" \
: "=&r" ((USItype)(q)), \
"=&r" ((USItype)(r)) \
: "r" ((USItype)(d)), \
"1" ((USItype)(n1)), \
"0" ((USItype)(n0)) : "%g1" __AND_CLOBBER_CC)
: "=&r" ((USItype) (q)), \
"=&r" ((USItype) (r)) \
: "r" ((USItype) (d)), \
"1" ((USItype) (n1)), \
"0" ((USItype) (n0)) : "%g1" __AND_CLOBBER_CC)
#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */
#endif /* __sparclite__ */
#endif /* __sparc_v8__ */
@ -997,21 +997,21 @@
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addl2 %5,%1
adwc %3,%0" \
: "=g" ((USItype)(sh)), \
"=&g" ((USItype)(sl)) \
: "%0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"%1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=g" ((USItype) (sh)), \
"=&g" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"%1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subl2 %5,%1
sbwc %3,%0" \
: "=g" ((USItype)(sh)), \
"=&g" ((USItype)(sl)) \
: "0" ((USItype)(ah)), \
"g" ((USItype)(bh)), \
"1" ((USItype)(al)), \
"g" ((USItype)(bl)))
: "=g" ((USItype) (sh)), \
"=&g" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
"g" ((USItype) (bh)), \
"1" ((USItype) (al)), \
"g" ((USItype) (bl)))
#define umul_ppmm(xh, xl, m0, m1) \
do { \
union { \

View file

@ -207,10 +207,10 @@ extern char *oballoc ();
struct movable
{
rtx insn; /* A movable insn */
rtx set_src; /* The expression this reg is set from. */
rtx set_dest; /* The destination of this SET. */
rtx set_src; /* The expression this reg is set from. */
rtx set_dest; /* The destination of this SET. */
rtx dependencies; /* When INSN is libcall, this is an EXPR_LIST
of any registers used within the LIBCALL. */
of any registers used within the LIBCALL. */
int consec; /* Number of consecutive following insns
that must be moved with this one. */
int regno; /* The register it sets */
@ -233,7 +233,7 @@ struct movable
invariant. */
unsigned int move_insn : 1; /* 1 means that we call emit_move_insn to
load SRC, rather than copying INSN. */
unsigned int is_equiv : 1; /* 1 means a REG_EQUIV is present on INSN. */
unsigned int is_equiv : 1; /* 1 means a REG_EQUIV is present on INSN. */
enum machine_mode savemode; /* Nonzero means it is a mode for a low part
that we should avoid changing when clearing
the rest of the reg. */
@ -346,7 +346,7 @@ loop_optimize (f, dumpfile)
regs_may_share = 0;
/* Count the number of loops. */
/* Count the number of loops. */
max_loop_num = 0;
for (insn = f; insn; insn = NEXT_INSN (insn))
@ -877,7 +877,7 @@ scan_loop (loop_start, end, nregs)
If this insn was made by loop, we don't know its
INSN_LUID and hence must make a conservative
assumption. */
assumption. */
m->global = (INSN_UID (p) >= max_uid_for_loop
|| (uid_luid[regno_last_uid[regno]]
> INSN_LUID (end))
@ -1116,7 +1116,7 @@ libcall_benefit (last)
{
if (GET_CODE (insn) == CALL_INSN)
benefit += 10; /* Assume at least this many insns in a library
routine. */
routine. */
else if (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
@ -1723,7 +1723,7 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
{
rtx i1, temp;
/* If first insn of libcall sequence, skip to end. */
/* If first insn of libcall sequence, skip to end. */
/* Do this at start of loop, since p is guaranteed to
be an insn here. */
if (GET_CODE (p) != NOTE
@ -1875,7 +1875,7 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
/* This isn't needed because REG_NOTES is copied
below and is wrong since P might be a PARALLEL. */
if (REG_NOTES (i1) == 0
&& ! m->partial /* But not if it's a zero-extend clr. */
&& ! m->partial /* But not if it's a zero-extend clr. */
&& ! m->global /* and not if used outside the loop
(since it might get set outside). */
&& CONSTANT_P (SET_SRC (PATTERN (p))))
@ -2415,7 +2415,7 @@ find_and_verify_loops (f)
LABEL_NUSES (cond_label)++;
/* Verify that uid_loop_num is large enough and that
we can invert P. */
we can invert P. */
if (invert_jump (p, new_label))
{
rtx q, r;
@ -2458,7 +2458,7 @@ find_and_verify_loops (f)
loop_num = loop_outer_loop[loop_num])
loop_number_exit_count[loop_num]--;
/* If we didn't find it, then something is wrong. */
/* If we didn't find it, then something is wrong. */
if (! r)
abort ();
}
@ -3175,10 +3175,10 @@ static rtx addr_placeholder;
it is safe to keep the value in a register for the duration of the
loop. One tricky thing is that the copying of the value back from the
register has to be done on all exits from the loop. You need to check that
all the exits from the loop go to the same place. */
all the exits from the loop go to the same place. */
/* ??? The interaction of biv elimination, and recognition of 'constant'
bivs, may cause problems. */
bivs, may cause problems. */
/* ??? Add heuristics so that DEST_ADDR strength reduction does not cause
performance problems.
@ -3590,7 +3590,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
((benefit = general_induction_var (SET_SRC (set),
&src_reg, &add_val,
&mult_val))
/* Equivalent expression is a giv. */
/* Equivalent expression is a giv. */
|| ((regnote = find_reg_note (p, REG_EQUAL, NULL_RTX))
&& (benefit = general_induction_var (XEXP (regnote, 0),
&src_reg,
@ -3602,7 +3602,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
&& dest_reg != src_reg
/* This must be the only place where the register is set. */
&& (n_times_set[REGNO (dest_reg)] == 1
/* or all sets must be consecutive and make a giv. */
/* or all sets must be consecutive and make a giv. */
|| (benefit = consec_sets_giv (benefit, p,
src_reg, dest_reg,
&add_val, &mult_val))))
@ -4141,14 +4141,14 @@ strength_reduce (scan_start, end, loop_top, insn_count,
or otherwise drop straight in, based on this test, then
we might want to rewrite it also. This way some later
pass has more hope of removing the initialization of this
biv entirely. */
biv entirely. */
/* If final_value != 0, then the biv may be used after loop end
and we must emit an insn to set it just in case.
Reversed bivs already have an insn after the loop setting their
value, so we don't need another one. We can't calculate the
proper final value for such a biv here anyways. */
proper final value for such a biv here anyways. */
if (final_value != 0 && ! bl->reversed)
{
rtx insert_before;
@ -4509,7 +4509,7 @@ record_giv (v, insn, src_reg, dest_reg, mult_val, add_val, benefit,
/* If the lifetime is zero, it means that this register is
really a dead store. So mark this as a giv that can be
ignored. This will not prevent the biv from being eliminated. */
ignored. This will not prevent the biv from being eliminated. */
if (v->lifetime == 0)
v->ignore = 1;
@ -4988,7 +4988,7 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val)
: GET_MODE (SET_SRC (set))),
dest_reg, insn,
inc_val, mult_val);
/* ... fall through ... */
/* ... fall through ... */
/* Can accept constant setting of biv only when inside inner most loop.
Otherwise, a biv of an inner loop may be incorrectly recognized
@ -5264,7 +5264,7 @@ simplify_giv_expr (x, benefit)
benefit);
case MINUS:
/* Handle "a - b" as "a + b * (-1)". */
/* Handle "a - b" as "a + b * (-1)". */
return simplify_giv_expr (gen_rtx (PLUS, mode,
XEXP (x, 0),
gen_rtx (MULT, mode,
@ -5304,7 +5304,7 @@ simplify_giv_expr (x, benefit)
return GEN_INT (INTVAL (arg0) * INTVAL (arg1));
case USE:
/* invar * invar. Not giv. */
/* invar * invar. Not giv. */
return 0;
case MULT:
@ -5645,7 +5645,7 @@ combine_givs (bl)
{
g2 = giv_array[j];
if (g1 != g2
/* First try to combine with replaceable givs, then all givs. */
/* First try to combine with replaceable givs, then all givs. */
&& (g1->replaceable || pass == 1)
/* If either has already been combined or is to be ignored, can't
combine. */
@ -5692,7 +5692,7 @@ emit_iv_add_mult (b, m, a, reg, insert_before)
a = copy_rtx (a);
b = copy_rtx (b);
/* Increase the lifetime of any invariants moved further in code. */
/* Increase the lifetime of any invariants moved further in code. */
update_reg_last_use (a, insert_before);
update_reg_last_use (b, insert_before);
update_reg_last_use (m, insert_before);
@ -5721,7 +5721,7 @@ product_cheap_p (a, b)
char *storage = (char *) obstack_alloc (&temp_obstack, 0);
int win = 1;
/* If only one is constant, make it B. */
/* If only one is constant, make it B. */
if (GET_CODE (a) == CONST_INT)
tmp = a, a = b, b = tmp;
@ -6057,7 +6057,7 @@ check_dbra_loop (loop_end, insn_count, loop_start)
{
JUMP_LABEL (tem) = XEXP (jump_label, 0);
/* Increment of LABEL_NUSES done above. */
/* Increment of LABEL_NUSES done above. */
/* Register is now always nonnegative,
so add REG_NONNEG note to the branch. */
REG_NOTES (tem) = gen_rtx (EXPR_LIST, REG_NONNEG, NULL_RTX,

View file

@ -77,7 +77,7 @@ MAX_MACHINE_MODE };
/* Get the name of mode MODE as a string. */
extern char *mode_name[];
#define GET_MODE_NAME(MODE) (mode_name[(int)(MODE)])
#define GET_MODE_NAME(MODE) (mode_name[(int) (MODE)])
enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MAX_MODE_CLASS};
@ -86,7 +86,7 @@ enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
(integer, floating, complex, etc.) */
extern enum mode_class mode_class[];
#define GET_MODE_CLASS(MODE) (mode_class[(int)(MODE)])
#define GET_MODE_CLASS(MODE) (mode_class[(int) (MODE)])
/* Nonzero if MODE is an integral mode. */
#define INTEGRAL_MODE_P(MODE) \
@ -102,12 +102,12 @@ extern enum mode_class mode_class[];
/* Get the size in bytes of an object of mode MODE. */
extern int mode_size[];
#define GET_MODE_SIZE(MODE) (mode_size[(int)(MODE)])
#define GET_MODE_SIZE(MODE) (mode_size[(int) (MODE)])
/* Get the size in bytes of the basic parts of an object of mode MODE. */
extern int mode_unit_size[];
#define GET_MODE_UNIT_SIZE(MODE) (mode_unit_size[(int)(MODE)])
#define GET_MODE_UNIT_SIZE(MODE) (mode_unit_size[(int) (MODE)])
/* Get the number of units in the object. */
@ -117,7 +117,7 @@ extern int mode_unit_size[];
/* Get the size in bits of an object of mode MODE. */
#define GET_MODE_BITSIZE(MODE) (BITS_PER_UNIT * mode_size[(int)(MODE)])
#define GET_MODE_BITSIZE(MODE) (BITS_PER_UNIT * mode_size[(int) (MODE)])
/* Get a bitmask containing 1 for all bits in a word
that fit within mode MODE. */
@ -129,7 +129,7 @@ extern int mode_unit_size[];
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
extern enum machine_mode mode_wider_mode[];
#define GET_MODE_WIDER_MODE(MODE) (mode_wider_mode[(int)(MODE)])
#define GET_MODE_WIDER_MODE(MODE) (mode_wider_mode[(int) (MODE)])
/* Return the mode for data of a given size SIZE and mode class CLASS.
If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE.
@ -150,7 +150,7 @@ extern enum machine_mode get_best_mode PROTO((int, int, int, enum machine_mode,
/* For each class, get the narrowest mode in that class. */
extern enum machine_mode class_narrowest_mode[];
#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[(int)(CLASS)]
#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[(int) (CLASS)]
/* Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD
and the mode whose class is Pmode and whose size is POINTER_SIZE. */

View file

@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
which does not include mips.h.
These must match the corresponding definitions in gdb/mipsread.c.
Unfortunately, gcc and gdb do not currently share any directories. */
Unfortunately, gcc and gdb do not currently share any directories. */
#define CODE_MASK 0x8F300
#define MIPS_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK)
@ -308,7 +308,7 @@ read_seek (ptr, size, offset, context)
if (size == 0) /* nothing to read */
return ptr;
if ((ptr == (PTR_T)0 && (ptr = malloc (size)) == (PTR_T)0)
if ((ptr == (PTR_T) 0 && (ptr = malloc (size)) == (PTR_T) 0)
|| (tfile_offset != offset && lseek (tfile_fd, offset, 0) == -1)
|| (read_size = read (tfile_fd, ptr, size)) < 0)
{
@ -721,7 +721,7 @@ type_to_string (aux_ptr, index, fdp)
int j;
/* Print array bounds reversed (ie, in the order the C
programmer writes them). C is such a fun language.... */
programmer writes them). C is such a fun language.... */
while (i < 5 && qualifiers[i+1].type == tq_Array)
i++;
@ -833,60 +833,60 @@ print_sym_hdr (sym_ptr)
printf(" %-*s %11s %11s %11s\n", width, "====", "======", "======", "=====\n");
printf(" %-*s %11ld %11ld %11ld [%d]\n", width, "Line numbers",
(long)sym_ptr->cbLineOffset,
(long)sym_ptr->cbLine,
(long)sym_ptr->cbLine,
(int)sym_ptr->ilineMax);
(long) sym_ptr->cbLineOffset,
(long) sym_ptr->cbLine,
(long) sym_ptr->cbLine,
(int) sym_ptr->ilineMax);
printf(" %-*s %11ld %11ld %11ld\n", width, "Dense numbers",
(long)sym_ptr->cbDnOffset,
(long)sym_ptr->idnMax,
(long)(sym_ptr->idnMax * sizeof (DNR)));
(long) sym_ptr->cbDnOffset,
(long) sym_ptr->idnMax,
(long) (sym_ptr->idnMax * sizeof (DNR)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Procedures Tables",
(long)sym_ptr->cbPdOffset,
(long)sym_ptr->ipdMax,
(long)(sym_ptr->ipdMax * sizeof (PDR)));
(long) sym_ptr->cbPdOffset,
(long) sym_ptr->ipdMax,
(long) (sym_ptr->ipdMax * sizeof (PDR)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Local Symbols",
(long)sym_ptr->cbSymOffset,
(long)sym_ptr->isymMax,
(long)(sym_ptr->isymMax * sizeof (SYMR)));
(long) sym_ptr->cbSymOffset,
(long) sym_ptr->isymMax,
(long) (sym_ptr->isymMax * sizeof (SYMR)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Optimization Symbols",
(long)sym_ptr->cbOptOffset,
(long)sym_ptr->ioptMax,
(long)(sym_ptr->ioptMax * sizeof (OPTR)));
(long) sym_ptr->cbOptOffset,
(long) sym_ptr->ioptMax,
(long) (sym_ptr->ioptMax * sizeof (OPTR)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Auxiliary Symbols",
(long)sym_ptr->cbAuxOffset,
(long)sym_ptr->iauxMax,
(long)(sym_ptr->iauxMax * sizeof (AUXU)));
(long) sym_ptr->cbAuxOffset,
(long) sym_ptr->iauxMax,
(long) (sym_ptr->iauxMax * sizeof (AUXU)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Local Strings",
(long)sym_ptr->cbSsOffset,
(long)sym_ptr->issMax,
(long)sym_ptr->issMax);
(long) sym_ptr->cbSsOffset,
(long) sym_ptr->issMax,
(long) sym_ptr->issMax);
printf(" %-*s %11ld %11ld %11ld\n", width, "External Strings",
(long)sym_ptr->cbSsExtOffset,
(long)sym_ptr->issExtMax,
(long)sym_ptr->issExtMax);
(long) sym_ptr->cbSsExtOffset,
(long) sym_ptr->issExtMax,
(long) sym_ptr->issExtMax);
printf(" %-*s %11ld %11ld %11ld\n", width, "File Tables",
(long)sym_ptr->cbFdOffset,
(long)sym_ptr->ifdMax,
(long)(sym_ptr->ifdMax * sizeof (FDR)));
(long) sym_ptr->cbFdOffset,
(long) sym_ptr->ifdMax,
(long) (sym_ptr->ifdMax * sizeof (FDR)));
printf(" %-*s %11ld %11ld %11ld\n", width, "Relative Files",
(long)sym_ptr->cbRfdOffset,
(long)sym_ptr->crfd,
(long)(sym_ptr->crfd * sizeof (ulong)));
(long) sym_ptr->cbRfdOffset,
(long) sym_ptr->crfd,
(long) (sym_ptr->crfd * sizeof (ulong)));
printf(" %-*s %11ld %11ld %11ld\n", width, "External Symbols",
(long)sym_ptr->cbExtOffset,
(long)sym_ptr->iextMax,
(long)(sym_ptr->iextMax * sizeof (EXTR)));
(long) sym_ptr->cbExtOffset,
(long) sym_ptr->iextMax,
(long) (sym_ptr->iextMax * sizeof (EXTR)));
}
@ -909,7 +909,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
printf ("\n Symbol# %d: \"%s\"\n", number, sym_ptr->iss + strbase);
if (aux_base != (AUXU *)0 && index != indexNil)
if (aux_base != (AUXU *) 0 && index != indexNil)
switch (symbol_type)
{
case st_Nil:
@ -921,7 +921,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
printf (" End+1 symbol: %ld\n", index);
if (want_scope)
{
if (free_scope == (scope_t *)0)
if (free_scope == (scope_t *) 0)
scope_ptr = (scope_t *) malloc (sizeof (scope_t));
else
{
@ -947,7 +947,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
if (want_scope)
{
if (cur_scope == (scope_t *)0)
if (cur_scope == (scope_t *) 0)
printf (" Can't pop end scope\n");
else
{
@ -975,7 +975,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
if (want_scope)
{
if (free_scope == (scope_t *)0)
if (free_scope == (scope_t *) 0)
scope_ptr = (scope_t *) malloc (sizeof (scope_t));
else
{
@ -1011,12 +1011,12 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
if (want_scope)
{
printf (" Scopes: ");
if (cur_scope == (scope_t *)0)
if (cur_scope == (scope_t *) 0)
printf (" none\n");
else
{
for (scope_ptr = cur_scope;
scope_ptr != (scope_t *)0;
scope_ptr != (scope_t *) 0;
scope_ptr = scope_ptr->prev)
{
char *class;
@ -1220,7 +1220,7 @@ print_file_desc (fdp, number)
(ulong) (fdp->rfdBase * sizeof(ulong) + sym_hdr.cbRfdOffset));
if (want_scope && cur_scope != (scope_t *)0)
if (want_scope && cur_scope != (scope_t *) 0)
printf ("\n Warning scope does not start at 0!\n");
/*
@ -1238,7 +1238,7 @@ print_file_desc (fdp, number)
-1,
fdp);
if (want_scope && cur_scope != (scope_t *)0)
if (want_scope && cur_scope != (scope_t *) 0)
printf ("\n Warning scope does not end at 0!\n");
/*
@ -1328,7 +1328,7 @@ print_file_desc (fdp, number)
if (pdi == fdp->cpd + fdp->ipdFirst - 1) /* last procedure */
line_end = ((uchar *)lines) + fdp->cbLine + fdp->cbLineOffset;
else /* not last proc. */
else /* not last proc. */
line_end = (((uchar *)lines) + proc_desc[pdi+1].cbLineOffset
+ fdp->cbLineOffset);
@ -1368,12 +1368,12 @@ read_tfile __proto((void))
short magic;
off_t sym_hdr_offset = 0;
(void) read_seek ((PTR_T) &magic, sizeof (magic), (off_t)0, "Magic number");
(void) read_seek ((PTR_T) &magic, sizeof (magic), (off_t) 0, "Magic number");
if (!tfile)
{
/* Print out the global header, since this is not a T-file. */
(void) read_seek ((PTR_T) &global_hdr, sizeof (global_hdr), (off_t)0,
(void) read_seek ((PTR_T) &global_hdr, sizeof (global_hdr), (off_t) 0,
"Global file header");
print_global_hdr (&global_hdr);
@ -1394,32 +1394,32 @@ read_tfile __proto((void))
print_sym_hdr (&sym_hdr);
lines = (LINER *) read_seek ((PTR_T)0,
lines = (LINER *) read_seek ((PTR_T) 0,
sym_hdr.cbLine,
sym_hdr.cbLineOffset,
"Line numbers");
dense_nums = (DNR *) read_seek ((PTR_T)0,
dense_nums = (DNR *) read_seek ((PTR_T) 0,
sym_hdr.idnMax * sizeof (DNR),
sym_hdr.cbDnOffset,
"Dense numbers");
proc_desc = (PDR *) read_seek ((PTR_T)0,
proc_desc = (PDR *) read_seek ((PTR_T) 0,
sym_hdr.ipdMax * sizeof (PDR),
sym_hdr.cbPdOffset,
"Procedure tables");
l_symbols = (SYMR *) read_seek ((PTR_T)0,
l_symbols = (SYMR *) read_seek ((PTR_T) 0,
sym_hdr.isymMax * sizeof (SYMR),
sym_hdr.cbSymOffset,
"Local symbols");
opt_symbols = (OPTR *) read_seek ((PTR_T)0,
opt_symbols = (OPTR *) read_seek ((PTR_T) 0,
sym_hdr.ioptMax * sizeof (OPTR),
sym_hdr.cbOptOffset,
"Optimization symbols");
aux_symbols = (AUXU *) read_seek ((PTR_T)0,
aux_symbols = (AUXU *) read_seek ((PTR_T) 0,
sym_hdr.iauxMax * sizeof (AUXU),
sym_hdr.cbAuxOffset,
"Auxiliary symbols");
@ -1427,34 +1427,34 @@ read_tfile __proto((void))
if (sym_hdr.iauxMax > 0)
{
aux_used = calloc (sym_hdr.iauxMax, 1);
if (aux_used == (char *)0)
if (aux_used == (char *) 0)
{
perror ("calloc");
exit (1);
}
}
l_strings = (char *) read_seek ((PTR_T)0,
l_strings = (char *) read_seek ((PTR_T) 0,
sym_hdr.issMax,
sym_hdr.cbSsOffset,
"Local string table");
e_strings = (char *) read_seek ((PTR_T)0,
e_strings = (char *) read_seek ((PTR_T) 0,
sym_hdr.issExtMax,
sym_hdr.cbSsExtOffset,
"External string table");
file_desc = (FDR *) read_seek ((PTR_T)0,
file_desc = (FDR *) read_seek ((PTR_T) 0,
sym_hdr.ifdMax * sizeof (FDR),
sym_hdr.cbFdOffset,
"File tables");
rfile_desc = (ulong *) read_seek ((PTR_T)0,
rfile_desc = (ulong *) read_seek ((PTR_T) 0,
sym_hdr.crfd * sizeof (ulong),
sym_hdr.cbRfdOffset,
"Relative file tables");
e_symbols = (EXTR *) read_seek ((PTR_T)0,
e_symbols = (EXTR *) read_seek ((PTR_T) 0,
sym_hdr.iextMax * sizeof (EXTR),
sym_hdr.cbExtOffset,
"External symbols");

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -88,7 +88,7 @@ optab strlen_optab;
/* Tables of patterns for extending one integer mode to another. */
enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2];
/* Tables of patterns for converting between fixed and floating point. */
/* Tables of patterns for converting between fixed and floating point. */
enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
@ -438,7 +438,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
temp = gen_reg_rtx (mode);
/* If it is a commutative operator and the modes would match
if we would swap the operands, we can save the conversions. */
if we would swap the operands, we can save the conversions. */
if (commutative_op)
{
if (GET_MODE (op0) != mode0 && GET_MODE (op1) != mode1
@ -3517,7 +3517,7 @@ expand_float (to, from, unsignedp)
/* There is no such mode. Pretend the target is wide enough. */
fmode = GET_MODE (to);
/* Avoid double-rounding when TO is narrower than FROM. */
/* Avoid double-rounding when TO is narrower than FROM. */
if ((significand_size (fmode) + 1)
< GET_MODE_BITSIZE (GET_MODE (from)))
{
@ -4338,7 +4338,7 @@ init_optabs ()
#ifdef BROKEN_LDEXP
/* SCO 3.2 apparently has a broken ldexp. */
/* SCO 3.2 apparently has a broken ldexp. */
double
ldexp(x,n)

View file

@ -231,7 +231,7 @@ print_node (file, prefix, node, indent)
return;
}
/* It is unsafe to look at any other filds of an ERROR_MARK node. */
/* It is unsafe to look at any other filds of an ERROR_MARK node. */
if (TREE_CODE (node) == ERROR_MARK)
{
print_node_brief (file, prefix, node, indent);

View file

@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */
/* Any reasonable C++ compiler should have all of the same features
as __STDC__ plus more, so make sure that __STDC__ is defined if
__cplusplus is defined. */
__cplusplus is defined. */
#if defined(__cplusplus) && !defined(__STDC__)
#define __STDC__ 1
@ -264,7 +264,7 @@ static char * syscalls_absolute_filename;
#endif /* !defined (UNPROTOIZE) */
/* Type of the structure that holds information about macro unexpansions. */
/* Type of the structure that holds information about macro unexpansions. */
struct unexpansion_struct {
const char *expanded;
@ -511,7 +511,7 @@ static const char *indent_string = " "; /* Indentation for newly
static int local_flag = 0; /* Insert new local decls (when?). */
static int global_flag = 0; /* set by -g option */
static int cplusplus_flag = 0; /* Rename converted files to *.C. */
static const char* nondefault_syscalls_dir = 0; /* Dir to look for
static const char *nondefault_syscalls_dir = 0; /* Dir to look for
SYSCALLS.c.X in. */
#endif /* !defined (UNPROTOIZE) */
@ -546,7 +546,7 @@ static const char *convert_filename;
/* Pointer to relative root string (taken from aux_info file) which indicates
where directory the user was in when he did the compilation step that
produced the containing aux_info file. */
produced the containing aux_info file. */
static const char *invocation_filename;
@ -1033,14 +1033,14 @@ needs_to_be_converted (file_p)
#ifndef UNPROTOIZE
/* ... and if we a protoizing and this function is in old style ... */
/* ... and if we a protoizing and this function is in old style ... */
!ddp->prototyped
/* ... and if this a definition or is a decl with an associated def ... */
/* ... and if this a definition or is a decl with an associated def ... */
&& (ddp->is_func_def || (!ddp->is_func_def && ddp->definition))
#else /* defined (UNPROTOIZE) */
/* ... and if we are unprotoizing and this function is in new style ... */
/* ... and if we are unprotoizing and this function is in new style ... */
ddp->prototyped
#endif /* defined (UNPROTOIZE) */
@ -1226,7 +1226,7 @@ unexpand_if_needed (aux_info_line)
{
static char *line_buf = 0;
static int line_buf_size = 0;
const unexpansion* unexp_p;
const unexpansion *unexp_p;
int got_unexpanded = 0;
const char *s;
char *copy_p = line_buf;
@ -1700,7 +1700,7 @@ save_def_or_dec (l, is_syscalls)
/* Check that this record describes a new-style, old-style, or implicit
definition or declaration. */
p++; /* Skip over the `:'. */
p++; /* Skip over the `:'. */
check_aux_info ((*p == 'N') || (*p == 'O') || (*p == 'I'));
/* Is this a new style (ANSI prototyped) definition or declaration? */
@ -1906,7 +1906,7 @@ save_def_or_dec (l, is_syscalls)
check_aux_info (*++p == '(');
{
const char *kr_names_start = ++p; /* Point just inside '('. */
const char *kr_names_start = ++p; /* Point just inside '('. */
while (*p++ != ')')
continue;
@ -2597,7 +2597,7 @@ find_extern_def (head, user)
if (dd_p->is_func_def && !dd_p->is_static)
{
if (!extern_def_p) /* Previous definition? */
extern_def_p = dd_p; /* Remember the first definition found. */
extern_def_p = dd_p; /* Remember the first definition found. */
else
{
/* Ignore definition just found if it came from SYSCALLS.c.X. */
@ -2717,7 +2717,7 @@ find_extern_def (head, user)
/* Find the (only?) static definition for a particular function name in a
given file. Here we get the function-name and the file info indirectly
from the def_dec_info record pointer which is passed in. */
from the def_dec_info record pointer which is passed in. */
static const def_dec_info *
find_static_definition (user)
@ -3413,11 +3413,11 @@ edit_formals_lists (end_formals, f_list_count, def_dec_p)
return 0;
}
/* Given a pointer to a byte in the clean text buffer which points to the
beginning of a line that contains a "follower" token for a function
definition header, do whatever is necessary to find the right closing
paren for the rightmost formals list of the function definition header.
*/
/* Given a pointer to a byte in the clean text buffer which points to
the beginning of a line that contains a "follower" token for a
function definition header, do whatever is necessary to find the
right closing paren for the rightmost formals list of the function
definition header. */
static const char *
find_rightmost_formals_list (clean_text_p)
@ -3685,7 +3685,7 @@ add_global_decls (file_p, clean_text_p)
/* Now scan forward for the first non-whitespace character. In theory,
this should be the first character of the following function definition
header. We will put in the added declarations just prior to that. */
header. We will put in the added declarations just prior to that. */
scan_p++;
while (isspace (*scan_p))
@ -4592,7 +4592,7 @@ main (argc, argv)
#endif
longopts, &longind)) != EOF)
{
if (c == 0) /* Long option. */
if (c == 0) /* Long option. */
c = longopts[longind].val;
switch (c)
{

View file

@ -120,7 +120,7 @@ netlib.att.com: netlib/cephes. */
#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
#define IEEE
#else /* it's not IEEE either */
/* UNKnown arithmetic. We don't support this and can't go on. */
/* UNKnown arithmetic. We don't support this and can't go on. */
unknown arithmetic type
#define UNK 1
#endif /* not IEEE */
@ -163,7 +163,7 @@ unknown arithmetic type
#define NANS
#endif
/* Support of NaNs requires support of infinity. */
/* Support of NaNs requires support of infinity. */
#ifdef NANS
#ifndef INFINITY
#define INFINITY
@ -171,7 +171,7 @@ unknown arithmetic type
#endif
/* Find a host integer type that is at least 16 bits wide,
and another type at least twice whatever that size is. */
and another type at least twice whatever that size is. */
#if HOST_BITS_PER_CHAR >= 16
#define EMUSHORT char
@ -193,7 +193,7 @@ unknown arithmetic type
#define EMUSHORT_SIZE HOST_BITS_PER_LONG
#define EMULONG_SIZE (2 * HOST_BITS_PER_LONG)
#else
/* You will have to modify this program to have a smaller unit size. */
/* You will have to modify this program to have a smaller unit size. */
#define EMU_NON_COMPILE
#endif
#endif
@ -212,7 +212,7 @@ unknown arithmetic type
#if HOST_BITS_PER_LONG_LONG >= EMULONG_SIZE
#define EMULONG long long int
#else
/* You will have to modify this program to have a smaller unit size. */
/* You will have to modify this program to have a smaller unit size. */
#define EMU_NON_COMPILE
#endif
#endif
@ -220,12 +220,12 @@ unknown arithmetic type
#endif
/* The host interface doesn't work if no 16-bit size exists. */
/* The host interface doesn't work if no 16-bit size exists. */
#if EMUSHORT_SIZE != 16
#define EMU_NON_COMPILE
#endif
/* OK to continue compilation. */
/* OK to continue compilation. */
#ifndef EMU_NON_COMPILE
/* Construct macros to translate between REAL_VALUE_TYPE and e type.
@ -253,12 +253,12 @@ unknown arithmetic type
#define MINDECEXP -4956
#ifdef REAL_ARITHMETIC
/* Emulator uses target format internally
but host stores it in host endian-ness. */
but host stores it in host endian-ness. */
#define GET_REAL(r,e) \
do { \
if (HOST_FLOAT_WORDS_BIG_ENDIAN == REAL_WORDS_BIG_ENDIAN) \
e53toe ((unsigned EMUSHORT*) (r), (e)); \
e53toe ((unsigned EMUSHORT *) (r), (e)); \
else \
{ \
unsigned EMUSHORT w[4]; \
@ -440,7 +440,7 @@ endian (e, x, mode)
{
case TFmode:
/* Swap halfwords in the fourth long. */
/* Swap halfwords in the fourth long. */
th = (unsigned long) e[6] & 0xffff;
t = (unsigned long) e[7] & 0xffff;
t |= th << 16;
@ -448,7 +448,7 @@ endian (e, x, mode)
case XFmode:
/* Swap halfwords in the third long. */
/* Swap halfwords in the third long. */
th = (unsigned long) e[4] & 0xffff;
t = (unsigned long) e[5] & 0xffff;
t |= th << 16;
@ -480,14 +480,14 @@ endian (e, x, mode)
}
else
{
/* Pack the output array without swapping. */
/* Pack the output array without swapping. */
switch (mode)
{
case TFmode:
/* Pack the fourth long. */
/* Pack the fourth long. */
th = (unsigned long) e[7] & 0xffff;
t = (unsigned long) e[6] & 0xffff;
t |= th << 16;
@ -545,7 +545,7 @@ earith (value, icode, r1, r2)
GET_REAL (r1, d1);
GET_REAL (r2, d2);
#ifdef NANS
/* Return NaN input back to the caller. */
/* Return NaN input back to the caller. */
if (eisnan (d1))
{
PUT_REAL (d1, value);
@ -945,7 +945,7 @@ ereal_ldexp (x, n)
#ifdef REAL_ARITHMETIC
/* Check for infinity in a REAL_VALUE_TYPE. */
/* Check for infinity in a REAL_VALUE_TYPE. */
int
target_isinf (x)
@ -961,7 +961,7 @@ target_isinf (x)
#endif
}
/* Check whether a REAL_VALUE_TYPE item is a NaN. */
/* Check whether a REAL_VALUE_TYPE item is a NaN. */
int
target_isnan (x)
@ -979,7 +979,7 @@ target_isnan (x)
/* Check for a negative REAL_VALUE_TYPE number.
This just checks the sign bit, so that -0 counts as negative. */
This just checks the sign bit, so that -0 counts as negative. */
int
target_negative (x)
@ -1330,7 +1330,7 @@ ereal_isneg (x)
ensure that these values are correct for your computer.
For ANSI C compatibility, define ANSIC equal to 1. Currently
this affects only the atan2 function and others that use it. */
this affects only the atan2 function and others that use it. */
/* Constant definitions for math error conditions. */
@ -1507,7 +1507,7 @@ eisnan (x)
/* NaN has maximum exponent */
if ((x[NE - 1] & 0x7fff) != 0x7fff)
return (0);
/* ... and non-zero significand field. */
/* ... and non-zero significand field. */
for (i = 0; i < NE - 1; i++)
{
if (*x++ != 0)
@ -1519,7 +1519,7 @@ eisnan (x)
}
/* Fill e-type number X with infinity pattern (IEEE)
or largest possible number (non-IEEE). */
or largest possible number (non-IEEE). */
static void
einfin (x)
@ -1675,7 +1675,7 @@ ecleaz (xi)
*xi++ = 0;
}
/* Clear out exploded e-type XI, but don't touch the sign. */
/* Clear out exploded e-type XI, but don't touch the sign. */
static void
ecleazs (xi)
@ -1716,7 +1716,7 @@ einan (x)
x[M + 1] = 0xc000;
}
/* Return nonzero if exploded e-type X is a NaN. */
/* Return nonzero if exploded e-type X is a NaN. */
static int
eiisnan (x)
@ -1757,7 +1757,7 @@ eiinfin (x)
x[E] = 0x7fff;
}
/* Return nonzero if exploded e-type X is infinite. */
/* Return nonzero if exploded e-type X is infinite. */
static int
eiisinf (x)
@ -2090,6 +2090,7 @@ edivm (den, num)
/* Multiply significands */
int
emulm (a, b)
unsigned EMUSHORT a[], b[];
@ -2140,7 +2141,7 @@ emulm (a, b)
/* Radix 65536 versions of multiply and divide. */
/* Multiply significand of e-type number B
by 16-bit quantity A, return e-type result to C. */
by 16-bit quantity A, return e-type result to C. */
static void
m16m (a, b, c)
@ -2208,17 +2209,17 @@ edivm (den, num)
tdenm = den[M+1];
for (i=M; i<NI; i++)
{
/* Find trial quotient digit (the radix is 65536). */
/* Find trial quotient digit (the radix is 65536). */
tnum = (((unsigned EMULONG) num[M]) << 16) + num[M+1];
/* Do not execute the divide instruction if it will overflow. */
/* Do not execute the divide instruction if it will overflow. */
if ((tdenm * 0xffffL) < tnum)
tquot = 0xffff;
else
tquot = tnum / tdenm;
/* Multiply denominator by trial quotient digit. */
/* Multiply denominator by trial quotient digit. */
m16m ((unsigned int)tquot, den, tprod);
/* The quotient digit may have been overestimated. */
/* The quotient digit may have been overestimated. */
if (ecmpm (tprod, num) > 0)
{
tquot -= 1;
@ -2341,7 +2342,7 @@ emdnorm (s, lost, subflg, exp, rcntrl)
/* Normalize */
j = enormlz (s);
/* a blank significand could mean either zero or infinity. */
/* a blank significand could mean either zero or infinity. */
#ifndef INFINITY
if (j > NBITS)
{
@ -2375,10 +2376,10 @@ emdnorm (s, lost, subflg, exp, rcntrl)
return;
}
}
/* Round off, unless told not to by rcntrl. */
/* Round off, unless told not to by rcntrl. */
if (rcntrl == 0)
goto mdfin;
/* Set up rounding parameters if the control register changed. */
/* Set up rounding parameters if the control register changed. */
if (rndprc != rlast)
{
ecleaz (rbit);
@ -2475,7 +2476,7 @@ emdnorm (s, lost, subflg, exp, rcntrl)
eaddm (rbit, s);
}
mddone:
/* Undo the temporary shift for denormal values. */
/* Undo the temporary shift for denormal values. */
if ((exp <= 0) && (rndprc != NBITS)
&& ((rndprc != 64) || ((rndprc == 64) && ! REAL_WORDS_BIG_ENDIAN)))
{
@ -2544,7 +2545,7 @@ esub (a, b, c)
return;
}
/* Infinity minus infinity is a NaN.
Test for subtracting infinities of the same sign. */
Test for subtracting infinities of the same sign. */
if (eisinf (a) && eisinf (b)
&& ((eisneg (a) ^ eisneg (b)) == 0))
{
@ -2557,7 +2558,7 @@ esub (a, b, c)
eadd1 (a, b, c);
}
/* Add. C = A + B, all e type. */
/* Add. C = A + B, all e type. */
static void
eadd (a, b, c)
@ -2565,7 +2566,7 @@ eadd (a, b, c)
{
#ifdef NANS
/* NaN plus anything is a NaN. */
/* NaN plus anything is a NaN. */
if (eisnan (a))
{
emov (a, c);
@ -2577,7 +2578,7 @@ eadd (a, b, c)
return;
}
/* Infinity minus infinity is a NaN.
Test for adding infinities of opposite signs. */
Test for adding infinities of opposite signs. */
if (eisinf (a) && eisinf (b)
&& ((eisneg (a) ^ eisneg (b)) != 0))
{
@ -2716,7 +2717,7 @@ ediv (a, b, c)
sign = eisneg(a) ^ eisneg(b);
#ifdef NANS
/* Return any NaN input. */
/* Return any NaN input. */
if (eisnan (a))
{
emov (a, c);
@ -2727,7 +2728,7 @@ ediv (a, b, c)
emov (b, c);
return;
}
/* Zero over zero, or infinity over infinity, is a NaN. */
/* Zero over zero, or infinity over infinity, is a NaN. */
if (((ecmp (a, ezero) == 0) && (ecmp (b, ezero) == 0))
|| (eisinf (a) && eisinf (b)))
{
@ -2736,14 +2737,14 @@ ediv (a, b, c)
return;
}
#endif
/* Infinity over anything else is infinity. */
/* Infinity over anything else is infinity. */
#ifdef INFINITY
if (eisinf (b))
{
einfin (c);
goto divsign;
}
/* Anything else over infinity is zero. */
/* Anything else over infinity is zero. */
if (eisinf (a))
{
eclear (c);
@ -2755,7 +2756,7 @@ ediv (a, b, c)
lta = ai[E];
ltb = bi[E];
if (bi[E] == 0)
{ /* See if numerator is zero. */
{ /* See if numerator is zero. */
for (i = 1; i < NI - 1; i++)
{
if (bi[i] != 0)
@ -2820,7 +2821,7 @@ emul (a, b, c)
sign = eisneg(a) ^ eisneg(b);
#ifdef NANS
/* NaN times anything is the same NaN. */
/* NaN times anything is the same NaN. */
if (eisnan (a))
{
emov (a, c);
@ -2831,7 +2832,7 @@ emul (a, b, c)
emov (b, c);
return;
}
/* Zero times infinity is a NaN. */
/* Zero times infinity is a NaN. */
if ((eisinf (a) && (ecmp (b, ezero) == 0))
|| (eisinf (b) && (ecmp (a, ezero) == 0)))
{
@ -2840,7 +2841,7 @@ emul (a, b, c)
return;
}
#endif
/* Infinity times anything else is infinity. */
/* Infinity times anything else is infinity. */
#ifdef INFINITY
if (eisinf (a) || eisinf (b))
{
@ -2965,7 +2966,7 @@ e53toe (pe, y)
#endif /* INFINITY */
r >>= 4;
/* If zero exponent, then the significand is denormalized.
So take back the understood high significand bit. */
So take back the understood high significand bit. */
if (r == 0)
{
@ -3017,7 +3018,7 @@ e64toe (pe, y)
p = yy;
for (i = 0; i < NE - 5; i++)
*p++ = 0;
/* This precision is not ordinarily supported on DEC or IBM. */
/* This precision is not ordinarily supported on DEC or IBM. */
#ifdef DEC
for (i = 0; i < 5; i++)
*p++ = *e++;
@ -3197,7 +3198,7 @@ e113toe (pe, y)
*p++ = *e++;
}
#endif
/* If denormal, remove the implied bit; else shift down 1. */
/* If denormal, remove the implied bit; else shift down 1. */
if (r == 0)
{
yy[M] = 0;
@ -3272,7 +3273,7 @@ e24toe (pe, y)
#endif /* INFINITY */
r >>= 7;
/* If zero exponent, then the significand is denormalized.
So take back the understood high significand bit. */
So take back the understood high significand bit. */
if (r == 0)
{
denorm = 1;
@ -3360,7 +3361,7 @@ toe113 (a, b)
else
q = b + 7; /* point to output exponent */
/* If not denormal, delete the implied bit. */
/* If not denormal, delete the implied bit. */
if (a[E] != 0)
{
eshup1 (a);
@ -3649,7 +3650,8 @@ toe53 (x, y)
i = *p++;
if (i >= (unsigned int) 2047)
{ /* Saturate at largest number less than infinity. */
{
/* Saturate at largest number less than infinity. */
#ifdef INFINITY
*y |= 0x7ff0;
if (! REAL_WORDS_BIG_ENDIAN)
@ -3800,7 +3802,7 @@ toe24 (x, y)
*y = 0x8000; /* output sign bit */
i = *p++;
/* Handle overflow cases. */
/* Handle overflow cases. */
if (i >= 255)
{
#ifdef INFINITY
@ -4160,7 +4162,7 @@ euifrac (x, i, frac)
*i = (HOST_WIDE_INT) xi[M] & 0xffff;
}
if (xi[0]) /* A negative value yields unsigned integer 0. */
if (xi[0]) /* A negative value yields unsigned integer 0. */
*i = 0L;
xi[0] = 0;
@ -4528,7 +4530,7 @@ etoasc (x, string, ndigs)
}
tnzro:
/* Test for infinity. */
/* Test for infinity. */
if (y[NE - 1] == 0x7fff)
{
if (sign)
@ -4558,7 +4560,7 @@ etoasc (x, string, ndigs)
if (i < 0)
{ /* Number is greater than 1 */
/* Convert significand to an integer and strip trailing decimal zeros. */
/* Convert significand to an integer and strip trailing decimal zeros. */
emov (y, u);
u[NE - 1] = EXONE + NBITS - 1;
@ -4588,7 +4590,7 @@ etoasc (x, string, ndigs)
emov (eone, t);
m = MAXP;
p = &etens[0][0];
/* An unordered compare result shouldn't happen here. */
/* An unordered compare result shouldn't happen here. */
while (ecmp (ten, u) <= 0)
{
if (ecmp (p, u) <= 0)
@ -4605,7 +4607,7 @@ etoasc (x, string, ndigs)
}
else
{ /* Number is less than 1.0 */
/* Pad significand with trailing decimal zeros. */
/* Pad significand with trailing decimal zeros. */
if (y[NE - 1] == 0)
{
while ((y[NE - 2] & 0x8000) == 0)
@ -4663,7 +4665,7 @@ etoasc (x, string, ndigs)
ediv (t, eone, t);
}
isone:
/* Find the first (leading) digit. */
/* Find the first (leading) digit. */
emovi (t, w);
emovz (w, t);
emovi (y, w);
@ -4686,7 +4688,7 @@ etoasc (x, string, ndigs)
*s++ = '-';
else
*s++ = ' ';
/* Examine number of digits requested by caller. */
/* Examine number of digits requested by caller. */
if (ndigs < 0)
ndigs = 0;
if (ndigs > NDEC)
@ -4707,7 +4709,7 @@ etoasc (x, string, ndigs)
*s++ = (char)digit + '0';
*s++ = '.';
}
/* Generate digits after the decimal point. */
/* Generate digits after the decimal point. */
for (k = 0; k <= ndigs; k++)
{
/* multiply current number by 10, without normalizing */
@ -4725,7 +4727,7 @@ etoasc (x, string, ndigs)
/* round off the ASCII string */
if (digit > 4)
{
/* Test for critical rounding case in ASCII output. */
/* Test for critical rounding case in ASCII output. */
if (digit == 5)
{
emovo (y, t);
@ -4846,7 +4848,7 @@ asctoe (s, y)
}
/* Convert ASCII string SS to e type Y, with a specified rounding precision
of OPREC bits. */
of OPREC bits. */
static void
asctoeg (ss, y, oprec)
@ -4861,7 +4863,7 @@ asctoeg (ss, y, oprec)
unsigned EMUSHORT nsign, *p;
char *sp, *s, *lstr;
/* Copy the input string. */
/* Copy the input string. */
lstr = (char *) alloca (strlen (ss) + 1);
s = ss;
while (*s == ' ') /* skip leading spaces */
@ -4890,7 +4892,7 @@ asctoeg (ss, y, oprec)
/* Ignore leading zeros */
if ((prec == 0) && (decflg == 0) && (k == 0))
goto donchr;
/* Identify and strip trailing zeros after the decimal point. */
/* Identify and strip trailing zeros after the decimal point. */
if ((trail == 0) && (decflg != 0))
{
sp = s;
@ -5038,7 +5040,7 @@ read_expnt:
daldone:
nexp = exp - nexp;
/* Pad trailing zeros to minimize power of 10, per IEEE spec. */
/* Pad trailing zeros to minimize power of 10, per IEEE spec. */
while ((nexp > 0) && (yy[2] == 0))
{
emovz (yy, xt);
@ -5080,7 +5082,7 @@ read_expnt:
esign = -1;
if (nexp > 4096)
{
/* Punt. Can't handle this without 2 divides. */
/* Punt. Can't handle this without 2 divides. */
emovi (etens[0], tt);
lexp -= tt[E];
k = edivm (tt, yy);
@ -5640,7 +5642,7 @@ toibm (x, y, mode)
/* If special NaN bit patterns are required, define them in tm.h
as arrays of unsigned 16-bit shorts. Otherwise, use the default
patterns here. */
patterns here. */
#ifdef TFMODE_NAN
TFMODE_NAN;
#else
@ -5692,7 +5694,7 @@ make_nan (nan, sign, mode)
switch (mode)
{
/* Possibly the `reserved operand' patterns on a VAX can be
used like NaN's, but probably not in the same way as IEEE. */
used like NaN's, but probably not in the same way as IEEE. */
#if !defined(DEC) && !defined(IBM)
case TFmode:
n = 8;
@ -5759,9 +5761,9 @@ ereal_from_float (f)
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;
}
@ -5813,9 +5815,9 @@ ereal_from_double (d)
s[3] = (unsigned EMUSHORT) (d[0] >> 48);
#endif
}
/* 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;
}
@ -5827,7 +5829,7 @@ ereal_from_double (d)
static void
uditoe (di, e)
unsigned EMUSHORT *di; /* Address of the 64-bit int. */
unsigned EMUSHORT *di; /* Address of the 64-bit int. */
unsigned EMUSHORT *e;
{
unsigned EMUSHORT yi[NI];
@ -5852,11 +5854,11 @@ uditoe (di, e)
emovo (yi, e);
}
/* Convert target computer signed 64-bit integer to e-type. */
/* Convert target computer signed 64-bit integer to e-type. */
static void
ditoe (di, e)
unsigned EMUSHORT *di; /* Address of the 64-bit int. */
unsigned EMUSHORT *di; /* Address of the 64-bit int. */
unsigned EMUSHORT *e;
{
unsigned EMULONG acc;
@ -5901,7 +5903,7 @@ ditoe (di, e)
}
/* Convert e-type to unsigned 64-bit int. */
/* Convert e-type to unsigned 64-bit int. */
static void
etoudi (x, i)
@ -5984,7 +5986,7 @@ noshift:
}
/* Convert e-type to signed 64-bit int. */
/* Convert e-type to signed 64-bit int. */
static void
etodi (x, i)
@ -6082,7 +6084,7 @@ etodi (x, i)
}
/* Longhand square root routine. */
/* Longhand square root routine. */
static int esqinited = 0;
@ -6124,7 +6126,7 @@ esqrt (x, y)
return;
}
#endif
/* Bring in the arg and renormalize if it is denormal. */
/* Bring in the arg and renormalize if it is denormal. */
emovi (x, xx);
m = (EMULONG) xx[1]; /* local long word exponent */
if (m == 0)
@ -6153,7 +6155,7 @@ esqrt (x, y)
/* bring in next word of arg */
if (j < NE)
num[NI - 1] = xx[j + 3];
/* Do additional bit on last outer loop, for roundoff. */
/* Do additional bit on last outer loop, for roundoff. */
if (nlups <= 8)
n = nlups + 1;
for (i = 0; i < n; i++)
@ -6179,15 +6181,15 @@ esqrt (x, y)
j += 1;
}
/* Adjust for extra, roundoff loop done. */
/* Adjust for extra, roundoff loop done. */
exp += (NBITS - 1) - rndprc;
/* Sticky bit = 1 if the remainder is nonzero. */
/* Sticky bit = 1 if the remainder is nonzero. */
k = 0;
for (i = 3; i < NI; i++)
k |= (int) num[i];
/* Renormalize and round off. */
/* Renormalize and round off. */
emdnorm (sq, k, 0, exp, 64);
emovo (sq, y);
}

View file

@ -1765,8 +1765,9 @@ constrain_operands (insn_code_num, strict)
break;
case 'X':
/* This is used for a MATCH_SCRATCH in the cases when we
don't actually need anything. So anything goes any time. */
/* This is used for a MATCH_SCRATCH in the cases when
we don't actually need anything. So anything goes
any time. */
win = 1;
break;
@ -1921,7 +1922,7 @@ constrain_operands (insn_code_num, strict)
if ((GET_CODE (recog_operand[opno]) == MEM
|| op_types[opno] != OP_OUT)
&& opno != eopno
/* Ignore things like match_operator operands. */
/* Ignore things like match_operator operands. */
&& *constraints[opno] != 0
&& ! (matching_operands[opno] == eopno
&& rtx_equal_p (recog_operand[opno],

View file

@ -214,7 +214,7 @@ static HARD_REG_SET *block_out_reg_set;
up by find_blocks and used there and in life_analysis. It can be used
later, but only to look up an insn that is the head or tail of some
block. life_analysis and the stack register conversion process can
add insns within a block. */
add insns within a block. */
static int *block_number;
/* This is the register file for all register after conversion */
@ -225,7 +225,7 @@ static rtx
(FP_mode_reg[(regno)-FIRST_STACK_REG][(int)(mode)])
/* Get the basic block number of an insn. See note at block_number
definition are validity of this information. */
definition are validity of this information. */
#define BLOCK_NUM(INSN) \
((INSN_UID (INSN) > max_uid) \
@ -421,7 +421,7 @@ reg_to_stack (first, file)
before_function_beg = 0;
/* Remember whether or not this insn mentions an FP regs.
Check JUMP_INSNs too, in case someone creates a funny PARALLEL. */
Check JUMP_INSNs too, in case someone creates a funny PARALLEL. */
if (GET_RTX_CLASS (code) == 'i'
&& stack_regs_mentioned_p (PATTERN (insn)))
@ -433,7 +433,7 @@ reg_to_stack (first, file)
if (before_function_beg && code == INSN
&& GET_CODE (PATTERN (insn)) == USE)
record_reg_life_pat (PATTERN (insn), (HARD_REG_SET*) 0,
record_reg_life_pat (PATTERN (insn), (HARD_REG_SET *) 0,
&stackentry, 1);
}
else
@ -453,13 +453,13 @@ reg_to_stack (first, file)
if (! stack_reg_seen)
return;
/* If there are stack registers, there must be at least one block. */
/* If there are stack registers, there must be at least one block. */
if (! blocks)
abort ();
/* Allocate some tables that last till end of compiling this function
and some needed only in find_blocks and life_analysis. */
and some needed only in find_blocks and life_analysis. */
block_begin = (rtx *) alloca (blocks * sizeof (rtx));
block_end = (rtx *) alloca (blocks * sizeof (rtx));
@ -477,7 +477,7 @@ reg_to_stack (first, file)
/* Dump the life analysis debug information before jump
optimization, as that will destroy the LABEL_REFS we keep the
information in. */
information in. */
if (file)
dump_stack_info (file);
@ -490,7 +490,7 @@ reg_to_stack (first, file)
/* Check PAT, which is in INSN, for LABEL_REFs. Add INSN to the
label's chain of references, and note which insn contains each
reference. */
reference. */
static void
record_label_references (insn, pat)
@ -508,11 +508,12 @@ record_label_references (insn, pat)
if (GET_CODE (label) != CODE_LABEL)
abort ();
/* If this is an undefined label, LABEL_REFS (label) contains garbage. */
/* If this is an undefined label, LABEL_REFS (label) contains
garbage. */
if (INSN_UID (label) == 0)
return;
/* Don't make a duplicate in the code_label's chain. */
/* Don't make a duplicate in the code_label's chain. */
for (ref = LABEL_REFS (label);
ref && ref != label;
@ -543,7 +544,7 @@ record_label_references (insn, pat)
/* Return a pointer to the REG expression within PAT. If PAT is not a
REG, possible enclosed by a conversion rtx, return the inner part of
PAT that stopped the search. */
PAT that stopped the search. */
static rtx *
get_true_reg (pat)
@ -554,7 +555,7 @@ get_true_reg (pat)
{
case SUBREG:
/* eliminate FP subregister accesses in favour of the
actual FP register in use. */
actual FP register in use. */
{
rtx subreg;
if (FP_REG_P (subreg = SUBREG_REG (*pat)))
@ -587,7 +588,7 @@ get_true_reg (pat)
OPERAND_CLASS is set to `class' as required by the constraints, not to
the subclass. If an alternative allows more than one class,
OPERAND_CLASS is set to the smallest class that is a union of the
allowed classes. */
allowed classes. */
static int
constrain_asm_operands (n_operands, operands, operand_constraints,
@ -660,11 +661,11 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
case '!':
case '*':
case '%':
/* Ignore these. */
/* Ignore these. */
break;
case '#':
/* Ignore rest of this alternative. */
/* Ignore rest of this alternative. */
while (*p && *p != ',') p++;
break;
@ -678,7 +679,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
This kind of constraint is used for instructions such
as add when they take only two operands.
Note that the lower-numbered operand is passed first. */
Note that the lower-numbered operand is passed first. */
if (operands_match_p (operands[c - '0'],
operands[this_operand]))
@ -690,7 +691,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
case 'p':
/* p is used for address_operands. Since this is an asm,
just to make sure that the operand is valid for Pmode. */
just to make sure that the operand is valid for Pmode. */
if (strict_memory_address_p (Pmode, op))
win = 1;
@ -723,7 +724,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
case 'X':
/* This is used for a MATCH_SCRATCH in the cases when we
don't actually need anything. So anything goes any time. */
don't actually need anything. So anything goes any time. */
win = 1;
break;
@ -847,7 +848,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
}
/* For operands constrained to match another operand, copy the other
operand's class to this operand's class. */
operand's class to this operand's class. */
for (j = 0; j < n_operands; j++)
if (operand_matches[j] >= 0)
operand_class[j] = operand_class[operand_matches[j]];
@ -863,7 +864,7 @@ constrain_asm_operands (n_operands, operands, operand_constraints,
There are many rules that an asm statement for stack-like regs must
follow. Those rules are explained at the top of this file: the rule
numbers below refer to that explanation. */
numbers below refer to that explanation. */
static void
record_asm_reg_life (insn, regstack, operands, constraints,
@ -898,7 +899,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
if (i < 0)
malformed_asm = 1;
/* Strip SUBREGs here to make the following code simpler. */
/* Strip SUBREGs here to make the following code simpler. */
for (i = 0; i < n_operands; i++)
if (GET_CODE (operands[i]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[i])) == REG)
@ -934,7 +935,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
operand constraints must select a class with a single reg.
Also enforce rule #5: Output operands must start at the top of
the reg-stack: output operands may not "skip" a reg. */
the reg-stack: output operands may not "skip" a reg. */
bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output));
for (i = 0; i < n_outputs; i++)
@ -967,14 +968,14 @@ record_asm_reg_life (insn, regstack, operands, constraints,
/* Enforce rule #2: All implicitly popped input regs must be closer
to the top of the reg-stack than any input that is not implicitly
popped. */
popped. */
bzero ((char *) implicitly_dies, sizeof (implicitly_dies));
for (i = first_input; i < first_input + n_inputs; i++)
if (STACK_REG_P (operands[i]))
{
/* An input reg is implicitly popped if it is tied to an
output, or if there is a CLOBBER for it. */
output, or if there is a CLOBBER for it. */
int j;
for (j = 0; j < n_clobbers; j++)
@ -1006,7 +1007,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
output constraints must use the "&" earlyclobber.
??? Detect this more deterministically by having constraint_asm_operands
record any earlyclobber. */
record any earlyclobber. */
for (i = first_input; i < first_input + n_inputs; i++)
if (operand_matches[i] == -1)
@ -1079,7 +1080,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
a SET_DEST in DEST, and other registers in SRC.
This function does not know about SET_DESTs that are both input and
output (such as ZERO_EXTRACT) - this cannot happen on a 387. */
output (such as ZERO_EXTRACT) - this cannot happen on a 387. */
static void
record_reg_life_pat (pat, src, dest, douse)
@ -1109,7 +1110,7 @@ record_reg_life_pat (pat, src, dest, douse)
return;
}
/* We don't need to consider either of these cases. */
/* We don't need to consider either of these cases. */
if (GET_CODE (pat) == USE && !douse || GET_CODE (pat) == CLOBBER)
return;
@ -1131,7 +1132,7 @@ record_reg_life_pat (pat, src, dest, douse)
/* Calculate the number of inputs and outputs in BODY, an
asm_operands. N_OPERANDS is the total number of operands, and
N_INPUTS and N_OUTPUTS are pointers to ints into which the results are
placed. */
placed. */
static void
get_asm_operand_lengths (body, n_operands, n_inputs, n_outputs)
@ -1168,7 +1169,7 @@ get_asm_operand_lengths (body, n_operands, n_inputs, n_outputs)
register. The block_end[] data is kept accurate.
Existing death and unset notes for stack registers are deleted
before processing the insn. */
before processing the insn. */
static void
record_reg_life (insn, block, regstack)
@ -1194,13 +1195,13 @@ record_reg_life (insn, block, regstack)
else
note_link = &XEXP (note, 1);
/* Process all patterns in the insn. */
/* Process all patterns in the insn. */
n_operands = asm_noperands (PATTERN (insn));
if (n_operands >= 0)
{
/* This insn is an `asm' with operands. Decode the operands,
decide how many are inputs, and record the life information. */
decide how many are inputs, and record the life information. */
rtx operands[MAX_RECOG_OPERANDS];
rtx body = PATTERN (insn);
@ -1249,7 +1250,7 @@ record_reg_life (insn, block, regstack)
/* There might be a reg that is live after a function call.
Initialize it to zero so that the program does not crash. See
comment towards the end of stack_reg_life_analysis(). */
comment towards the end of stack_reg_life_analysis(). */
for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; reg++)
if (! TEST_HARD_REG_BIT (dest, reg)
@ -1260,7 +1261,7 @@ record_reg_life (insn, block, regstack)
/* The insn will use virtual register numbers, and so
convert_regs is expected to process these. But BLOCK_NUM
cannot be used on these insns, because they do not appear in
block_number[]. */
block_number[]. */
pat = gen_rtx (SET, VOIDmode, FP_MODE_REG (reg, DFmode),
CONST0_RTX (DFmode));
@ -1270,7 +1271,7 @@ record_reg_life (insn, block, regstack)
CLEAR_HARD_REG_BIT (regstack->reg_set, reg);
/* If the CALL_INSN was the end of a block, move the
block_end to point to the new insn. */
block_end to point to the new insn. */
if (block_end[block] == insn)
block_end[block] = init;
@ -1286,7 +1287,7 @@ record_reg_life (insn, block, regstack)
}
/* Find all basic blocks of the function, which starts with FIRST.
For each JUMP_INSN, build the chain of LABEL_REFS on each CODE_LABEL. */
For each JUMP_INSN, build the chain of LABEL_REFS on each CODE_LABEL. */
static void
find_blocks (first)
@ -1299,7 +1300,7 @@ find_blocks (first)
rtx label_value_list = 0;
/* Record where all the blocks start and end.
Record which basic blocks control can drop in to. */
Record which basic blocks control can drop in to. */
block = -1;
for (insn = first; insn; insn = NEXT_INSN (insn))
@ -1479,7 +1480,7 @@ stack_result (decl)
If there are registers that are live at the start of the function,
insns are emitted to initialize these registers. Something similar is
done after CALL_INSNs in record_reg_life. */
done after CALL_INSNs in record_reg_life. */
static void
stack_reg_life_analysis (first, stackentry)
@ -1494,7 +1495,7 @@ stack_reg_life_analysis (first, stackentry)
if (retvalue = stack_result (current_function_decl))
{
/* Find all RETURN insns and mark them. */
/* Find all RETURN insns and mark them. */
for (block = blocks - 1; --block >= 0;)
if (GET_CODE (block_end[block]) == JUMP_INSN
@ -1502,7 +1503,7 @@ stack_reg_life_analysis (first, stackentry)
mark_regs_pat (retvalue, block_out_reg_set+block);
/* Mark off the end of last block if we "fall off" the end of the
function into the epilogue. */
function into the epilogue. */
if (GET_CODE (block_end[blocks-1]) != JUMP_INSN
|| GET_CODE (PATTERN (block_end[blocks-1])) == RETURN)
@ -1529,7 +1530,7 @@ stack_reg_life_analysis (first, stackentry)
/* If the insn is a CALL_INSN, we need to ensure that
everything dies. But otherwise don't process unless there
are some stack regs present. */
are some stack regs present. */
if (GET_MODE (insn) == QImode || GET_CODE (insn) == CALL_INSN)
record_reg_life (insn, block, &regstack);
@ -1537,13 +1538,13 @@ stack_reg_life_analysis (first, stackentry)
} while (insn != block_begin[block]);
/* Set the state at the start of the block. Mark that no
register mapping information known yet. */
register mapping information known yet. */
COPY_HARD_REG_SET (block_stack_in[block].reg_set, regstack.reg_set);
block_stack_in[block].top = -2;
/* If there is a label, propagate our register life to all jumps
to this label. */
to this label. */
if (GET_CODE (insn) == CODE_LABEL)
{
@ -1564,7 +1565,7 @@ stack_reg_life_analysis (first, stackentry)
processed. If there are registers that were not known
to be live then, but are live now, we must back up
and restart life analysis from that point with the new
life information. */
life information. */
GO_IF_HARD_REG_SUBSET (block_stack_in[block].reg_set,
block_out_reg_set[jump_block],
@ -1594,7 +1595,7 @@ stack_reg_life_analysis (first, stackentry)
/* If any reg is live at the start of the first block of a
function, then we must guarantee that the reg holds some value by
generating our own "load" of that register. Otherwise a 387 would
fault trying to access an empty register. */
fault trying to access an empty register. */
/* Load zero into each live register. The fact that a register
appears live at the function start necessarily implies an error
@ -1605,7 +1606,7 @@ stack_reg_life_analysis (first, stackentry)
Note that we are inserting virtual register references here:
these insns must be processed by convert_regs later. Also, these
insns will not be in block_number, so BLOCK_NUM() will fail for them. */
insns will not be in block_number, so BLOCK_NUM() will fail for them. */
for (reg = LAST_STACK_REG; reg >= FIRST_STACK_REG; reg--)
if (TEST_HARD_REG_BIT (block_stack_in[0].reg_set, reg)
@ -1628,7 +1629,7 @@ stack_reg_life_analysis (first, stackentry)
*****************************************************************************/
/* Replace REG, which is a pointer to a stack reg RTX, with an RTX for
the desired hard REGNO. */
the desired hard REGNO. */
static void
replace_reg (reg, regno)
@ -1650,7 +1651,7 @@ replace_reg (reg, regno)
}
/* Remove a note of type NOTE, which must be found, for register
number REGNO from INSN. Remove only one such note. */
number REGNO from INSN. Remove only one such note. */
static void
remove_regno_note (insn, note, regno)
@ -1676,7 +1677,7 @@ remove_regno_note (insn, note, regno)
/* Find the hard register number of virtual register REG in REGSTACK.
The hard register number is relative to the top of the stack. -1 is
returned if the register is not found. */
returned if the register is not found. */
static int
get_hard_regnum (regstack, reg)
@ -1697,7 +1698,7 @@ get_hard_regnum (regstack, reg)
/* Delete INSN from the RTL. Mark the insn, but don't remove it from
the chain of insns. Doing so could confuse block_begin and block_end
if this were the only insn in the block. */
if this were the only insn in the block. */
static void
delete_insn_for_stacker (insn)
@ -1713,7 +1714,7 @@ delete_insn_for_stacker (insn)
pop. WHEN is either emit_insn_before or emit_insn_after. A pop insn
is represented as a SET whose destination is the register to be popped
and source is the top of stack. A death note for the top of stack
cases the movdf pattern to pop. */
cases the movdf pattern to pop. */
static rtx
emit_pop_insn (insn, regstack, reg, when)
@ -1734,7 +1735,7 @@ emit_pop_insn (insn, regstack, reg, when)
FP_MODE_REG (FIRST_STACK_REG, DFmode));
pop_insn = (*when) (pop_rtx, insn);
/* ??? This used to be VOIDmode, but that seems wrong. */
/* ??? This used to be VOIDmode, but that seems wrong. */
PUT_MODE (pop_insn, QImode);
REG_NOTES (pop_insn) = gen_rtx (EXPR_LIST, REG_DEAD,
@ -1755,7 +1756,7 @@ emit_pop_insn (insn, regstack, reg, when)
the swap. A swap insn is represented as a PARALLEL of two patterns:
each pattern moves one reg to the other.
If REG is already at the top of the stack, no insn is emitted. */
If REG is already at the top of the stack, no insn is emitted. */
static void
emit_swap_insn (insn, regstack, reg)
@ -1799,7 +1800,7 @@ emit_swap_insn (insn, regstack, reg)
rtx i1dest = *get_true_reg (&SET_DEST (i1set));
/* If the previous register stack push was from the reg we are to
swap with, omit the swap. */
swap with, omit the swap. */
if (GET_CODE (i1dest) == REG && REGNO (i1dest) == FIRST_STACK_REG
&& GET_CODE (i1src) == REG && REGNO (i1src) == hard_regno - 1
@ -1825,12 +1826,12 @@ emit_swap_insn (insn, regstack, reg)
swap_rtx = gen_swapdf (FP_MODE_REG (hard_regno, DFmode),
FP_MODE_REG (FIRST_STACK_REG, DFmode));
swap_insn = emit_insn_after (swap_rtx, i1);
/* ??? This used to be VOIDmode, but that seems wrong. */
/* ??? This used to be VOIDmode, but that seems wrong. */
PUT_MODE (swap_insn, QImode);
}
/* Handle a move to or from a stack register in PAT, which is in INSN.
REGSTACK is the current stack. */
REGSTACK is the current stack. */
static void
move_for_stack_reg (insn, regstack, pat)
@ -1848,14 +1849,14 @@ move_for_stack_reg (insn, regstack, pat)
if (STACK_REG_P (src) && STACK_REG_P (dest))
{
/* Write from one stack reg to another. If SRC dies here, then
just change the register mapping and delete the insn. */
just change the register mapping and delete the insn. */
note = find_regno_note (insn, REG_DEAD, REGNO (src));
if (note)
{
int i;
/* If this is a no-op move, there must not be a REG_DEAD note. */
/* If this is a no-op move, there must not be a REG_DEAD note. */
if (REGNO (src) == REGNO (dest))
abort ();
@ -1863,12 +1864,12 @@ move_for_stack_reg (insn, regstack, pat)
if (regstack->reg[i] == REGNO (src))
break;
/* The source must be live, and the dest must be dead. */
/* The source must be live, and the dest must be dead. */
if (i < 0 || get_hard_regnum (regstack, dest) >= FIRST_STACK_REG)
abort ();
/* It is possible that the dest is unused after this insn.
If so, just pop the src. */
If so, just pop the src. */
if (find_regno_note (insn, REG_UNUSED, REGNO (dest)))
{
@ -1888,12 +1889,12 @@ move_for_stack_reg (insn, regstack, pat)
return;
}
/* The source reg does not die. */
/* The source reg does not die. */
/* If this appears to be a no-op move, delete it, or else it
will confuse the machine description output patterns. But if
it is REG_UNUSED, we must pop the reg now, as per-insn processing
for REG_UNUSED will not work for deleted insns. */
for REG_UNUSED will not work for deleted insns. */
if (REGNO (src) == REGNO (dest))
{
@ -1918,7 +1919,7 @@ move_for_stack_reg (insn, regstack, pat)
{
/* Save from a stack reg to MEM, or possibly integer reg. Since
only top of stack may be saved, emit an exchange first if
needs be. */
needs be. */
emit_swap_insn (insn, regstack, src);
@ -2006,7 +2007,7 @@ swap_rtx_condition (pat)
Also, a pop insn may need to be emitted. The 387 does have an
`fcompp' insn that can pop two regs, but it is sometimes too expensive
to do this - a `fcomp' followed by a `fstpl %st(0)' may be easier to
set up. */
set up. */
static void
compare_for_stack_reg (insn, regstack, pat)
@ -2021,7 +2022,7 @@ compare_for_stack_reg (insn, regstack, pat)
src2 = get_true_reg (&XEXP (SET_SRC (pat), 1));
/* ??? If fxch turns out to be cheaper than fstp, give priority to
registers that die in this insn - move those to stack top first. */
registers that die in this insn - move those to stack top first. */
if (! STACK_REG_P (*src1)
|| (STACK_REG_P (*src2)
&& get_hard_regnum (regstack, *src2) == FIRST_STACK_REG))
@ -2044,7 +2045,7 @@ compare_for_stack_reg (insn, regstack, pat)
INSN_CODE (insn) = -1;
}
/* We will fix any death note later. */
/* We will fix any death note later. */
src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
@ -2069,7 +2070,7 @@ compare_for_stack_reg (insn, regstack, pat)
/* If the second operand dies, handle that. But if the operands are
the same stack register, don't bother, because only one death is
needed, and it was just handled. */
needed, and it was just handled. */
if (src2_note
&& ! (STACK_REG_P (*src1) && STACK_REG_P (*src2)
@ -2078,7 +2079,7 @@ compare_for_stack_reg (insn, regstack, pat)
/* As a special case, two regs may die in this insn if src2 is
next to top of stack and the top of stack also dies. Since
we have already popped src1, "next to top of stack" is really
at top (FIRST_STACK_REG) now. */
at top (FIRST_STACK_REG) now. */
if (get_hard_regnum (regstack, XEXP (src2_note, 0)) == FIRST_STACK_REG
&& src1_note)
@ -2091,7 +2092,7 @@ compare_for_stack_reg (insn, regstack, pat)
{
/* The 386 can only represent death of the first operand in
the case handled above. In all other cases, emit a separate
pop and remove the death note from here. */
pop and remove the death note from here. */
link_cc0_insns (insn);
@ -2104,7 +2105,7 @@ compare_for_stack_reg (insn, regstack, pat)
}
/* Substitute new registers in PAT, which is part of INSN. REGSTACK
is the current register layout. */
is the current register layout. */
static void
subst_stack_regs_pat (insn, regstack, pat)
@ -2122,7 +2123,7 @@ subst_stack_regs_pat (insn, regstack, pat)
dest = get_true_reg (&SET_DEST (pat));
src = get_true_reg (&SET_SRC (pat));
/* See if this is a `movM' pattern, and handle elsewhere if so. */
/* See if this is a `movM' pattern, and handle elsewhere if so. */
if (*dest != cc0_rtx
&& (STACK_REG_P (*src)
@ -2151,13 +2152,13 @@ subst_stack_regs_pat (insn, regstack, pat)
break;
case REG:
/* This is a `tstM2' case. */
/* This is a `tstM2' case. */
if (*dest != cc0_rtx)
abort ();
src1 = src;
/* Fall through. */
/* Fall through. */
case FLOAT_TRUNCATE:
case SQRT:
@ -2193,18 +2194,18 @@ subst_stack_regs_pat (insn, regstack, pat)
case DIV:
/* On i386, reversed forms of subM3 and divM3 exist for
MODE_FLOAT, so the same code that works for addM3 and mulM3
can be used. */
can be used. */
case MULT:
case PLUS:
/* These insns can accept the top of stack as a destination
from a stack reg or mem, or can use the top of stack as a
source and some other stack register (possibly top of stack)
as a destination. */
as a destination. */
src1 = get_true_reg (&XEXP (SET_SRC (pat), 0));
src2 = get_true_reg (&XEXP (SET_SRC (pat), 1));
/* We will fix any death note later. */
/* We will fix any death note later. */
if (STACK_REG_P (*src1))
src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
@ -2216,7 +2217,7 @@ subst_stack_regs_pat (insn, regstack, pat)
src2_note = NULL_RTX;
/* If either operand is not a stack register, then the dest
must be top of stack. */
must be top of stack. */
if (! STACK_REG_P (*src1) || ! STACK_REG_P (*src2))
emit_swap_insn (insn, regstack, *dest);
@ -2249,7 +2250,7 @@ subst_stack_regs_pat (insn, regstack, pat)
the destination is somewhere else - merely substitute it.
But if the reg that dies is not at top of stack, then
move the top of stack to the dead reg, as though we had
done the insn and then a store-with-pop. */
done the insn and then a store-with-pop. */
if (REGNO (XEXP (src1_note, 0)) == regstack->reg[regstack->top])
{
@ -2388,14 +2389,14 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* Find out what the constraints required. If no constraint
alternative matches, that is a compiler bug: we should have caught
such an insn during the life analysis pass (and reload should have
caught it regardless). */
caught it regardless). */
i = constrain_asm_operands (n_operands, operands, constraints,
operand_matches, operand_class);
if (i < 0)
abort ();
/* Strip SUBREGs here to make the following code simpler. */
/* Strip SUBREGs here to make the following code simpler. */
for (i = 0; i < n_operands; i++)
if (GET_CODE (operands[i]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[i])) == REG)
@ -2481,7 +2482,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
these constraints are for single register classes, and reload
guaranteed that operand[i] is already in that class, we can
just use REGNO (operands[i]) to know which actual reg this
operand needs to be in. */
operand needs to be in. */
int regno = get_hard_regnum (&temp_stack, operands[i]);
@ -2493,7 +2494,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* operands[i] is not in the right place. Find it
and swap it with whatever is already in I's place.
K is where operands[i] is now. J is where it should
be. */
be. */
int j, k, temp;
k = temp_stack.top - (regno - FIRST_STACK_REG);
@ -2512,7 +2513,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
change_stack (insn, regstack, &temp_stack, emit_insn_before);
/* Make the needed input register substitutions. Do death notes and
clobbers too, because these are for inputs, not outputs. */
clobbers too, because these are for inputs, not outputs. */
for (i = first_input; i < first_input + n_inputs; i++)
if (STACK_REG_P (operands[i]))
@ -2552,13 +2553,13 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
}
}
/* Now remove from REGSTACK any inputs that the asm implicitly popped. */
/* Now remove from REGSTACK any inputs that the asm implicitly popped. */
for (i = first_input; i < first_input + n_inputs; i++)
if (STACK_REG_P (operands[i]))
{
/* An input reg is implicitly popped if it is tied to an
output, or if there is a CLOBBER for it. */
output, or if there is a CLOBBER for it. */
int j;
for (j = 0; j < n_clobbers; j++)
@ -2581,7 +2582,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* Now add to REGSTACK any outputs that the asm implicitly pushed.
Note that there isn't any need to substitute register numbers.
??? Explain why this is true. */
??? Explain why this is true. */
for (i = LAST_STACK_REG; i >= FIRST_STACK_REG; i--)
{
@ -2639,7 +2640,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* Substitute stack hard reg numbers for stack virtual registers in
INSN. Non-stack register numbers are not changed. REGSTACK is the
current stack content. Insns may be emitted as needed to arrange the
stack for the 387 based on the contents of the insn. */
stack for the 387 based on the contents of the insn. */
static void
subst_stack_regs (insn, regstack)
@ -2676,7 +2677,7 @@ subst_stack_regs (insn, regstack)
Since we only record whether entire insn mentions stack regs, and
subst_stack_regs_pat only works for patterns that contain stack regs,
we must check each pattern in a parallel here. A call_value_pop could
fail otherwise. */
fail otherwise. */
if (GET_MODE (insn) == QImode)
{
@ -2685,7 +2686,7 @@ subst_stack_regs (insn, regstack)
{
/* This insn is an `asm' with operands. Decode the operands,
decide how many are inputs, and do register substitution.
Any REG_UNUSED notes will be handled by subst_asm_stack_regs. */
Any REG_UNUSED notes will be handled by subst_asm_stack_regs. */
rtx operands[MAX_RECOG_OPERANDS];
rtx *operands_loc[MAX_RECOG_OPERANDS];
@ -2714,7 +2715,7 @@ subst_stack_regs (insn, regstack)
}
/* subst_stack_regs_pat may have deleted a no-op insn. If so, any
REG_UNUSED will already have been dealt with, so just return. */
REG_UNUSED will already have been dealt with, so just return. */
if (GET_CODE (insn) == NOTE)
return;
@ -2722,7 +2723,7 @@ subst_stack_regs (insn, regstack)
/* If there is a REG_UNUSED note on a stack register on this insn,
the indicated reg must be popped. The REG_UNUSED note is removed,
since the form of the newly emitted pop insn references the reg,
making it no longer `unset'. */
making it no longer `unset'. */
note_link = &REG_NOTES(insn);
for (note = *note_link; note; note = XEXP (note, 1))
@ -2745,7 +2746,7 @@ subst_stack_regs (insn, regstack)
will be the same as NEW upon return.
This function will not preserve block_end[]. But that information
is no longer needed once this has executed. */
is no longer needed once this has executed. */
static void
change_stack (insn, old, new, when)
@ -2763,7 +2764,7 @@ change_stack (insn, old, new, when)
if (when == emit_insn_after)
insn = NEXT_INSN (insn);
/* Pop any registers that are not needed in the new block. */
/* Pop any registers that are not needed in the new block. */
for (reg = old->top; reg >= 0; reg--)
if (! TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]))
@ -2773,7 +2774,7 @@ change_stack (insn, old, new, when)
if (new->top == -2)
{
/* If the new block has never been processed, then it can inherit
the old stack order. */
the old stack order. */
new->top = old->top;
bcopy (old->reg, new->reg, sizeof (new->reg));
@ -2781,10 +2782,10 @@ change_stack (insn, old, new, when)
else
{
/* This block has been entered before, and we must match the
previously selected stack order. */
previously selected stack order. */
/* By now, the only difference should be the order of the stack,
not their depth or liveliness. */
not their depth or liveliness. */
GO_IF_HARD_REG_EQUAL (old->reg_set, new->reg_set, win);
@ -2800,12 +2801,12 @@ change_stack (insn, old, new, when)
depth of the stack. In some cases, the reg at the top of
stack may be correct, but swapped anyway in order to fix
other regs. But since we never swap any other reg away from
its correct slot, this algorithm will converge. */
its correct slot, this algorithm will converge. */
do
{
/* Swap the reg at top of stack into the position it is
supposed to be in, until the correct top of stack appears. */
supposed to be in, until the correct top of stack appears. */
while (old->reg[old->top] != new->reg[new->top])
{
@ -2822,7 +2823,7 @@ change_stack (insn, old, new, when)
/* See if any regs remain incorrect. If so, bring an
incorrect reg to the top of stack, and let the while loop
above fix it. */
above fix it. */
for (reg = new->top; reg >= 0; reg--)
if (new->reg[reg] != old->reg[reg])
@ -2833,7 +2834,7 @@ change_stack (insn, old, new, when)
}
} while (reg >= 0);
/* At this point there must be no differences. */
/* At this point there must be no differences. */
for (reg = old->top; reg >= 0; reg--)
if (old->reg[reg] != new->reg[reg])
@ -2849,7 +2850,7 @@ change_stack (insn, old, new, when)
is the order of the register stack in INSN.
Any code that is emitted here must not be later processed as part
of any block, as it will already contain hard register numbers. */
of any block, as it will already contain hard register numbers. */
static void
goto_block_pat (insn, regstack, pat)
@ -2891,7 +2892,7 @@ goto_block_pat (insn, regstack, pat)
if (GET_CODE (label) != CODE_LABEL)
abort ();
/* First, see if in fact anything needs to be done to the stack at all. */
/* First, see if in fact anything needs to be done to the stack at all. */
if (INSN_UID (label) <= 0)
return;
@ -2900,7 +2901,7 @@ goto_block_pat (insn, regstack, pat)
if (label_stack->top == -2)
{
/* If the target block hasn't had a stack order selected, then
we need merely ensure that no pops are needed. */
we need merely ensure that no pops are needed. */
for (reg = regstack->top; reg >= 0; reg--)
if (! TEST_HARD_REG_BIT (label_stack->reg_set, regstack->reg[reg]))
@ -2908,7 +2909,7 @@ goto_block_pat (insn, regstack, pat)
if (reg == -1)
{
/* change_stack will not emit any code in this case. */
/* change_stack will not emit any code in this case. */
change_stack (label, regstack, label_stack, emit_insn_after);
return;
@ -2928,7 +2929,7 @@ goto_block_pat (insn, regstack, pat)
a jump around the code we are about to emit. Emit a label for the new
code, and point the original insn at this new label. We can't use
redirect_jump here, because we're using fld[4] of the code labels as
LABEL_REF chains, no NUSES counters. */
LABEL_REF chains, no NUSES counters. */
new_jump = emit_jump_insn_before (gen_jump (label), label);
record_label_references (new_jump, PATTERN (new_jump));
@ -2941,7 +2942,7 @@ goto_block_pat (insn, regstack, pat)
LABEL_REFS (new_label) = new_label;
/* The old label_ref will no longer point to the code_label if now uses,
so strip the label_ref from the code_label's chain of references. */
so strip the label_ref from the code_label's chain of references. */
for (ref = &LABEL_REFS (label); *ref != label; ref = &LABEL_NEXTREF (*ref))
if (*ref == pat)
@ -2958,7 +2959,7 @@ goto_block_pat (insn, regstack, pat)
if (JUMP_LABEL (insn) == label)
JUMP_LABEL (insn) = new_label;
/* Now emit the needed code. */
/* Now emit the needed code. */
temp_stack = *regstack;
@ -2967,7 +2968,7 @@ goto_block_pat (insn, regstack, pat)
/* Traverse all basic blocks in a function, converting the register
references in each insn from the "flat" register file that gcc uses, to
the stack-like registers the 387 uses. */
the stack-like registers the 387 uses. */
static void
convert_regs ()
@ -2992,7 +2993,7 @@ convert_regs ()
/* Process all insns in this block. Keep track of `next' here,
so that we don't process any insns emitted while making
substitutions in INSN. */
substitutions in INSN. */
next = block_begin[block];
regstack = block_stack_in[block];
@ -3003,14 +3004,14 @@ convert_regs ()
/* Don't bother processing unless there is a stack reg
mentioned or if it's a CALL_INSN (register passing of
floating point values). */
floating point values). */
if (GET_MODE (insn) == QImode || GET_CODE (insn) == CALL_INSN)
subst_stack_regs (insn, &regstack);
} while (insn != block_end[block]);
/* Something failed if the stack life doesn't match. */
/* Something failed if the stack life doesn't match. */
GO_IF_HARD_REG_EQUAL (regstack.reg_set, block_out_reg_set[block], win);
@ -3021,12 +3022,12 @@ convert_regs ()
/* Adjust the stack of this block on exit to match the stack of
the target block, or copy stack information into stack of
jump target if the target block's stack order hasn't been set
yet. */
yet. */
if (GET_CODE (insn) == JUMP_INSN)
goto_block_pat (insn, &regstack, PATTERN (insn));
/* Likewise handle the case where we fall into the next block. */
/* Likewise handle the case where we fall into the next block. */
if ((block < blocks - 1) && block_drops_in[block+1])
change_stack (insn, &regstack, &block_stack_in[block+1],
@ -3035,7 +3036,7 @@ convert_regs ()
/* If the last basic block is the end of a loop, and that loop has
regs live at its start, then the last basic block will have regs live
at its end that need to be popped before the function returns. */
at its end that need to be popped before the function returns. */
{
int value_reg_low, value_reg_high;
@ -3061,7 +3062,7 @@ convert_regs ()
}
/* Check expression PAT, which is in INSN, for label references. if
one is found, print the block number of destination to FILE. */
one is found, print the block number of destination to FILE. */
static void
print_blocks (file, insn, pat)

View file

@ -834,7 +834,7 @@ regclass (f, nregs)
basic_block_head[b] = newinsn;
}
/* This makes one more setting of new insns's dest. */
/* This makes one more setting of new insns's dest. */
reg_n_sets[REGNO (recog_operand[0])]++;
*recog_operand_loc[1] = recog_operand[0];
@ -1841,7 +1841,7 @@ reg_scan_mark_refs (x, insn, note_flag)
|| GET_CODE (XEXP (note, 0)) == LABEL_REF))))
REGNO_POINTER_FLAG (REGNO (SET_DEST (x))) = 1;
/* ... fall through ... */
/* ... fall through ... */
default:
{

View file

@ -212,10 +212,10 @@ static int n_replacements;
/* Used to track what is modified by an operand. */
struct decomposition
{
int reg_flag; /* Nonzero if referencing a register. */
int safe; /* Nonzero if this can't conflict with anything. */
rtx base; /* Base address for MEM. */
HOST_WIDE_INT start; /* Starting offset or register number. */
int reg_flag; /* Nonzero if referencing a register. */
int safe; /* Nonzero if this can't conflict with anything. */
rtx base; /* Base address for MEM. */
HOST_WIDE_INT start; /* Starting offset or register number. */
HOST_WIDE_INT end; /* Ending offset or register number. */
};
@ -849,7 +849,7 @@ push_reload (in, out, inloc, outloc, class,
the class whose registers cannot be referenced in a different size
and M1 is not the same size as M2. If SUBREG_WORD is nonzero, we
cannot reload just the inside since we might end up with the wrong
register class. */
register class. */
if (in != 0 && GET_CODE (in) == SUBREG && SUBREG_WORD (in) == 0
#ifdef CLASS_CANNOT_CHANGE_SIZE
@ -1579,7 +1579,7 @@ combine_reloads ()
reload_out[output_reload] = 0;
/* The combined reload is needed for the entire insn. */
reload_when_needed[i] = RELOAD_OTHER;
/* If the output reload had a secondary reload, copy it. */
/* If the output reload had a secondary reload, copy it. */
if (reload_secondary_out_reload[output_reload] != -1)
{
reload_secondary_out_reload[i]
@ -1594,7 +1594,7 @@ combine_reloads ()
secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[i]]
= secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[output_reload]];
#endif
/* If required, minimize the register class. */
/* If required, minimize the register class. */
if (reg_class_subset_p (reload_reg_class[output_reload],
reload_reg_class[i]))
reload_reg_class[i] = reload_reg_class[output_reload];
@ -3689,7 +3689,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
/* If we have a pair of reloads for parts of an address, they are reloading
the same object, the operands themselves were not reloaded, and they
are for two operands that are supposed to match, merge the reloads and
change the type of the surviving reload to RELOAD_FOR_OPERAND_ADDRESS. */
change the type of the surviving reload to RELOAD_FOR_OPERAND_ADDRESS. */
for (i = 0; i < n_reloads; i++)
{
@ -3747,7 +3747,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
|| reload_optional[operand_reloadnum[reload_opnum[i]]]))
{
/* If we have a secondary reload to go along with this reload,
change its type to RELOAD_FOR_OPADDR_ADDR. */
change its type to RELOAD_FOR_OPADDR_ADDR. */
if (reload_when_needed[i] == RELOAD_FOR_INPUT_ADDRESS
&& reload_secondary_in_reload[i] != -1)
@ -3757,7 +3757,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
reload_when_needed[secondary_in_reload] =
RELOAD_FOR_OPADDR_ADDR;
/* If there's a tertiary reload we have to change it also. */
/* If there's a tertiary reload we have to change it also. */
if (secondary_in_reload > 0
&& reload_secondary_in_reload[secondary_in_reload] != -1)
reload_when_needed[reload_secondary_in_reload[secondary_in_reload]]
@ -3772,7 +3772,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
reload_when_needed[secondary_out_reload] =
RELOAD_FOR_OPADDR_ADDR;
/* If there's a tertiary reload we have to change it also. */
/* If there's a tertiary reload we have to change it also. */
if (secondary_out_reload
&& reload_secondary_out_reload[secondary_out_reload] != -1)
reload_when_needed[reload_secondary_out_reload[secondary_out_reload]]
@ -5465,7 +5465,7 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
if (p == 0 || GET_CODE (p) == CODE_LABEL)
return 0;
if (GET_CODE (p) == INSN
/* If we don't want spill regs ... */
/* If we don't want spill regs ... */
&& (! (reload_reg_p != 0
&& reload_reg_p != (short *) (HOST_WIDE_INT) 1)
/* ... then ignore insns introduced by reload; they aren't useful

View file

@ -79,7 +79,7 @@ Boston, MA 02111-1307, USA. */
#endif
/* During reload_as_needed, element N contains a REG rtx for the hard reg
into which reg N has been reloaded (perhaps for a previous insn). */
into which reg N has been reloaded (perhaps for a previous insn). */
static rtx *reg_last_reload_reg;
/* Elt N nonzero if reg_last_reload_reg[N] has been set in this insn
@ -288,22 +288,22 @@ extern int *reg_allocno;
static struct elim_table
{
int from; /* Register number to be eliminated. */
int to; /* Register number used as replacement. */
int initial_offset; /* Initial difference between values. */
int can_eliminate; /* Non-zero if this elimination can be done. */
int from; /* Register number to be eliminated. */
int to; /* Register number used as replacement. */
int initial_offset; /* Initial difference between values. */
int can_eliminate; /* Non-zero if this elimination can be done. */
int can_eliminate_previous; /* Value of CAN_ELIMINATE in previous scan over
insns made by reload. */
int offset; /* Current offset between the two regs. */
int max_offset; /* Maximum offset between the two regs. */
int previous_offset; /* Offset at end of previous insn. */
int ref_outside_mem; /* "to" has been referenced outside a MEM. */
insns made by reload. */
int offset; /* Current offset between the two regs. */
int max_offset; /* Maximum offset between the two regs. */
int previous_offset; /* Offset at end of previous insn. */
int ref_outside_mem; /* "to" has been referenced outside a MEM. */
rtx from_rtx; /* REG rtx for the register to be eliminated.
We cannot simply compare the number since
we might then spuriously replace a hard
register corresponding to a pseudo
assigned to the reg to be eliminated. */
rtx to_rtx; /* REG rtx for the replacement. */
assigned to the reg to be eliminated. */
rtx to_rtx; /* REG rtx for the replacement. */
} reg_eliminate[] =
/* If a set of eliminable registers was specified, define the table from it.
@ -429,7 +429,7 @@ init_reload ()
}
}
/* Initialize obstack for our rtl allocation. */
/* Initialize obstack for our rtl allocation. */
gcc_obstack_init (&reload_obstack);
reload_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
}
@ -1220,7 +1220,7 @@ reload (first, global, dumpfile)
and operand addresses but not things used to reload
them. Similarly, RELOAD_FOR_OPERAND_ADDRESS reloads
don't conflict with things needed to reload inputs or
outputs. */
outputs. */
in_max = MAX (MAX (insn_needs.op_addr.regs[j][i],
insn_needs.op_addr_reload.regs[j][i]),
@ -1378,7 +1378,7 @@ reload (first, global, dumpfile)
}
/* Now count extra regs if there might be a conflict with
the return value register. */
the return value register. */
for (r = regno; r < regno + nregs; r++)
if (spill_reg_order[r] >= 0)
@ -2495,7 +2495,7 @@ set_label_offsets (x, insn, initial_p)
x = XEXP (x, 0);
/* ... fall through ... */
/* ... fall through ... */
case CODE_LABEL:
/* If we know nothing about this label, set the desired offsets. Note
@ -2550,7 +2550,7 @@ set_label_offsets (x, insn, initial_p)
case JUMP_INSN:
set_label_offsets (PATTERN (insn), insn, initial_p);
/* ... fall through ... */
/* ... fall through ... */
case INSN:
case CALL_INSN:
@ -2835,7 +2835,7 @@ eliminate_regs (x, mem_mode, insn)
ep->previous_offset * INTVAL (XEXP (x, 1)));
}
/* ... fall through ... */
/* ... fall through ... */
case CALL:
case COMPARE:
@ -2867,7 +2867,7 @@ eliminate_regs (x, mem_mode, insn)
x = gen_rtx (EXPR_LIST, REG_NOTE_KIND (x), new, XEXP (x, 1));
}
/* ... fall through ... */
/* ... fall through ... */
case INSN_LIST:
/* Now do eliminations in the rest of the chain. If this was
@ -3316,7 +3316,7 @@ eliminate_regs_in_insn (insn, replace)
If we are replacing a body that was a (set X (plus Y Z)), try to
re-recognize the insn. We do this in case we had a simple addition
but now can do this as a load-address. This saves an insn in this
common case. */
common case. */
new_body = eliminate_regs (old_body, 0, replace ? insn : NULL_RTX);
if (new_body != old_body)
@ -3324,7 +3324,7 @@ eliminate_regs_in_insn (insn, replace)
/* If we aren't replacing things permanently and we changed something,
make another copy to ensure that all the RTL is new. Otherwise
things can go wrong if find_reload swaps commutative operands
and one is inside RTL that has been copied while the other is not. */
and one is inside RTL that has been copied while the other is not. */
/* Don't copy an asm_operands because (1) there's no need and (2)
copy_rtx can't do it properly when there are multiple outputs. */
@ -4601,7 +4601,7 @@ reload_reg_reaches_end_p (regno, opnum, type)
|| TEST_HARD_REG_BIT (reload_reg_used_in_input[i], regno))
return 0;
/* ... fall through ... */
/* ... fall through ... */
case RELOAD_FOR_OPERAND_ADDRESS:
/* Check outputs and their addresses. */
@ -4628,7 +4628,7 @@ reload_reg_reaches_end_p (regno, opnum, type)
opnum = -1;
/* ... fall through ... */
/* ... fall through ... */
case RELOAD_FOR_OUTPUT:
case RELOAD_FOR_OUTPUT_ADDRESS:
@ -4658,7 +4658,8 @@ reloads_conflict (r1, r2)
int r1_opnum = reload_opnum[r1];
int r2_opnum = reload_opnum[r2];
/* RELOAD_OTHER conflicts with everything except RELOAD_FOR_OTHER_ADDRESS. */
/* RELOAD_OTHER conflicts with everything except
RELOAD_FOR_OTHER_ADDRESS. */
if (r2_type == RELOAD_OTHER && r1_type != RELOAD_FOR_OTHER_ADDRESS)
return 1;
@ -5241,7 +5242,7 @@ choose_reload_regs (insn, avoid_return_reg)
reload_when_needed[r]))
{
/* If a group is needed, verify that all the subsequent
registers still have their values intact. */
registers still have their values intact. */
int nr
= HARD_REGNO_NREGS (spill_regs[i], reload_mode[r]);
int k;
@ -5363,8 +5364,9 @@ choose_reload_regs (insn, avoid_return_reg)
break;
}
/* JRV: If the equiv register we have found is explicitly
clobbered in the current insn, mark but don't use, as above. */
/* JRV: If the equiv register we have found is
explicitly clobbered in the current insn, mark but
don't use, as above. */
if (equiv != 0 && regno_clobbered_p (regno, insn))
{
@ -5449,7 +5451,7 @@ choose_reload_regs (insn, avoid_return_reg)
continue;
/* Skip reloads that already have a register allocated or are
optional. */
optional. */
if (reload_reg_rtx[r] != 0 || reload_optional[r])
continue;
@ -6838,7 +6840,7 @@ gen_reload (out, in, opnum, type)
if the add instruction is two-address and the second operand
of the add is the same as the reload reg, which is frequently
the case. If the insn would be A = B + A, rearrange it so
it will be A = A + B as constrain_operands expects. */
it will be A = A + B as constrain_operands expects. */
if (GET_CODE (XEXP (in, 1)) == REG
&& REGNO (out) == REGNO (XEXP (in, 1)))
@ -6888,7 +6890,7 @@ gen_reload (out, in, opnum, type)
insn = emit_insn (gen_add2_insn (out, op1));
/* If that failed, copy the address register to the reload register.
Then add the constant to the reload register. */
Then add the constant to the reload register. */
code = recog_memoized (insn);

View file

@ -170,8 +170,8 @@ static rtx *unfilled_firstobj;
struct resources
{
char memory; /* Insn sets or needs a memory location. */
char unch_memory; /* Insn sets of needs a "unchanging" MEM. */
char volatil; /* Insn sets or needs a volatile memory loc. */
char unch_memory; /* Insn sets of needs a "unchanging" MEM. */
char volatil; /* Insn sets or needs a volatile memory loc. */
char cc; /* Insn sets or needs the condition codes. */
HARD_REG_SET regs; /* Which registers are set or needed. */
};
@ -395,7 +395,7 @@ mark_referenced_resources (x, res, include_delayed_effects)
rtx next = NEXT_INSN (x);
int i;
/* If we are part of a delay slot sequence, point at the SEQUENCE. */
/* If we are part of a delay slot sequence, point at the SEQUENCE. */
if (NEXT_INSN (insn) != x)
{
next = NEXT_INSN (NEXT_INSN (insn));
@ -454,7 +454,7 @@ mark_referenced_resources (x, res, include_delayed_effects)
}
}
/* ... fall through to other INSN processing ... */
/* ... fall through to other INSN processing ... */
case INSN:
case JUMP_INSN:
@ -813,7 +813,7 @@ find_end_label ()
end_of_function_label = gen_label_rtx ();
LABEL_NUSES (end_of_function_label) = 0;
/* Put the label before an USE insns that may proceed the RETURN insn. */
/* Put the label before an USE insns that may proceed the RETURN insn. */
while (GET_CODE (temp) == USE)
temp = PREV_INSN (temp);
@ -870,14 +870,14 @@ emit_delay_sequence (insn, list, length, avail)
register rtx li;
int had_barrier = 0;
/* Allocate the the rtvec to hold the insns and the SEQUENCE. */
/* Allocate the the rtvec to hold the insns and the SEQUENCE. */
rtvec seqv = rtvec_alloc (length + 1);
rtx seq = gen_rtx (SEQUENCE, VOIDmode, seqv);
rtx seq_insn = make_insn_raw (seq);
rtx first = get_insns ();
rtx last = get_last_insn ();
/* Make a copy of the insn having delay slots. */
/* Make a copy of the insn having delay slots. */
rtx delay_insn = copy_rtx (insn);
/* If INSN is followed by a BARRIER, delete the BARRIER since it will only
@ -1227,6 +1227,7 @@ optimize_skip (insn)
Non conditional branches return no direction information and
are predicted as very likely taken. */
static int
get_jump_flags (insn, label)
rtx insn, label;
@ -1382,7 +1383,7 @@ mostly_true_jump (jump_insn, condition)
}
/* Look at the relative rarities of the fallthrough and destination. If
they differ, we can predict the branch that way. */
they differ, we can predict the branch that way. */
switch (rare_fallthrough - rare_dest)
{

View file

@ -278,7 +278,7 @@ copy_rtx (orig)
case PC:
case CC0:
case SCRATCH:
/* SCRATCH must be shared because they represent distinct values. */
/* SCRATCH must be shared because they represent distinct values. */
return orig;
case CONST:

View file

@ -47,16 +47,16 @@ enum rtx_code {
/* The cast here, saves many elsewhere. */
extern int rtx_length[];
#define GET_RTX_LENGTH(CODE) (rtx_length[(int)(CODE)])
#define GET_RTX_LENGTH(CODE) (rtx_length[(int) (CODE)])
extern char *rtx_name[];
#define GET_RTX_NAME(CODE) (rtx_name[(int)(CODE)])
#define GET_RTX_NAME(CODE) (rtx_name[(int) (CODE)])
extern char *rtx_format[];
#define GET_RTX_FORMAT(CODE) (rtx_format[(int)(CODE)])
#define GET_RTX_FORMAT(CODE) (rtx_format[(int) (CODE)])
extern char rtx_class[];
#define GET_RTX_CLASS(CODE) (rtx_class[(int)(CODE)])
#define GET_RTX_CLASS(CODE) (rtx_class[(int) (CODE)])
/* Common union for an element of an rtx. */
@ -311,7 +311,7 @@ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
/* Names for REG_NOTE's in EXPR_LIST insn's. */
extern char *reg_note_name[];
#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int) (MODE)])
/* This field is only present on CALL_INSNs. It holds a chain of EXPR_LIST of
USE and CLOBBER expressions.
@ -709,7 +709,7 @@ extern int get_pool_offset PROTO((rtx));
extern rtx simplify_subtraction PROTO((rtx));
extern rtx assign_stack_local PROTO((enum machine_mode, int, int));
extern rtx assign_stack_temp PROTO((enum machine_mode, int, int));
extern rtx assign_temp PROTO((union tree_node*, int,
extern rtx assign_temp PROTO((union tree_node *, int,
int, int));
extern rtx protect_from_queue PROTO((rtx, int));
extern void emit_queue PROTO((void));

View file

@ -393,7 +393,7 @@ reg_referenced_p (x, body)
/* Nonzero if register REG is referenced in an insn between
FROM_INSN and TO_INSN (exclusive of those two). Sets of REG do
not count. */
not count. */
int
reg_referenced_between_p (reg, from_insn, to_insn)

View file

@ -78,13 +78,13 @@ int
scan_decls (pfile, argc, argv)
cpp_reader *pfile;
int argc;
char**argv;
char **argv;
{
int saw_extern, saw_inline;
int old_written;
/* If declarator_start is non-zero, it marks the start of the current
declarator. If it is zero, we are either still parsing the
decl-specs, or prev_id_start marks the start of the declarator. */
decl-specs, or prev_id_start marks the start of the declarator. */
int declarator_start;
int prev_id_start, prev_id_end;
enum cpp_token token;
@ -128,7 +128,7 @@ scan_decls (pfile, argc, argv)
switch (token)
{
case CPP_LPAREN:
/* Looks like this is the start of a formal parameter list. */
/* Looks like this is the start of a formal parameter list. */
if (prev_id_start)
{
int nesting = 1;
@ -187,7 +187,7 @@ scan_decls (pfile, argc, argv)
pfile->token_buffer,
prev_id_start);
}
/* ... fall through ... */
/* ... fall through ... */
maybe_handle_comma:
if (token != CPP_COMMA)
goto new_statement;
@ -228,7 +228,7 @@ scan_decls (pfile, argc, argv)
goto handle_token;
break;
}
/* This may be the name of a variable or function. */
/* This may be the name of a variable or function. */
prev_id_start = start_written;
prev_id_end = CPP_WRITTEN (pfile);
break;
@ -240,7 +240,7 @@ scan_decls (pfile, argc, argv)
goto new_statement; /* handle_statement? */
case CPP_HSPACE: case CPP_VSPACE: case CPP_COMMENT: case CPP_POP:
/* Skip initial white space. */
/* Skip initial white space. */
if (start_written == 0)
CPP_SET_WRITTEN (pfile, 0);
break;

View file

@ -111,7 +111,7 @@ scan_string (fp, s, init)
return c;
}
/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */
/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */
int
skip_spaces (fp, c)

View file

@ -51,22 +51,22 @@ struct fn_decl
};
extern int lineno;
extern void sstring_append _PARAMS((sstring*, sstring*));
extern void make_sstring_space _PARAMS((sstring*, int));
extern int skip_spaces _PARAMS((FILE*, int));
extern void sstring_append _PARAMS((sstring *, sstring *));
extern void make_sstring_space _PARAMS((sstring *, int));
extern int skip_spaces _PARAMS((FILE *, int));
extern int scan_ident _PARAMS((FILE *, sstring *, int));
extern int scan_string _PARAMS((FILE*, sstring *, int));
extern int read_upto _PARAMS((FILE*, sstring*, int));
extern int scan_string _PARAMS((FILE *, sstring *, int));
extern int read_upto _PARAMS((FILE *, sstring *, int));
extern char *xmalloc _PARAMS((unsigned));
extern char *xrealloc _PARAMS((char *, unsigned));
extern unsigned long hash _PARAMS((const char*));
extern unsigned long hash _PARAMS((const char *));
/* get_token is a simple C lexer. */
#define IDENTIFIER_TOKEN 300
#define CHAR_TOKEN 301
#define STRING_TOKEN 302
#define INT_TOKEN 303
extern int get_token _PARAMS ((FILE*, sstring*));
extern int get_token _PARAMS ((FILE *, sstring *));
/* Current file and line numer, taking #-directives into account */
extern int source_lineno;

View file

@ -355,7 +355,7 @@ static rtx *reg_known_value;
/* Vector recording for each reg_known_value whether it is due to a
REG_EQUIV note. Future passes (viz., reload) may replace the
pseudo with the equivalent expression and so we account for the
dependences that would be introduced if that happens. */
dependences that would be introduced if that happens. */
/* ??? This is a problem only on the Convex. The REG_EQUIV notes created in
assign_parms mention the arg pointer, and there are explicit insns in the
RTL that modify the arg pointer. Thus we must ensure that such insns don't
@ -4058,7 +4058,7 @@ schedule_block (b, file)
prev = PREV_INSN (insn);
if (LINE_NOTE (note))
{
/* Re-use the original line-number note. */
/* Re-use the original line-number note. */
LINE_NOTE (note) = 0;
PREV_INSN (note) = prev;
NEXT_INSN (prev) = note;

View file

@ -572,8 +572,8 @@ plain_type_1 (type, level)
only if the .def has already been finished.
At least on 386, the Unix assembler
cannot handle forward references to tags. */
/* But the 88100, it requires them, sigh... */
/* And the MIPS requires unknown refs as well... */
/* But the 88100, it requires them, sigh... */
/* And the MIPS requires unknown refs as well... */
tag = KNOWN_TYPE_TAG (type);
PUT_SDB_TAG (tag);
/* These 3 lines used to follow the close brace.
@ -947,7 +947,7 @@ sdbout_toplevel_data (decl)
#ifdef SDB_ALLOW_FORWARD_REFERENCES
/* Machinery to record and output anonymous types. */
/* Machinery to record and output anonymous types. */
static tree anonymous_types;

View file

@ -222,7 +222,7 @@ struct nesting
and no `else' has been seen yet. */
rtx endif_label;
/* Label for the end of this alternative.
This may be the end of the if or the next else/elseif. */
This may be the end of the if or the next else/elseif. */
rtx next_label;
} cond;
/* For loops. */
@ -246,7 +246,7 @@ struct nesting
in order of entry. */
int block_start_count;
/* Nonzero => value to restore stack to on exit. Complemented by
bc_stack_level (see below) when generating bytecodes. */
bc_stack_level (see below) when generating bytecodes. */
rtx stack_level;
/* The NOTE that starts this contour.
Used by expand_goto to check whether the destination
@ -285,7 +285,7 @@ struct nesting
rtx start;
/* For bytecodes, the case table is in-lined right in the code.
A label is needed for skipping over this block. It is only
used when generating bytecodes. */
used when generating bytecodes. */
rtx skip_label;
/* A list of case labels; it is first built as an AVL tree.
During expand_end_case, this is converted to a list, and may be
@ -773,7 +773,7 @@ expand_goto_internal (body, label, last_insn)
/* NOTICE! If a bytecode instruction other than `jump' is needed,
then the caller has to call bc_expand_goto_internal()
directly. This is rather an exceptional case, and there aren't
that many places where this is necessary. */
that many places where this is necessary. */
if (output_bytecode)
{
expand_goto_internal (body, label, last_insn);
@ -808,8 +808,9 @@ expand_goto_internal (body, label, last_insn)
if (stack_level)
{
/* Ensure stack adjust isn't done by emit_jump, as this would clobber
the stack pointer. This one should be deleted as dead by flow. */
/* Ensure stack adjust isn't done by emit_jump, as this
would clobber the stack pointer. This one should be
deleted as dead by flow. */
clear_pending_stack_adjust ();
do_pending_stack_adjust ();
emit_stack_restore (SAVE_BLOCK, stack_level, NULL_RTX);
@ -833,7 +834,7 @@ expand_goto_internal (body, label, last_insn)
}
/* Generate a jump with OPCODE to the given bytecode LABEL which is
found within BODY. */
found within BODY. */
static void
bc_expand_goto_internal (opcode, label, body)
@ -846,7 +847,7 @@ bc_expand_goto_internal (opcode, label, body)
/* If the label is defined, adjust the stack as necessary.
If it's not defined, we have to push the reference on the
fixup list. */
fixup list. */
if (label->defined)
{
@ -874,7 +875,7 @@ bc_expand_goto_internal (opcode, label, body)
must do so after the jump, since the jump may depend on
what's on the stack. Thus, any stack-modifying conditional
jumps (these are the only ones that rely on what's on the
stack) go into the fixup list. */
stack) go into the fixup list. */
if (stack_level >= 0
&& stack_depth != stack_level
@ -1212,7 +1213,7 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
/* For any still-undefined labels, do the cleanups for this block now.
We must do this now since items in the cleanup list may go out
of scope when the block ends. */
of scope when the block ends. */
for (prev = 0, f = goto_fixup_chain; f; prev = f, f = f->next)
if (f->before_jump != 0
&& PREV_INSN (f->target_rtl) == 0
@ -1299,7 +1300,7 @@ bc_fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
bc_emit_bytecode_labeldef (f->label);
/* Save stack_depth across call, since bc_adjust_stack () will alter
the perceived stack depth via the instructions generated. */
the perceived stack depth via the instructions generated. */
if (f->bc_stack_level >= 0)
{
@ -1842,7 +1843,7 @@ warn_if_unused_value (exp)
the user cannot control it. */
if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == REFERENCE_TYPE)
return warn_if_unused_value (TREE_OPERAND (exp, 0));
/* ... fall through ... */
/* ... fall through ... */
default:
/* Referencing a volatile value is a side effect, so don't warn. */
@ -1920,7 +1921,7 @@ expand_end_stmt_expr (t)
of adding code to inhibit dropping the last expression value, it
is here recovered by undoing the `drop'. Since `drop' is
equivalent to `adjustackSI [1]', it can be undone with `adjstackSI
[-1]'. */
[-1]'. */
bc_adjust_stack (-1);
@ -2040,7 +2041,7 @@ expand_start_else ()
emit_jump (cond_stack->data.cond.endif_label);
emit_label (cond_stack->data.cond.next_label);
cond_stack->data.cond.next_label = 0; /* No more _else or _elseif calls. */
cond_stack->data.cond.next_label = 0; /* No more _else or _elseif calls. */
}
/* After calling expand_start_else, turn this "else" into an "else if"
@ -2081,7 +2082,7 @@ expand_end_cond ()
/* Generate code for the start of an if-then. COND is the expression
whose truth is to be tested; if EXITFLAG is nonzero this conditional
is to be visible to exit_something. It is assumed that the caller
has pushed the previous context on the cond stack. */
has pushed the previous context on the cond stack. */
static void
bc_expand_start_cond (cond, exitflag)
@ -2620,7 +2621,7 @@ expand_return (retval)
struct nesting *block;
/* Bytecode returns are quite simple, just leave the result on the
arithmetic stack. */
arithmetic stack. */
if (output_bytecode)
{
bc_expand_expr (retval);
@ -3624,7 +3625,7 @@ expand_decl_init (decl)
/* Expand initialization for variable-sized types. Allocate array
using newlocalSI and set local variable, which is a pointer to the
storage. */
storage. */
static void
bc_expand_variable_local_init (decl)
@ -3648,7 +3649,7 @@ bc_expand_variable_local_init (decl)
using expand_address() since that would cause the pointer to be
pushed rather than its address. Hence the hard-coded reference;
notice also that the variable is always local (no global
variable-size type variables). */
variable-size type variables). */
bc_load_localaddr (DECL_RTL (decl));
bc_emit_instruction (storeP);
@ -3673,7 +3674,7 @@ bc_expand_decl_init (decl)
/* If the type is variable-size, we first create its space (we ASSUME
it CAN'T be static). We do this regardless of whether there's an
initializer assignment or not. */
initializer assignment or not. */
if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST)
bc_expand_variable_local_init (decl);
@ -3961,7 +3962,7 @@ expand_start_case (exit_flag, expr, type, printname)
/* Enter a case statement. It is assumed that the caller has pushed
the current context onto the case stack. */
the current context onto the case stack. */
static void
bc_expand_start_case (thiscase, expr, type, printname)
@ -4177,11 +4178,11 @@ pushcase_range (value1, value2, converter, label, duplicate)
case_stack->data.case_stmt.seenlabel = 1;
/* Convert VALUEs to type in which the comparisons are nominally done. */
if (value1 == 0) /* Negative infinity. */
if (value1 == 0) /* Negative infinity. */
value1 = TYPE_MIN_VALUE(index_type);
value1 = (*converter) (nominal_type, value1);
if (value2 == 0) /* Positive infinity. */
if (value2 == 0) /* Positive infinity. */
value2 = TYPE_MAX_VALUE(index_type);
value2 = (*converter) (nominal_type, value2);
@ -4435,7 +4436,7 @@ add_case_node (low, high, label, duplicate)
2 and do nothing. If VALUE is out of range, return 3 and do nothing.
Return 0 on success. This function is a leftover from the earlier
bytecode compiler, which was based on gcc 1.37. It should be
merged into pushcase. */
merged into pushcase. */
static int
bc_pushcase (value, label)
@ -4519,7 +4520,7 @@ all_cases_count (type, spareness)
/* count
= TREE_INT_CST_LOW (TYPE_MAX_VALUE (type))
- TREE_INT_CST_LOW (TYPE_MIN_VALUE (type)) + 1
but with overflow checking. */
but with overflow checking. */
tree mint = TYPE_MIN_VALUE (type);
tree maxt = TYPE_MAX_VALUE (type);
HOST_WIDE_INT lo, hi;
@ -4564,11 +4565,11 @@ all_cases_count (type, spareness)
#define BITARRAY_TEST(ARRAY, INDEX) \
((ARRAY)[(unsigned)(INDEX) / HOST_BITS_PER_CHAR]\
& (1 << ((unsigned)(INDEX) % HOST_BITS_PER_CHAR)))
((ARRAY)[(unsigned) (INDEX) / HOST_BITS_PER_CHAR]\
& (1 << ((unsigned) (INDEX) % HOST_BITS_PER_CHAR)))
#define BITARRAY_SET(ARRAY, INDEX) \
((ARRAY)[(unsigned)(INDEX) / HOST_BITS_PER_CHAR]\
|= 1 << ((unsigned)(INDEX) % HOST_BITS_PER_CHAR))
((ARRAY)[(unsigned) (INDEX) / HOST_BITS_PER_CHAR]\
|= 1 << ((unsigned) (INDEX) % HOST_BITS_PER_CHAR))
/* Set the elements of the bitstring CASES_SEEN (which has length COUNT),
with the case values we have seen, assuming the case expression
@ -4718,17 +4719,17 @@ check_for_full_enumeration_handling (type)
register tree chain;
int all_values = 1;
/* True iff the selector type is a numbered set mode. */
/* True iff the selector type is a numbered set mode. */
int sparseness = 0;
/* The number of possible selector values. */
/* The number of possible selector values. */
HOST_WIDE_INT size;
/* For each possible selector value. a one iff it has been matched
by a case value alternative. */
by a case value alternative. */
unsigned char *cases_seen;
/* The allocated size of cases_seen, in chars. */
/* The allocated size of cases_seen, in chars. */
long bytes_needed;
tree t;
@ -4745,7 +4746,7 @@ check_for_full_enumeration_handling (type)
bytes_needed = (size + HOST_BITS_PER_CHAR) / HOST_BITS_PER_CHAR;
if (size > 0 && size < 600000
/* We deliberately use malloc here - not xmalloc. */
/* We deliberately use malloc here - not xmalloc. */
&& (cases_seen = (unsigned char *) malloc (bytes_needed)) != NULL)
{
long i;
@ -4755,7 +4756,7 @@ check_for_full_enumeration_handling (type)
/* The time complexity of this code is normally O(N), where
N being the number of members in the enumerated type.
However, if type is a ENUMERAL_TYPE whose values do not
increase monotonically, O(N*log(N)) time may be needed. */
increase monotonically, O(N*log(N)) time may be needed. */
mark_seen_cases (type, cases_seen, size, sparseness);
@ -4772,7 +4773,7 @@ check_for_full_enumeration_handling (type)
/* Now we go the other way around; we warn if there are case
expressions that don't correspond to enumerators. This can
occur since C and C++ don't enforce type-checking of
assignments to enumeration variables. */
assignments to enumeration variables. */
if (case_stack->data.case_stmt.case_list
&& case_stack->data.case_stmt.case_list->left)
@ -5402,7 +5403,7 @@ bc_expand_end_case (expr)
}
/* Return unique bytecode ID. */
/* Return unique bytecode ID. */
int
bc_new_uid ()
@ -5843,7 +5844,7 @@ emit_case_nodes (index, node, default_label, index_type)
else if (tree_int_cst_equal (node->low, node->high))
{
/* Node is single valued. First see if the index expression matches
this node and then check our children, if any. */
this node and then check our children, if any. */
do_jump_if_equal (index, expand_expr (node->low, NULL_RTX, VOIDmode, 0),
label_rtx (node->code_label), unsignedp);

View file

@ -934,7 +934,7 @@ layout_type (type)
break;
/* Pascal and Chill types */
case BOOLEAN_TYPE: /* store one byte/boolean for now. */
case BOOLEAN_TYPE: /* store one byte/boolean for now. */
TYPE_MODE (type) = QImode;
TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
TYPE_PRECISION (type) = 1;

View file

@ -356,7 +356,7 @@ stupid_find_reg (call_preserved, class, mode,
#endif
/* If this register's life is more than 5,000 insns, we probably
can't allocate it, so don't waste the time trying. This avoid
can't allocate it, so don't waste the time trying. This avoids
quadratic behavior on programs that have regularly-occurring
SAVE_EXPRs. */
if (dead_insn > born_insn + 5000)

View file

@ -1070,7 +1070,7 @@ extern int stime(const time_t *);
extern struct netbuf * stoa(char *, struct netbuf *);
extern void store(datum, datum);
extern char * strcadd(char *, const char *);
extern int strcasecmp(const char *, const char*);
extern int strcasecmp(const char *, const char *);
extern char * strcat(char *, const char *);
extern char * strccpy(char *, const char *);
extern char * strchr(const char *, int);
@ -1088,7 +1088,7 @@ extern char * strerror(int);
extern int strfind(const char *, const char *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);
extern size_t strlen(const char *);
extern int strncasecmp(const char *, const char*, size_t);
extern int strncasecmp(const char *, const char *, size_t);
extern char * strncat(char *, const char *, size_t);
extern int strncmp(const char *, const char *, size_t);
extern char * strncpy(char *, const char *, size_t);

View file

@ -424,7 +424,7 @@ int flag_no_peephole = 0;
/* Nonzero allows GCC to violate some IEEE or ANSI rules regarding math
operations in the interest of optimization. For example it allows
GCC to assume arguments to sqrt are nonnegative numbers, allowing
faster code for sqrt to be generated. */
faster code for sqrt to be generated. */
int flag_fast_math = 0;
@ -1067,9 +1067,9 @@ default_print_error_function (file)
}
/* Called by report_error_function to print out function name.
* Default may be overridden by language front-ends. */
* Default may be overridden by language front-ends. */
void (*print_error_function) PROTO((char*)) = default_print_error_function;
void (*print_error_function) PROTO((char *)) = default_print_error_function;
/* Prints out, if necessary, the name of the current function
that caused an error. Called from all error and warning functions. */
@ -1932,6 +1932,7 @@ strip_off_ending (name, len)
}
/* Output a quoted string. */
void
output_quoted_string (asm_file, string)
FILE *asm_file;
@ -1980,7 +1981,8 @@ output_file_directive (asm_file, input_name)
#endif
}
/* Routine to build language identifier for object file. */
/* Routine to build language identifier for object file. */
static void
output_lang_identify (asm_out_file)
FILE *asm_out_file;
@ -1992,6 +1994,7 @@ output_lang_identify (asm_out_file)
}
/* Routine to open a dump file. */
static FILE *
open_dump_file (base_name, suffix)
char *base_name;
@ -2216,7 +2219,7 @@ compile_file (name)
}
/* Output something to inform GDB that this compilation was by GCC. Also
serves to tell GDB file consists of bytecodes. */
serves to tell GDB file consists of bytecodes. */
if (output_bytecode)
fprintf (asm_out_file, "bc_gcc2_compiled.:\n");
else
@ -2228,7 +2231,7 @@ compile_file (name)
#endif
}
/* Output something to identify which front-end produced this file. */
/* Output something to identify which front-end produced this file. */
#ifdef ASM_IDENTIFY_LANGUAGE
ASM_IDENTIFY_LANGUAGE (asm_out_file);
#endif
@ -2387,7 +2390,7 @@ compile_file (name)
??? A tempting alternative (for both C and C++) would be
to force a constant to be written if and only if it is
defined in a main file, as opposed to an include file. */
defined in a main file, as opposed to an include file. */
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
&& (! TREE_READONLY (decl)
@ -2473,7 +2476,7 @@ compile_file (name)
TIMEVAR (symout_time, sdbout_symbol (decl, 0));
/* Output COFF information for non-global
file-scope initialized variables. */
file-scope initialized variables. */
if (write_symbols == SDB_DEBUG
&& TREE_CODE (decl) == VAR_DECL
&& DECL_INITIAL (decl)
@ -3248,7 +3251,7 @@ rest_of_compilation (decl)
#endif
/* If a scheduling pass for delayed branches is to be done,
call the scheduling code. */
call the scheduling code. */
#ifdef DELAY_SLOTS
if (optimize > 0 && flag_delayed_branch)
@ -3412,7 +3415,7 @@ main (argc, argv, envp)
{
struct rlimit rlim;
/* Set the stack limit huge so that alloca does not fail. */
/* Set the stack limit huge so that alloca does not fail. */
getrlimit (RLIMIT_STACK, &rlim);
rlim.rlim_cur = rlim.rlim_max;
setrlimit (RLIMIT_STACK, &rlim);
@ -3927,7 +3930,7 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
}
/* Initialize for bytecode output. A good idea to do this as soon as
possible after the "-f" options have been parsed. */
possible after the "-f" options have been parsed. */
if (output_bytecode)
{
#ifndef TARGET_SUPPORTS_BYTECODE

View file

@ -753,7 +753,7 @@ print_obstack_name (object, file, prefix)
obstack_name = "temp_decl_obstack";
}
/* Check to see if the object is in the free area of the obstack. */
/* Check to see if the object is in the free area of the obstack. */
if (obstack != NULL)
{
if (object >= obstack->next_free
@ -1170,7 +1170,7 @@ copy_node (node)
the copy is different from the original type.
The two statements usually duplicate each other
(because they clear fields of the same union),
but the optimizer should catch that. */
but the optimizer should catch that. */
TYPE_SYMTAB_POINTER (t) = 0;
TYPE_SYMTAB_ADDRESS (t) = 0;
}
@ -1228,9 +1228,9 @@ get_identifier (text)
hash_len = id_clash_len;
/* Compute hash code */
hi = hash_len * 613 + (unsigned)text[0];
hi = hash_len * 613 + (unsigned) text[0];
for (i = 1; i < hash_len; i += 2)
hi = ((hi * 613) + (unsigned)(text[i]));
hi = ((hi * 613) + (unsigned) (text[i]));
hi &= (1 << HASHBITS) - 1;
hi %= MAX_HASH_TABLE;
@ -1464,6 +1464,7 @@ build_complex (real, imag)
}
/* Build a newly constructed TREE_VEC node of length LEN. */
tree
make_tree_vec (len)
int len;
@ -1711,7 +1712,7 @@ binfo_member (elem, list)
return NULL_TREE;
}
/* Return nonzero if ELEM is part of the chain CHAIN. */
/* Return nonzero if ELEM is part of the chain CHAIN. */
int
chain_member (elem, chain)
@ -1728,7 +1729,7 @@ chain_member (elem, chain)
}
/* Return nonzero if ELEM is equal to TREE_VALUE (CHAIN) for any piece of
chain CHAIN. */
chain CHAIN. */
/* ??? This function was added for machine specific attributes but is no
longer used. It could be deleted if we could confirm all front ends
don't use it. */
@ -1748,7 +1749,7 @@ chain_member_value (elem, chain)
}
/* Return nonzero if ELEM is equal to TREE_PURPOSE (CHAIN)
for any piece of chain CHAIN. */
for any piece of chain CHAIN. */
/* ??? This function was added for machine specific attributes but is no
longer used. It could be deleted if we could confirm all front ends
don't use it. */
@ -2130,7 +2131,7 @@ save_expr (expr)
fact (i.e. this allows further folding, and direct checks for constants).
However, a read-only object that has side effects cannot be bypassed.
Since it is no problem to reevaluate literals, we just return the
literal node. */
literal node. */
if (TREE_CONSTANT (t) || (TREE_READONLY (t) && ! TREE_SIDE_EFFECTS (t))
|| TREE_CODE (t) == SAVE_EXPR || TREE_CODE (t) == ERROR_MARK)
@ -2160,6 +2161,7 @@ save_expr (expr)
/* Arrange for an expression to be expanded multiple independent
times. This is useful for cleanup actions, as the backend can
expand them multiple times in different places. */
tree
unsave_expr (expr)
tree expr;
@ -2177,6 +2179,7 @@ unsave_expr (expr)
/* Modify a tree in place so that all the evaluate only once things
are cleared out. Return the EXPR given. */
tree
unsave_expr_now (expr)
tree expr;
@ -2681,6 +2684,7 @@ build VPROTO((enum tree_code code, tree tt, ...))
/* Same as above, but only builds for unary operators.
Saves lions share of calls to `build'; cuts down use
of varargs, which is expensive for RISC machines. */
tree
build1 (code, type, node)
enum tree_code code;
@ -2860,7 +2864,7 @@ build_block (vars, tags, subblocks, supercontext, chain)
}
/* Return a declaration like DDECL except that its DECL_MACHINE_ATTRIBUTE
is ATTRIBUTE. */
is ATTRIBUTE. */
tree
build_decl_attribute_variant (ddecl, attribute)
@ -2930,7 +2934,7 @@ build_type_attribute_variant (ttype, attribute)
/* Return a 1 if ATTR_NAME and ATTR_ARGS is valid for either declaration DECL
or type TYPE and 0 otherwise. Validity is determined the configuration
macros VALID_MACHINE_DECL_ATTRIBUTE and VALID_MACHINE_TYPE_ATTRIBUTE. */
macros VALID_MACHINE_DECL_ATTRIBUTE and VALID_MACHINE_TYPE_ATTRIBUTE. */
int
valid_machine_attribute (attr_name, attr_args, decl, type)
@ -3715,7 +3719,7 @@ build_index_type (maxval)
/* Create a range of some discrete type TYPE (an INTEGER_TYPE,
ENUMERAL_TYPE, BOOLEAN_TYPE, or CHAR_TYPE), with
low bound LOWVAL and high bound HIGHVAL.
if TYPE==NULL_TREE, sizetype is used. */
if TYPE==NULL_TREE, sizetype is used. */
tree
build_range_type (type, lowval, highval)
@ -3744,7 +3748,7 @@ build_range_type (type, lowval, highval)
}
/* Just like build_index_type, but takes lowval and highval instead
of just highval (maxval). */
of just highval (maxval). */
tree
build_index_2_type (lowval,highval)
@ -4340,7 +4344,7 @@ dump_tree_statistics ()
extern char * first_global_object_name;
/* If KIND=='I', return a suitable global initializer (constructor) name.
If KIND=='D', return a suitable global clean-up (destructor) name. */
If KIND=='D', return a suitable global clean-up (destructor) name. */
tree
get_file_function_name (kind)
@ -4377,7 +4381,7 @@ get_file_function_name (kind)
#ifndef NO_DOLLAR_IN_LABEL /* this for `$'; unlikely, but... -- kr */
|| *p == '$'
#endif
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
|| *p == '.'
#endif
|| (*p >= 'A' && *p <= 'Z')
@ -4395,7 +4399,7 @@ get_file_function_name (kind)
with one bit in each char ('\000' or '\001').
If the constructor is constant, NULL_TREE is returned.
Otherwise, a TREE_LIST of the non-constant elements is emitted. */
Otherwise, a TREE_LIST of the non-constant elements is emitted. */
tree
get_set_constructor_bits (init, buffer, bit_size)
@ -4421,7 +4425,7 @@ get_set_constructor_bits (init, buffer, bit_size)
tree_cons (TREE_PURPOSE (vals), TREE_VALUE (vals), non_const_bits);
else if (TREE_PURPOSE (vals) != NULL_TREE)
{
/* Set a range of bits to ones. */
/* Set a range of bits to ones. */
HOST_WIDE_INT lo_index
= TREE_INT_CST_LOW (TREE_PURPOSE (vals)) - domain_min;
HOST_WIDE_INT hi_index
@ -4434,7 +4438,7 @@ get_set_constructor_bits (init, buffer, bit_size)
}
else
{
/* Set a single bit to one. */
/* Set a single bit to one. */
HOST_WIDE_INT index
= TREE_INT_CST_LOW (TREE_VALUE (vals)) - domain_min;
if (index < 0 || index >= bit_size)
@ -4451,7 +4455,7 @@ get_set_constructor_bits (init, buffer, bit_size)
/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node.
The result is placed in BUFFER (which is an array of bytes).
If the constructor is constant, NULL_TREE is returned.
Otherwise, a TREE_LIST of the non-constant elements is emitted. */
Otherwise, a TREE_LIST of the non-constant elements is emitted. */
tree
get_set_constructor_bytes (init, buffer, wd_size)
@ -4465,7 +4469,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
int bit_size = wd_size * set_word_size;
int bit_pos = 0;
unsigned char *bytep = buffer;
char *bit_buffer = (char*)alloca(bit_size);
char *bit_buffer = (char *) alloca(bit_size);
tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size);
for (i = 0; i < wd_size; i++)

View file

@ -1634,9 +1634,9 @@ extern void (*incomplete_decl_finalize_hook) ();
/* In tree.c */
extern char *perm_calloc PROTO((int, long));
extern tree get_set_constructor_bits PROTO((tree, char*, int));
extern tree get_set_constructor_bits PROTO((tree, char *, int));
extern tree get_set_constructor_bytes PROTO((tree,
unsigned char*, int));
unsigned char *, int));
/* In stmt.c */

View file

@ -3007,7 +3007,7 @@ reg_dead_after_loop (reg, loop_start, loop_end)
if (GET_CODE (PATTERN (insn)) == RETURN)
break;
else if (! simplejump_p (insn)
/* Prevent infinite loop following infinite loops. */
/* Prevent infinite loop following infinite loops. */
|| jump_count++ > 20)
return 0;
else

View file

@ -224,7 +224,7 @@ readonly_data_section ()
#endif
}
/* Determine if we're in the text section. */
/* Determine if we're in the text section. */
int
in_text_section ()
@ -232,7 +232,7 @@ in_text_section ()
return in_section == in_text;
}
/* Determine if we're in the data section. */
/* Determine if we're in the data section. */
int
in_data_section ()
@ -1563,7 +1563,7 @@ contains_pointers_p (type)
}
}
/* Output text storage for constructor CONSTR. */
/* Output text storage for constructor CONSTR. */
void
bc_output_constructor (constr, size)
@ -1573,7 +1573,7 @@ bc_output_constructor (constr, size)
int i;
/* Must always be a literal; non-literal constructors are handled
differently. */
differently. */
if (!TREE_CONSTANT (constr))
abort ();
@ -1592,7 +1592,7 @@ bc_output_constructor (constr, size)
output_constant (constr, size);
}
/* Create storage for constructor CONSTR. */
/* Create storage for constructor CONSTR. */
void
bc_output_data_constructor (constr)
@ -1608,7 +1608,7 @@ bc_output_data_constructor (constr)
if (i > 0)
BC_OUTPUT_ALIGN (asm_out_file, i);
/* The constructor is filled in at runtime. */
/* The constructor is filled in at runtime. */
BC_OUTPUT_SKIP (asm_out_file, int_size_in_bytes (TREE_TYPE (constr)));
}
@ -1819,7 +1819,7 @@ assemble_integer (x, size, force)
int force;
{
/* First try to use the standard 1, 2, 4, 8, and 16 byte
ASM_OUTPUT... macros. */
ASM_OUTPUT... macros. */
switch (size)
{
@ -2329,7 +2329,7 @@ const_hash (exp)
else if (code == CONSTRUCTOR && TREE_CODE (TREE_TYPE (exp)) == SET_TYPE)
{
len = int_size_in_bytes (TREE_TYPE (exp));
p = (char*) alloca (len);
p = (char *) alloca (len);
get_set_constructor_bytes (exp, (unsigned char *) p, len);
}
else if (code == CONSTRUCTOR)
@ -2366,7 +2366,7 @@ const_hash (exp)
hi = value.offset;
p = XSTR (value.base, 0);
for (i = 0; p[i] != 0; i++)
hi = ((hi * 613) + (unsigned)(p[i]));
hi = ((hi * 613) + (unsigned) (p[i]));
}
else if (GET_CODE (value.base) == LABEL_REF)
hi = value.offset + CODE_LABEL_NUMBER (XEXP (value.base, 0)) * 13;
@ -2384,7 +2384,7 @@ const_hash (exp)
/* Compute hashing function */
hi = len;
for (i = 0; i < len; i++)
hi = ((hi * 613) + (unsigned)(p[i]));
hi = ((hi * 613) + (unsigned) (p[i]));
hi &= (1 << HASHBITS) - 1;
hi %= MAX_HASH_TABLE;
@ -2460,7 +2460,7 @@ compare_constant_1 (exp, p)
else if (code == CONSTRUCTOR && TREE_CODE (TREE_TYPE (exp)) == SET_TYPE)
{
int xlen = len = int_size_in_bytes (TREE_TYPE (exp));
strp = (char*) alloca (len);
strp = (char *) alloca (len);
get_set_constructor_bytes (exp, (unsigned char *) strp, len);
if (bcmp ((char *) &xlen, p, sizeof xlen))
return 0;
@ -3113,7 +3113,7 @@ decode_rtx_const (mode, x, value)
*p++ = 0;
}
value->kind = RTX_INT; /* Most usual kind. */
value->kind = RTX_INT; /* Most usual kind. */
value->mode = mode;
switch (GET_CODE (x))
@ -3342,7 +3342,7 @@ force_const_mem (mode, x)
copy of X that is in the saveable obstack in case we are being
called from combine or some other phase that discards memory
it allocates. We need only do this if it is a CONST, since
no other RTX should be allocated in this situation. */
no other RTX should be allocated in this situation. */
if (rtl_obstack != saveable_obstack
&& GET_CODE (x) == CONST)
{
@ -3737,7 +3737,7 @@ output_constant (exp, size)
assemble_zeros (size);
}
/* Bytecode specific code to output assembler for integer. */
/* Bytecode specific code to output assembler for integer. */
static void
bc_assemble_integer (exp, size)
@ -4123,6 +4123,7 @@ output_constructor (exp, size)
}
/* Output asm to handle ``#pragma weak'' */
void
handle_pragma_weak (what, name, value)
enum pragma_state what;
@ -4193,7 +4194,7 @@ assemble_alias (decl, target)
#ifdef ASM_OUTPUT_DEF
char *name;
make_decl_rtl (decl, (char*)0, 1);
make_decl_rtl (decl, (char *) 0, 1);
name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
/* Make name accessible from other files, if appropriate. */