mirror of
https://github.com/pret/agbcc.git
synced 2026-08-23 19:04:10 -05:00
fix some warnings
This commit is contained in:
@@ -156,9 +156,6 @@ static unsigned fde_table_in_use;
|
||||
fde_table. */
|
||||
#define FDE_TABLE_INCREMENT 256
|
||||
|
||||
/* A list of call frame insns for the CIE. */
|
||||
static dw_cfi_ref cie_cfi_head;
|
||||
|
||||
/* The number of the current function definition for which debugging
|
||||
information is being generated. These numbers range from 1 up to the
|
||||
maximum number of function definitions contained within the current
|
||||
@@ -490,11 +487,9 @@ size_of_uleb128 (value)
|
||||
register unsigned long value;
|
||||
{
|
||||
register unsigned long size = 0;
|
||||
register unsigned byte;
|
||||
|
||||
do
|
||||
{
|
||||
byte = (value & 0x7f);
|
||||
value >>= 7;
|
||||
size += 1;
|
||||
}
|
||||
|
||||
@@ -771,7 +771,6 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
|
||||
tmode = mode;
|
||||
while (GET_CODE (op0) == SUBREG)
|
||||
{
|
||||
int outer_size = GET_MODE_BITSIZE (GET_MODE (op0));
|
||||
int inner_size = GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)));
|
||||
|
||||
offset += SUBREG_WORD (op0);
|
||||
|
||||
129
gcc/expr.c
129
gcc/expr.c
@@ -1380,12 +1380,10 @@ emit_group_load(rtx dst, rtx orig_src, int ssize, int align)
|
||||
enum machine_mode mode = GET_MODE(XEXP(XVECEXP(dst, 0, i), 0));
|
||||
int bytepos = INTVAL(XEXP(XVECEXP(dst, 0, i), 1));
|
||||
int bytelen = GET_MODE_SIZE(mode);
|
||||
int shift = 0;
|
||||
|
||||
/* Handle trailing fragments that run over the size of the struct. */
|
||||
if (ssize >= 0 && bytepos + bytelen > ssize)
|
||||
{
|
||||
shift = (bytelen - (ssize - bytepos)) * BITS_PER_UNIT;
|
||||
bytelen = ssize - bytepos;
|
||||
if (bytelen <= 0)
|
||||
abort();
|
||||
@@ -3247,7 +3245,6 @@ store_constructor(tree exp, rtx target, int cleared)
|
||||
register enum machine_mode mode;
|
||||
int bitsize;
|
||||
int bitpos = 0;
|
||||
int unsignedp;
|
||||
tree pos, constant = 0, offset = 0;
|
||||
rtx to_rtx = target;
|
||||
|
||||
@@ -3261,7 +3258,6 @@ store_constructor(tree exp, rtx target, int cleared)
|
||||
continue;
|
||||
|
||||
bitsize = TREE_INT_CST_LOW(DECL_SIZE(field));
|
||||
unsignedp = TREE_UNSIGNED(field);
|
||||
mode = DECL_MODE(field);
|
||||
if (DECL_BIT_FIELD(field))
|
||||
mode = VOIDmode;
|
||||
@@ -3427,7 +3423,7 @@ store_constructor(tree exp, rtx target, int cleared)
|
||||
{
|
||||
tree lo_index = TREE_OPERAND(index, 0);
|
||||
tree hi_index = TREE_OPERAND(index, 1);
|
||||
rtx index_r, pos_rtx, addr, hi_r, loop_top, loop_end;
|
||||
rtx index_r, pos_rtx, addr, loop_end;
|
||||
struct nesting *loop;
|
||||
HOST_WIDE_INT lo, hi, count;
|
||||
tree position;
|
||||
@@ -3454,8 +3450,6 @@ store_constructor(tree exp, rtx target, int cleared)
|
||||
}
|
||||
else
|
||||
{
|
||||
hi_r = expand_expr(hi_index, NULL_RTX, VOIDmode, 0);
|
||||
loop_top = gen_label_rtx();
|
||||
loop_end = gen_label_rtx();
|
||||
|
||||
unsignedp = TREE_UNSIGNED(domain);
|
||||
@@ -5097,7 +5091,6 @@ expand_expr(register tree exp, rtx target, enum machine_mode tmode, enum expand_
|
||||
case BIND_EXPR:
|
||||
{
|
||||
tree vars = TREE_OPERAND(exp, 0);
|
||||
int vars_need_expansion = 0;
|
||||
|
||||
/* Need to open a binding contour here because
|
||||
if there are any cleanups they must be contained here. */
|
||||
@@ -5113,7 +5106,6 @@ expand_expr(register tree exp, rtx target, enum machine_mode tmode, enum expand_
|
||||
{
|
||||
if (DECL_RTL(vars) == 0)
|
||||
{
|
||||
vars_need_expansion = 1;
|
||||
expand_decl(vars);
|
||||
}
|
||||
expand_decl_init(vars);
|
||||
@@ -5651,121 +5643,6 @@ expand_expr(register tree exp, rtx target, enum machine_mode tmode, enum expand_
|
||||
return target;
|
||||
}
|
||||
|
||||
/* Intended for a reference to a buffer of a file-object in Pascal.
|
||||
But it's not certain that a special tree code will really be
|
||||
necessary for these. INDIRECT_REF might work for them. */
|
||||
case BUFFER_REF:
|
||||
abort();
|
||||
|
||||
case IN_EXPR:
|
||||
{
|
||||
/* Pascal set IN expression.
|
||||
|
||||
Algorithm:
|
||||
rlo = set_low - (set_low%bits_per_word);
|
||||
the_word = set [ (index - rlo)/bits_per_word ];
|
||||
bit_index = index % bits_per_word;
|
||||
bitmask = 1 << bit_index;
|
||||
return !!(the_word & bitmask); */
|
||||
|
||||
tree set = TREE_OPERAND(exp, 0);
|
||||
tree index = TREE_OPERAND(exp, 1);
|
||||
int iunsignedp = TREE_UNSIGNED(TREE_TYPE(index));
|
||||
tree set_type = TREE_TYPE(set);
|
||||
tree set_low_bound = TYPE_MIN_VALUE(TYPE_DOMAIN(set_type));
|
||||
tree set_high_bound = TYPE_MAX_VALUE(TYPE_DOMAIN(set_type));
|
||||
rtx index_val = expand_expr(index, 0, VOIDmode, 0);
|
||||
rtx lo_r = expand_expr(set_low_bound, 0, VOIDmode, 0);
|
||||
rtx hi_r = expand_expr(set_high_bound, 0, VOIDmode, 0);
|
||||
rtx setval = expand_expr(set, 0, VOIDmode, 0);
|
||||
rtx setaddr = XEXP(setval, 0);
|
||||
enum machine_mode index_mode = TYPE_MODE(TREE_TYPE(index));
|
||||
rtx rlow;
|
||||
rtx diff, quo, rem, addr, bit, result;
|
||||
|
||||
preexpand_calls(exp);
|
||||
|
||||
/* If domain is empty, answer is no. Likewise if index is constant
|
||||
and out of bounds. */
|
||||
if (((TREE_CODE(set_high_bound) == INTEGER_CST
|
||||
&& TREE_CODE(set_low_bound) == INTEGER_CST
|
||||
&& tree_int_cst_lt(set_high_bound, set_low_bound))
|
||||
|| (TREE_CODE(index) == INTEGER_CST
|
||||
&& TREE_CODE(set_low_bound) == INTEGER_CST
|
||||
&& tree_int_cst_lt(index, set_low_bound))
|
||||
|| (TREE_CODE(set_high_bound) == INTEGER_CST
|
||||
&& TREE_CODE(index) == INTEGER_CST
|
||||
&& tree_int_cst_lt(set_high_bound, index))))
|
||||
return const0_rtx;
|
||||
|
||||
if (target == 0)
|
||||
target = gen_reg_rtx(tmode != VOIDmode ? tmode : mode);
|
||||
|
||||
/* If we get here, we have to generate the code for both cases
|
||||
(in range and out of range). */
|
||||
|
||||
op0 = gen_label_rtx();
|
||||
op1 = gen_label_rtx();
|
||||
|
||||
if (!(GET_CODE(index_val) == CONST_INT
|
||||
&& GET_CODE(lo_r) == CONST_INT))
|
||||
{
|
||||
emit_cmp_insn(index_val, lo_r, LT, NULL_RTX,
|
||||
GET_MODE(index_val), iunsignedp, 0);
|
||||
emit_jump_insn(gen_blt(op1));
|
||||
}
|
||||
|
||||
if (!(GET_CODE(index_val) == CONST_INT
|
||||
&& GET_CODE(hi_r) == CONST_INT))
|
||||
{
|
||||
emit_cmp_insn(index_val, hi_r, GT, NULL_RTX,
|
||||
GET_MODE(index_val), iunsignedp, 0);
|
||||
emit_jump_insn(gen_bgt(op1));
|
||||
}
|
||||
|
||||
/* Calculate the element number of bit zero in the first word
|
||||
of the set. */
|
||||
if (GET_CODE(lo_r) == CONST_INT)
|
||||
rlow = GEN_INT(INTVAL(lo_r)
|
||||
& ~((HOST_WIDE_INT) 1 << BITS_PER_UNIT));
|
||||
else
|
||||
rlow = expand_binop(index_mode, and_optab, lo_r,
|
||||
GEN_INT(~((HOST_WIDE_INT) 1 << BITS_PER_UNIT)),
|
||||
NULL_RTX, iunsignedp, OPTAB_LIB_WIDEN);
|
||||
|
||||
diff = expand_binop(index_mode, sub_optab, index_val, rlow,
|
||||
NULL_RTX, iunsignedp, OPTAB_LIB_WIDEN);
|
||||
|
||||
quo = expand_divmod(0, TRUNC_DIV_EXPR, index_mode, diff,
|
||||
GEN_INT(BITS_PER_UNIT), NULL_RTX, iunsignedp);
|
||||
rem = expand_divmod(1, TRUNC_MOD_EXPR, index_mode, index_val,
|
||||
GEN_INT(BITS_PER_UNIT), NULL_RTX, iunsignedp);
|
||||
|
||||
addr = memory_address(byte_mode,
|
||||
expand_binop(index_mode, add_optab, diff,
|
||||
setaddr, NULL_RTX, iunsignedp,
|
||||
OPTAB_LIB_WIDEN));
|
||||
|
||||
/* Extract the bit we want to examine */
|
||||
bit = expand_shift(RSHIFT_EXPR, byte_mode,
|
||||
gen_rtx_MEM(byte_mode, addr),
|
||||
make_tree(TREE_TYPE(index), rem),
|
||||
NULL_RTX, 1);
|
||||
result = expand_binop(byte_mode, and_optab, bit, const1_rtx,
|
||||
GET_MODE(target) == byte_mode ? target : 0,
|
||||
1, OPTAB_LIB_WIDEN);
|
||||
|
||||
if (result != target)
|
||||
convert_move(target, result, 1);
|
||||
|
||||
/* Output the code to handle the out-of-range case. */
|
||||
emit_jump(op0);
|
||||
emit_label(op1);
|
||||
emit_move_insn(target, const0_rtx);
|
||||
emit_label(op0);
|
||||
return target;
|
||||
}
|
||||
|
||||
case WITH_CLEANUP_EXPR:
|
||||
if (RTL_EXPR_RTL(exp) == 0)
|
||||
{
|
||||
@@ -8037,7 +7914,7 @@ expand_builtin(tree exp, rtx target, rtx subtarget, enum machine_mode mode, int
|
||||
if (TREE_CODE(TREE_TYPE(arg1)) != INTEGER_TYPE)
|
||||
{
|
||||
error("invalid first arg to `__builtin_expect'");
|
||||
return op0;
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
if (TREE_CODE(arg1) != INTEGER_CST
|
||||
@@ -8045,7 +7922,7 @@ expand_builtin(tree exp, rtx target, rtx subtarget, enum machine_mode mode, int
|
||||
|| (TREE_INT_CST_LOW(arg1) < 0 && TREE_INT_CST_HIGH(arg1) != -1))
|
||||
{
|
||||
error("invalid second arg to `__builtin_expect'");
|
||||
return op0;
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
current_function_processing_expect = TRUE;
|
||||
|
||||
@@ -5226,7 +5226,6 @@ branch_predict_move (insn, cur_line, barrier, barrier_end)
|
||||
int barrier_p = (GET_CODE (prev_label) == BARRIER);
|
||||
rtx new_label;
|
||||
rtx tmp;
|
||||
rtx tmp_next;
|
||||
enum rtx_code if_code;
|
||||
|
||||
/* Search for the label in the following insns. */
|
||||
|
||||
21
gcc/rtl.h
21
gcc/rtl.h
@@ -569,12 +569,21 @@ extern char *note_insn_name[];
|
||||
MEM_SCALAR_P (LHS) = MEM_SCALAR_P (RHS)) \
|
||||
|
||||
/* If VAL is non-zero, set MEM_IN_STRUCT_P and clear MEM_SCALAR_P in
|
||||
RTX. Otherwise, vice versa. Use this macro only when you are
|
||||
*sure* that you know that the MEM is in a structure, or is a
|
||||
scalar. VAL is evaluated only once. */
|
||||
#define MEM_SET_IN_STRUCT_P(RTX, VAL) \
|
||||
((VAL) ? (MEM_IN_STRUCT_P (RTX) = 1, MEM_SCALAR_P (RTX) = 0) \
|
||||
: (MEM_IN_STRUCT_P (RTX) = 0, MEM_SCALAR_P (RTX) = 1))
|
||||
RTX. Otherwise, vice versa. Use this function only when you are
|
||||
*sure* that you know that the MEM is in a structure, or is a scalar. */
|
||||
static inline void MEM_SET_IN_STRUCT_P(rtx x, int val)
|
||||
{
|
||||
if (val)
|
||||
{
|
||||
MEM_IN_STRUCT_P(x) = 1;
|
||||
MEM_SCALAR_P(x) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MEM_IN_STRUCT_P(x) = 0;
|
||||
MEM_SCALAR_P(x) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* CYGNUS LOCAL unaligned-pointers */
|
||||
/* For a MEM rtx, 1 if it may be an unaligned address. */
|
||||
|
||||
@@ -1182,8 +1182,6 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
|
||||
int *inout_opnum = (int *) alloca (noutputs * sizeof (int));
|
||||
enum machine_mode *inout_mode
|
||||
= (enum machine_mode *) alloca (noutputs * sizeof (enum machine_mode));
|
||||
/* The insn we have emitted. */
|
||||
rtx insn;
|
||||
|
||||
/* An ASM with no outputs needs to be treated as volatile, for now. */
|
||||
if (noutputs == 0)
|
||||
@@ -1534,12 +1532,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
|
||||
if (noutputs == 1 && nclobbers == 0)
|
||||
{
|
||||
XSTR (body, 1) = TREE_STRING_POINTER (TREE_PURPOSE (outputs));
|
||||
insn = emit_insn (gen_rtx_SET (VOIDmode, output_rtx[0], body));
|
||||
emit_insn (gen_rtx_SET (VOIDmode, output_rtx[0], body));
|
||||
}
|
||||
else if (noutputs == 0 && nclobbers == 0)
|
||||
{
|
||||
/* No output operands: put in a raw ASM_OPERANDS rtx. */
|
||||
insn = emit_insn (body);
|
||||
emit_insn (body);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1599,7 +1597,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
|
||||
= gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (QImode, j));
|
||||
}
|
||||
|
||||
insn = emit_insn (body);
|
||||
emit_insn (body);
|
||||
}
|
||||
|
||||
free_temp_slots ();
|
||||
@@ -2491,7 +2489,6 @@ expand_return (retval)
|
||||
computation of the return value. */
|
||||
rtx last_insn = 0;
|
||||
register rtx val = 0;
|
||||
register rtx op0;
|
||||
tree retval_rhs;
|
||||
int cleanups;
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ extern int target_flags;
|
||||
|
||||
/* This says how to define a local common symbol (ie, not visible to
|
||||
linker). */
|
||||
#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
|
||||
#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE) \
|
||||
(fprintf((STREAM),"\n\t.lcomm\t"), \
|
||||
assemble_name((STREAM),(NAME)), \
|
||||
fprintf((STREAM),",%u\n",(SIZE)))
|
||||
@@ -194,7 +194,7 @@ do { char dstr[30]; \
|
||||
/* This is how to output a string. */
|
||||
#define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \
|
||||
do { \
|
||||
register int i, c, len = (LEN), cur_pos = 17; \
|
||||
register int i, len = (LEN), cur_pos = 17; \
|
||||
register unsigned char *string = (unsigned char *)(STRING); \
|
||||
fprintf ((STREAM), "\t.ascii\t\""); \
|
||||
for (i = 0; i < len; i++) \
|
||||
|
||||
30
gcc/varasm.c
30
gcc/varasm.c
@@ -986,14 +986,7 @@ assemble_string (p, size)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined ASM_OUTPUT_ALIGNED_DECL_LOCAL
|
||||
#define ASM_EMIT_LOCAL(decl, name, size, rounded) ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, decl, name, size, DECL_ALIGN (decl))
|
||||
#elif defined ASM_OUTPUT_ALIGNED_LOCAL
|
||||
#define ASM_EMIT_LOCAL(decl, name, size, rounded) ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, DECL_ALIGN (decl))
|
||||
#else
|
||||
#define ASM_EMIT_LOCAL(decl, name, size, rounded) ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded)
|
||||
#endif
|
||||
#define ASM_EMIT_LOCAL(decl, name, size) ASM_OUTPUT_LOCAL(asm_out_file, name, size)
|
||||
|
||||
#if defined ASM_OUTPUT_ALIGNED_BSS
|
||||
#define ASM_EMIT_BSS(decl, name, size, rounded) ASM_OUTPUT_ALIGNED_BSS (asm_out_file, decl, name, size, DECL_ALIGN (decl))
|
||||
@@ -1069,7 +1062,7 @@ asm_emit_uninitialised (decl, name, size, rounded)
|
||||
ASM_EMIT_COMMON (decl, name, size, rounded);
|
||||
break;
|
||||
case asm_dest_local:
|
||||
ASM_EMIT_LOCAL (decl, name, size, rounded);
|
||||
ASM_EMIT_LOCAL (decl, name, size);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
@@ -1506,23 +1499,8 @@ assemble_static_space (size)
|
||||
|
||||
x = gen_rtx_SYMBOL_REF (Pmode, namestring);
|
||||
|
||||
#ifdef ASM_OUTPUT_ALIGNED_DECL_LOCAL
|
||||
ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, NULL_TREE, name, size,
|
||||
BIGGEST_ALIGNMENT);
|
||||
#else
|
||||
#ifdef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, BIGGEST_ALIGNMENT);
|
||||
#else
|
||||
{
|
||||
/* Round size up to multiple of BIGGEST_ALIGNMENT bits
|
||||
so that each uninitialized object starts on such a boundary. */
|
||||
int rounded = ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1)
|
||||
/ (BIGGEST_ALIGNMENT / BITS_PER_UNIT)
|
||||
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
|
||||
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
ASM_OUTPUT_LOCAL (asm_out_file, name, size);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user