#include "optabs.h"
#include "langhooks.h"
-static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
-static void do_jump_by_parts_equality PARAMS ((tree, rtx, rtx));
-static void do_compare_and_jump PARAMS ((tree, enum rtx_code, enum rtx_code,
- rtx, rtx));
+static void do_jump_by_parts_greater (tree, int, rtx, rtx);
+static void do_jump_by_parts_equality (tree, rtx, rtx);
+static void do_compare_and_jump (tree, enum rtx_code, enum rtx_code, rtx,
+ rtx);
/* At the start of a function, record that we have no previously-pushed
arguments waiting to be popped. */
void
-init_pending_stack_adjust ()
+init_pending_stack_adjust (void)
{
pending_stack_adjust = 0;
}
frame pointer regardless of the value of flag_omit_frame_pointer. */
void
-clear_pending_stack_adjust ()
+clear_pending_stack_adjust (void)
{
#ifdef EXIT_IGNORE_STACK
if (optimize > 0
/* Pop any previously-pushed arguments that have not been popped yet. */
void
-do_pending_stack_adjust ()
+do_pending_stack_adjust (void)
{
if (inhibit_defer_pop == 0)
{
functions here. */
void
-jumpifnot (exp, label)
- tree exp;
- rtx label;
+jumpifnot (tree exp, rtx label)
{
do_jump (exp, label, NULL_RTX);
}
/* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
void
-jumpif (exp, label)
- tree exp;
- rtx label;
+jumpif (tree exp, rtx label)
{
do_jump (exp, NULL_RTX, label);
}
&&, || and comparison operators in EXP. */
void
-do_jump (exp, if_false_label, if_true_label)
- tree exp;
- rtx if_false_label, if_true_label;
+do_jump (tree exp, rtx if_false_label, rtx if_true_label)
{
enum tree_code code = TREE_CODE (exp);
/* Some cases need to create a label to jump to
}
}
}
- /* fall through and generate the normal code. */
+ /* Fall through and generate the normal code. */
default:
normal:
/* Note swapping the labels gives us not-equal. */
do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label);
else if (GET_MODE (temp) != VOIDmode)
- do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)),
- NE, TREE_UNSIGNED (TREE_TYPE (exp)),
- GET_MODE (temp), NULL_RTX,
- if_false_label, if_true_label);
+ {
+ /* The RTL optimizers prefer comparisons against pseudos. */
+ if (GET_CODE (temp) == SUBREG)
+ temp = copy_to_reg (temp);
+ do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)),
+ NE, TREE_UNSIGNED (TREE_TYPE (exp)),
+ GET_MODE (temp), NULL_RTX,
+ if_false_label, if_true_label);
+ }
else
abort ();
}
and LT if SWAP is 1. */
static void
-do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label)
- tree exp;
- int swap;
- rtx if_false_label, if_true_label;
+do_jump_by_parts_greater (tree exp, int swap, rtx if_false_label,
+ rtx if_true_label)
{
rtx op0 = expand_expr (TREE_OPERAND (exp, swap), NULL_RTX, VOIDmode, 0);
rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), NULL_RTX, VOIDmode, 0);
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
void
-do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true_label)
- enum machine_mode mode;
- int unsignedp;
- rtx op0, op1;
- rtx if_false_label, if_true_label;
+do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
+ rtx op1, rtx if_false_label, rtx if_true_label)
{
int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD);
rtx drop_through_label = 0;
with one insn, test the comparison and jump to the appropriate label. */
static void
-do_jump_by_parts_equality (exp, if_false_label, if_true_label)
- tree exp;
- rtx if_false_label, if_true_label;
+do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label)
{
rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
for the available compare insns. */
void
-do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
- rtx op0;
- rtx if_false_label, if_true_label;
+do_jump_by_parts_equality_rtx (rtx op0, rtx if_false_label, rtx if_true_label)
{
int nwords = GET_MODE_SIZE (GET_MODE (op0)) / UNITS_PER_WORD;
rtx part;
compared. */
rtx
-compare_from_rtx (op0, op1, code, unsignedp, mode, size)
- rtx op0, op1;
- enum rtx_code code;
- int unsignedp;
- enum machine_mode mode;
- rtx size;
+compare_from_rtx (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
+ enum machine_mode mode, rtx size)
{
enum rtx_code ucode;
rtx tem;
compared. */
void
-do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
- if_false_label, if_true_label)
- rtx op0, op1;
- enum rtx_code code;
- int unsignedp;
- enum machine_mode mode;
- rtx size;
- rtx if_false_label, if_true_label;
+do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
+ enum machine_mode mode, rtx size, rtx if_false_label,
+ rtx if_true_label)
{
enum rtx_code ucode;
rtx tem;
things pushed on the stack that aren't yet used. */
static void
-do_compare_and_jump (exp, signed_code, unsigned_code, if_false_label,
- if_true_label)
- tree exp;
- enum rtx_code signed_code, unsigned_code;
- rtx if_false_label, if_true_label;
+do_compare_and_jump (tree exp, enum rtx_code signed_code,
+ enum rtx_code unsigned_code, rtx if_false_label,
+ rtx if_true_label)
{
rtx op0, op1;
tree type;