Commit 23f6f34f by Torbjorn Granlund

(Several places): Declare values from INTVAL(x) as HOST_WIDE_INT.

(uint32_operand): New function.
(output_block_move): Change unroll threshold from 64 to 32.
(compute_movstrsi_length): Corresponding change.
(print_operand): Don't call debug_rtx, just abort.
(initialize_pic): Delete.
(finalize_pic): Use PIC_OFFSET_TABLE_REGNUM rather than 19.

From-SVN: r6292
parent 2d19a71c
......@@ -168,7 +168,7 @@ reg_or_0_or_nonsymb_mem_operand (op, mode)
general register. */
int
cint_ok_for_move (intval)
int intval;
HOST_WIDE_INT intval;
{
/* OK if ldo, ldil, or zdepi, can be used. */
return (VAL_14_BITS_P (intval) || (intval & 0x7ff) == 0
......@@ -340,7 +340,6 @@ uint5_operand (op, mode)
return (GET_CODE (op) == CONST_INT && INT_U5_BITS (op));
}
int
int11_operand (op, mode)
rtx op;
......@@ -350,6 +349,22 @@ int11_operand (op, mode)
}
int
uint32_operand (op, mode)
rtx op;
enum machine_mode mode;
{
#if HOST_BITS_PER_WIDE_INT > 32
/* All allowed constants will fit a CONST_INT. */
return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) >= 0 && INTVAL (op) < 0x100000000L));
#else
return (GET_CODE (op) == CONST_INT
|| (GET_CODE (op) == CONST_DOUBLE
&& CONST_DOUBLE_HIGH (op) == 0));
#endif
}
int
arith5_operand (op, mode)
rtx op;
enum machine_mode mode;
......@@ -360,7 +375,7 @@ arith5_operand (op, mode)
/* True iff zdepi can be used to generate this CONST_INT. */
int
zdepi_cint_p (x)
unsigned x;
unsigned HOST_WIDE_INT x;
{
unsigned lsb_mask, t;
......@@ -372,10 +387,14 @@ zdepi_cint_p (x)
return ((t & (t - 1)) == 0);
}
/* True iff depi or extru can be used to compute (reg & mask). */
/* True iff depi or extru can be used to compute (reg & mask).
Accept bit pattern like these:
0....01....1
1....10....0
1..10..01..1 */
int
and_mask_p (mask)
unsigned mask;
unsigned HOST_WIDE_INT mask;
{
mask = ~mask;
mask += mask & -mask;
......@@ -395,7 +414,7 @@ and_operand (op, mode)
/* True iff depi can be used to compute (reg | MASK). */
int
ior_mask_p (mask)
unsigned mask;
unsigned HOST_WIDE_INT mask;
{
mask += mask & -mask;
return (mask & (mask - 1)) == 0;
......@@ -512,14 +531,6 @@ legitimize_pic_address (orig, mode, reg)
return pic_ref;
}
/* Set up PIC-specific rtl. This should not cause any insns
to be emitted. */
void
initialize_pic ()
{
}
/* Emit special PIC prologues and epilogues. */
void
......@@ -529,14 +540,13 @@ finalize_pic ()
{
emit_insn_after (gen_rtx (SET, VOIDmode,
hppa_save_pic_table_rtx,
gen_rtx (REG, Pmode, 19)),
gen_rtx (REG, Pmode, PIC_OFFSET_TABLE_REGNUM)),
get_insns ());
/* Need to emit this whether or not we obey regdecls,
since setjmp/longjmp can cause life info to screw up. */
hppa_save_pic_table_rtx = 0;
}
emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
}
/* Try machine-dependent ways of modifying an illegitimate address
......@@ -595,7 +605,6 @@ hppa_legitimize_address (x, oldx, mode)
rtx x, oldx;
enum machine_mode mode;
{
rtx orig = x;
/* Strip off CONST. */
......@@ -765,7 +774,7 @@ emit_move_sequence (operands, mode, scratch_reg)
&& ! memory_address_p (DFmode, XEXP (operand1, 0))
&& scratch_reg)
{
emit_move_insn (scratch_reg, XEXP (operand1 , 0));
emit_move_insn (scratch_reg, XEXP (operand1, 0));
emit_insn (gen_rtx (SET, VOIDmode, operand0, gen_rtx (MEM, mode,
scratch_reg)));
return 1;
......@@ -777,7 +786,7 @@ emit_move_sequence (operands, mode, scratch_reg)
&& ! memory_address_p (DFmode, XEXP (operand0, 0))
&& scratch_reg)
{
emit_move_insn (scratch_reg, XEXP (operand0 , 0));
emit_move_insn (scratch_reg, XEXP (operand0, 0));
emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (MEM, mode, scratch_reg),
operand1));
return 1;
......@@ -965,7 +974,7 @@ singlemove_string (operands)
/* See if we can handle this constant in a single instruction. */
if (cint_ok_for_move (INTVAL (operands[1])))
{
int intval = INTVAL (operands[1]);
HOST_WIDE_INT intval = INTVAL (operands[1]);
if (intval == 0)
return "copy 0,%0";
......@@ -1008,7 +1017,7 @@ singlemove_string (operands)
instructions. Store the immediate value to insert in OP[0]. */
void
compute_zdepi_operands (imm, op)
unsigned imm;
unsigned HOST_WIDE_INT imm;
unsigned *op;
{
int lsb, len;
......@@ -1384,7 +1393,7 @@ output_block_move (operands, size_is_constant)
if (align >= 4)
{
/* Don't unroll too large blocks. */
if (n_bytes > 64)
if (n_bytes > 32)
goto copy_with_loop;
/* Read and store using two registers, and hide latency
......@@ -1555,7 +1564,7 @@ compute_movstrsi_length (insn)
if (align >= 4)
{
/* Don't unroll too large blocks. */
if (n_bytes > 64)
if (n_bytes > 32)
goto copy_with_loop;
/* first load */
......@@ -1875,7 +1884,6 @@ load_reg (reg, disp, base)
gen_rtx (PLUS, SImode,
gen_rtx (REG, SImode, base),
GEN_INT (disp))));
}
else
{
......@@ -1905,7 +1913,6 @@ set_reg_plus_d(reg, base, disp)
gen_rtx (PLUS, SImode,
gen_rtx (REG, SImode, base),
GEN_INT (disp)));
}
else
{
......@@ -2092,7 +2099,7 @@ hppa_expand_prologue()
register, is saved at sp - 32 (in this function's frame) when
generating PIC code. */
if (flag_pic)
store_reg (19, -32, STACK_POINTER_REGNUM);
store_reg (PIC_OFFSET_TABLE_REGNUM, -32, STACK_POINTER_REGNUM);
/* Profiling code.
......@@ -2345,7 +2352,6 @@ hppa_expand_epilogue ()
emit_move_insn (gen_rtx (REG, DFmode, i),
gen_rtx (MEM, DFmode,
gen_rtx (POST_INC, DFmode, tmpreg)));
}
else
{
......@@ -2689,8 +2695,6 @@ print_operand (file, x, code)
case LTU:
fprintf (file, "<<"); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
......@@ -2718,8 +2722,6 @@ print_operand (file, x, code)
case LTU:
fprintf (file, ">>="); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
......@@ -2741,8 +2743,6 @@ print_operand (file, x, code)
case LE:
fprintf (file, "!<="); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
......@@ -2770,8 +2770,6 @@ print_operand (file, x, code)
case LTU:
fprintf (file, ">>"); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
......@@ -2799,8 +2797,6 @@ print_operand (file, x, code)
case LTU:
fprintf (file, "<<="); break;
default:
printf ("Can't grok '%c' operator:\n", code);
debug_rtx (x);
abort ();
}
return;
......@@ -3706,7 +3702,7 @@ output_movb (operands, insn, which_alternative, reverse_comparison)
return "movb,%C2 %1,%0,%3";
else if (length == 8)
{
/* Handle weird backwards branch with a fulled delay slot
/* Handle weird backwards branch with a filled delay slot
which is nullified. */
if (dbr_sequence_length () != 0
&& ! forward_branch_p (insn)
......@@ -4013,4 +4009,3 @@ jump_in_call_delay (insn)
else
return 0;
}
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