Commit e3a64162 by Bernardo Innocenti Committed by Bernardo Innocenti

c-common.c: Rename all identifiers named `class' to `cl'.

	* c-common.c: Rename all identifiers named `class' to `cl'.
	* c-decl.c: Likewise.
	* c-common.h: Likewise.
	* c-parse.in: Likewise.
	* c-typeck.c: Likewise.
	* genmodes.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* regrename.c: Likewise.
	* tree.h: Likewise.

From-SVN: r85153
parent 381166d4
2004-07-25 Bernardo Innocenti <bernie@develer.com>
* c-common.c: Rename all identifiers named `class' to `cl'.
* c-common.h: Likewise.
* c-parse.in: Likewise.
* c-typeck.c: Likewise.
* genmodes.c: Likewise.
* real.c: Likewise.
* real.h: Likewise.
* recog.c: Likewise.
* recog.h: Likewise.
* regrename.c: Likewise.
* tree.h: Likewise.
2004-07-25 Daniel Jacobowitz <dan@debian.org>
* regmove.c (optimize_reg_copy_1): Don't try to replace call-used
......
......@@ -1196,7 +1196,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
{
struct tlist *tmp_before, *tmp_nosp, *tmp_list2, *tmp_list3;
enum tree_code code;
char class;
char cl;
/* X may be NULL if it is the operand of an empty statement expression
({ }). */
......@@ -1205,7 +1205,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
restart:
code = TREE_CODE (x);
class = TREE_CODE_CLASS (code);
cl = TREE_CODE_CLASS (code);
if (warning_candidate_p (x))
{
......@@ -1349,7 +1349,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
break;
}
if (class == '1')
if (cl == '1')
{
if (first_rtl_op (code) == 0)
return;
......@@ -1358,7 +1358,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
goto restart;
}
switch (class)
switch (cl)
{
case 'r':
case '<':
......@@ -2460,9 +2460,12 @@ c_common_truthvalue_conversion (tree expr)
return build_binary_op (NE_EXPR, expr, integer_zero_node, 1);
}
static tree builtin_function_2 (const char *, const char *, tree, tree,
int, enum built_in_class, int, int,
tree);
static tree builtin_function_2 (const char *builtin_name, const char *name,
tree builtin_type, tree type,
enum built_in_function function_code,
enum built_in_class cl, int library_name_p,
bool nonansi_p,
tree attrs);
/* Make a variant type in the proper way for C/C++, propagating qualifiers
down to the element type of an array. */
......@@ -3269,10 +3272,10 @@ builtin_function_disabled_p (const char *name)
BUILTIN_TYPE is the type of the __builtin_-prefixed function;
TYPE is the type of the function with the ordinary name. These
may differ if the ordinary name is declared with a looser type to avoid
conflicts with headers. FUNCTION_CODE and CLASS are as for
conflicts with headers. FUNCTION_CODE and CL are as for
builtin_function. If LIBRARY_NAME_P is nonzero, NAME is passed as
the LIBRARY_NAME parameter to builtin_function when declaring BUILTIN_NAME.
If NONANSI_P is nonzero, the name NAME is treated as a non-ANSI name;
If NONANSI_P is true, the name NAME is treated as a non-ANSI name;
ATTRS is the tree list representing the builtin's function attributes.
Returns the declaration of BUILTIN_NAME, if any, otherwise
the declaration of NAME. Does not declare NAME if flag_no_builtin,
......@@ -3280,21 +3283,22 @@ builtin_function_disabled_p (const char *name)
static tree
builtin_function_2 (const char *builtin_name, const char *name,
tree builtin_type, tree type, int function_code,
enum built_in_class class, int library_name_p,
int nonansi_p, tree attrs)
tree builtin_type, tree type,
enum built_in_function function_code,
enum built_in_class cl, int library_name_p,
bool nonansi_p, tree attrs)
{
tree bdecl = NULL_TREE;
tree decl = NULL_TREE;
if (builtin_name != 0)
bdecl = lang_hooks.builtin_function (builtin_name, builtin_type,
function_code, class,
function_code, cl,
library_name_p ? name : NULL, attrs);
if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name)
&& !(nonansi_p && flag_no_nonansi_builtin))
decl = lang_hooks.builtin_function (name, type, function_code, class,
decl = lang_hooks.builtin_function (name, type, function_code, cl,
NULL, attrs);
return (bdecl != 0 ? bdecl : decl);
......
......@@ -2475,15 +2475,15 @@ c_make_fname_decl (tree id, int type_dep)
tree
builtin_function (const char *name, tree type, int function_code,
enum built_in_class class, const char *library_name,
enum built_in_class cl, const char *library_name,
tree attrs)
{
tree id = get_identifier (name);
tree decl = build_decl (FUNCTION_DECL, id, type);
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
DECL_LANG_SPECIFIC (decl) = ggc_alloc_cleared (sizeof (struct lang_decl));
DECL_BUILT_IN_CLASS (decl) = class;
DECL_LANG_SPECIFIC (decl) = GGC_CNEW (struct lang_decl);
DECL_BUILT_IN_CLASS (decl) = cl;
DECL_FUNCTION_CODE (decl) = function_code;
if (library_name)
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
......
......@@ -1975,7 +1975,7 @@ convert_arguments (tree typelist, tree values, tree name, tree fundecl)
differ from the default conversions. */
if (warn_conversion || warn_traditional)
{
int formal_prec = TYPE_PRECISION (type);
unsigned int formal_prec = TYPE_PRECISION (type);
if (INTEGRAL_TYPE_P (type)
&& TREE_CODE (TREE_TYPE (val)) == REAL_TYPE)
......
......@@ -45,7 +45,7 @@ struct real_value GTY(())
/* Use the same underlying type for all bit-fields, so as to make
sure they're packed together, otherwise REAL_VALUE_TYPE_SIZE will
be miscomputed. */
unsigned int /* ENUM_BITFIELD (real_value_class) */ class : 2;
unsigned int /* ENUM_BITFIELD (real_value_class) */ cl : 2;
unsigned int sign : 1;
unsigned int signalling : 1;
unsigned int canonical : 1;
......
......@@ -2096,7 +2096,7 @@ preprocess_constraints (void)
for (j = 0; j < recog_data.n_alternatives; j++)
{
op_alt[j].class = NO_REGS;
op_alt[j].cl = NO_REGS;
op_alt[j].constraint = p;
op_alt[j].matches = -1;
op_alt[j].matched = -1;
......@@ -2171,12 +2171,14 @@ preprocess_constraints (void)
case 'p':
op_alt[j].is_address = 1;
op_alt[j].class = reg_class_subunion[(int) op_alt[j].class]
op_alt[j].cl = reg_class_subunion[(int) op_alt[j].cl]
[(int) MODE_BASE_REG_CLASS (VOIDmode)];
break;
case 'g': case 'r':
op_alt[j].class = reg_class_subunion[(int) op_alt[j].class][(int) GENERAL_REGS];
case 'g':
case 'r':
op_alt[j].cl =
reg_class_subunion[(int) op_alt[j].cl][(int) GENERAL_REGS];
break;
default:
......@@ -2188,16 +2190,16 @@ preprocess_constraints (void)
if (EXTRA_ADDRESS_CONSTRAINT (c, p))
{
op_alt[j].is_address = 1;
op_alt[j].class
op_alt[j].cl
= (reg_class_subunion
[(int) op_alt[j].class]
[(int) op_alt[j].cl]
[(int) MODE_BASE_REG_CLASS (VOIDmode)]);
break;
}
op_alt[j].class
op_alt[j].cl
= (reg_class_subunion
[(int) op_alt[j].class]
[(int) op_alt[j].cl]
[(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]);
break;
}
......@@ -2518,11 +2520,11 @@ constrain_operands (int strict)
default:
{
enum reg_class class;
enum reg_class cl;
class = (c == 'r'
cl = (c == 'r'
? GENERAL_REGS : REG_CLASS_FROM_CONSTRAINT (c, p));
if (class != NO_REGS)
if (cl != NO_REGS)
{
if (strict < 0
|| (strict == 0
......@@ -2530,7 +2532,7 @@ constrain_operands (int strict)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)
|| (strict == 0 && GET_CODE (op) == SCRATCH)
|| (REG_P (op)
&& reg_fits_class_p (op, class, offset, mode)))
&& reg_fits_class_p (op, cl, offset, mode)))
win = 1;
}
#ifdef EXTRA_CONSTRAINT_STR
......@@ -2623,19 +2625,19 @@ constrain_operands (int strict)
If REG occupies multiple hard regs, all of them must be in CLASS. */
int
reg_fits_class_p (rtx operand, enum reg_class class, int offset,
reg_fits_class_p (rtx operand, enum reg_class cl, int offset,
enum machine_mode mode)
{
int regno = REGNO (operand);
if (regno < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class],
&& TEST_HARD_REG_BIT (reg_class_contents[(int) cl],
regno + offset))
{
int sr;
regno += offset;
for (sr = hard_regno_nregs[regno][mode] - 1;
sr > 0; sr--)
if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
if (! TEST_HARD_REG_BIT (reg_class_contents[(int) cl],
regno + sr))
break;
return sr == 0;
......@@ -2898,7 +2900,7 @@ peep2_find_free_register (int from, int to, const char *class_str,
enum machine_mode mode, HARD_REG_SET *reg_set)
{
static int search_ofs;
enum reg_class class;
enum reg_class cl;
HARD_REG_SET live;
int i;
......@@ -2928,7 +2930,7 @@ peep2_find_free_register (int from, int to, const char *class_str,
IOR_HARD_REG_SET (live, this_live);
}
class = (class_str[0] == 'r' ? GENERAL_REGS
cl = (class_str[0] == 'r' ? GENERAL_REGS
: REG_CLASS_FROM_CONSTRAINT (class_str[0], class_str));
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
......@@ -2949,7 +2951,7 @@ peep2_find_free_register (int from, int to, const char *class_str,
if (fixed_regs[regno])
continue;
/* Make sure the register is of the right class. */
if (! TEST_HARD_REG_BIT (reg_class_contents[class], regno))
if (! TEST_HARD_REG_BIT (reg_class_contents[cl], regno))
continue;
/* And can support the mode we need. */
if (! HARD_REGNO_MODE_OK (regno, mode))
......
......@@ -38,7 +38,7 @@ struct operand_alternative
const char *constraint;
/* The register class valid for this alternative (possibly NO_REGS). */
enum reg_class class;
enum reg_class cl;
/* "Badness" of this alternative, computed from number of '?' and '!'
characters in the constraint string. */
......
......@@ -667,7 +667,7 @@ check_asm_stack_operands (rtx insn)
for (i = 0; i < n_outputs; i++)
if (STACK_REG_P (recog_data.operand[i]))
{
if (reg_class_size[(int) recog_op_alt[i][alt].class] != 1)
if (reg_class_size[(int) recog_op_alt[i][alt].cl] != 1)
{
error_for_asm (insn, "output constraint %d must specify a single register", i);
malformed_asm = 1;
......@@ -2147,9 +2147,9 @@ subst_asm_stack_regs (rtx insn, stack regstack)
for (i = n_outputs; i < n_outputs + n_inputs; i++)
if (STACK_REG_P (recog_data.operand[i])
&& reg_class_subset_p (recog_op_alt[i][alt].class,
&& reg_class_subset_p (recog_op_alt[i][alt].cl,
FLOAT_REGS)
&& recog_op_alt[i][alt].class != FLOAT_REGS)
&& recog_op_alt[i][alt].cl != FLOAT_REGS)
{
/* If an operand needs to be in a particular reg in
FLOAT_REGS, the constraint was either 't' or 'u'. Since
......
......@@ -3140,7 +3140,7 @@ extern int integer_pow2p (tree);
extern int integer_nonzerop (tree);
/* staticp (tree x) is nonzero if X is a reference to data allocated
/* staticp (tree x) is true if X is a reference to data allocated
at a fixed address in memory. */
extern bool staticp (tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment