2014-08-19 David Malcolm <dmalcolm@redhat.com>
+ * expr.h (emit_move_insn): Strengthen return type from rtx to
+ rtx_insn *.
+ (emit_move_insn_1): Likewise.
+ (emit_move_complex_push): Likewise.
+ (emit_move_complex_parts): Likewise.
+
+ * expr.c (emit_move_via_integer): Strengthen return type from rtx
+ to rtx_insn *. Replace use of NULL_RTX with NULL when working
+ with insns.
+ (emit_move_complex_push): Strengthen return type from rtx to
+ rtx_insn *.
+ (emit_move_complex): Likewise, also for local "ret".
+ (emit_move_ccmode): Likewise.
+ (emit_move_multi_word): Likewise for return type and locals
+ "last_insn", "seq".
+ (emit_move_insn_1): Likewise for return type and locals "result",
+ "ret".
+ (emit_move_insn): Likewise for return type and local "last_insn".
+ (compress_float_constant): Likewise.
+
+2014-08-19 David Malcolm <dmalcolm@redhat.com>
+
* emit-rtl.h (emit_copy_of_insn_after): Strengthen return type
from rtx to rtx_insn *.
static void store_by_pieces_2 (insn_gen_fn, machine_mode,
struct store_by_pieces_d *);
static tree clear_storage_libcall_fn (int);
-static rtx compress_float_constant (rtx, rtx);
+static rtx_insn *compress_float_constant (rtx, rtx);
static rtx get_subtarget (rtx);
static void store_constructor_field (rtx, unsigned HOST_WIDE_INT,
HOST_WIDE_INT, enum machine_mode,
an integer mode of the same size as MODE. Returns the instruction
emitted, or NULL if such a move could not be generated. */
-static rtx
+static rtx_insn *
emit_move_via_integer (enum machine_mode mode, rtx x, rtx y, bool force)
{
enum machine_mode imode;
/* There must exist a mode of the exact size we require. */
imode = int_mode_for_mode (mode);
if (imode == BLKmode)
- return NULL_RTX;
+ return NULL;
/* The target must support moves in this mode. */
code = optab_handler (mov_optab, imode);
if (code == CODE_FOR_nothing)
- return NULL_RTX;
+ return NULL;
x = emit_move_change_mode (imode, mode, x, force);
if (x == NULL_RTX)
- return NULL_RTX;
+ return NULL;
y = emit_move_change_mode (imode, mode, y, force);
if (y == NULL_RTX)
- return NULL_RTX;
+ return NULL;
return emit_insn (GEN_FCN (code) (x, y));
}
X is known to satisfy push_operand, and MODE is known to be complex.
Returns the last instruction emitted. */
-rtx
+rtx_insn *
emit_move_complex_push (enum machine_mode mode, rtx x, rtx y)
{
enum machine_mode submode = GET_MODE_INNER (mode);
/* A subroutine of emit_move_complex. Perform the move from Y to X
via two moves of the parts. Returns the last instruction emitted. */
-rtx
+rtx_insn *
emit_move_complex_parts (rtx x, rtx y)
{
/* Show the output dies here. This is necessary for SUBREGs
/* A subroutine of emit_move_insn_1. Generate a move from Y into X.
MODE is known to be complex. Returns the last instruction emitted. */
-static rtx
+static rtx_insn *
emit_move_complex (enum machine_mode mode, rtx x, rtx y)
{
bool try_int;
if (try_int)
{
- rtx ret;
+ rtx_insn *ret;
/* For memory to memory moves, optimal behavior can be had with the
existing block move logic. */
/* A subroutine of emit_move_insn_1. Generate a move from Y into X.
MODE is known to be MODE_CC. Returns the last instruction emitted. */
-static rtx
+static rtx_insn *
emit_move_ccmode (enum machine_mode mode, rtx x, rtx y)
{
- rtx ret;
+ rtx_insn *ret;
/* Assume all MODE_CC modes are equivalent; if we have movcc, use it. */
if (mode != CCmode)
pattern. Note that you will get better code if you define such
patterns, even if they must turn into multiple assembler instructions. */
-static rtx
+static rtx_insn *
emit_move_multi_word (enum machine_mode mode, rtx x, rtx y)
{
- rtx last_insn = 0;
- rtx seq, inner;
+ rtx_insn *last_insn = 0;
+ rtx_insn *seq;
+ rtx inner;
bool need_clobber;
int i;
Called just like emit_move_insn, but assumes X and Y
are basically valid. */
-rtx
+rtx_insn *
emit_move_insn_1 (rtx x, rtx y)
{
enum machine_mode mode = GET_MODE (x);
if (GET_MODE_CLASS (mode) == MODE_DECIMAL_FLOAT
|| ALL_FIXED_POINT_MODE_P (mode))
{
- rtx result = emit_move_via_integer (mode, x, y, true);
+ rtx_insn *result = emit_move_via_integer (mode, x, y, true);
/* If we can't find an integer mode, use multi words. */
if (result)
fits within a HOST_WIDE_INT. */
if (!CONSTANT_P (y) || GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
{
- rtx ret = emit_move_via_integer (mode, x, y, lra_in_progress);
+ rtx_insn *ret = emit_move_via_integer (mode, x, y, lra_in_progress);
if (ret)
{
Return the last instruction emitted. */
-rtx
+rtx_insn *
emit_move_insn (rtx x, rtx y)
{
enum machine_mode mode = GET_MODE (x);
rtx y_cst = NULL_RTX;
- rtx last_insn, set;
+ rtx_insn *last_insn;
+ rtx set;
gcc_assert (mode != BLKmode
&& (GET_MODE (y) == mode || GET_MODE (y) == VOIDmode));
perform the extension directly from constant or memory, then emit the
move as an extension. */
-static rtx
+static rtx_insn *
compress_float_constant (rtx x, rtx y)
{
enum machine_mode dstmode = GET_MODE (x);
srcmode = GET_MODE_WIDER_MODE (srcmode))
{
enum insn_code ic;
- rtx trunc_y, last_insn;
+ rtx trunc_y;
+ rtx_insn *last_insn;
/* Skip if the target can't extend this way. */
ic = can_extend_p (dstmode, srcmode, 0);
return last_insn;
}
- return NULL_RTX;
+ return NULL;
}
\f
/* Pushing data onto the stack. */
void *, unsigned int, bool, int);
/* Emit insns to set X from Y. */
-extern rtx emit_move_insn (rtx, rtx);
+extern rtx_insn *emit_move_insn (rtx, rtx);
/* Emit insns to set X from Y, with no frills. */
-extern rtx emit_move_insn_1 (rtx, rtx);
+extern rtx_insn *emit_move_insn_1 (rtx, rtx);
-extern rtx emit_move_complex_push (enum machine_mode, rtx, rtx);
-extern rtx emit_move_complex_parts (rtx, rtx);
+extern rtx_insn *emit_move_complex_push (enum machine_mode, rtx, rtx);
+extern rtx_insn *emit_move_complex_parts (rtx, rtx);
extern rtx emit_move_resolve_push (enum machine_mode, rtx);
/* Push a block of length SIZE (perhaps variable)