if (result)
return result;
- else if (REG_P (x))
+ /* If it's a REG, it must be a hard reg that's not valid in MODE. */
+ else if (REG_P (x)
+ /* Or we could have a subreg of a floating point value. */
+ || (GET_CODE (x) == SUBREG
+ && FLOAT_MODE_P (GET_MODE (SUBREG_REG (x)))))
{
- /* Must be a hard reg that's not valid in MODE. */
result = gen_lowpart_common (mode, copy_to_reg (x));
gcc_assert (result != 0);
return result;
return NULL;
}
+bool
+reg_truncated_to_mode_general (enum machine_mode mode ATTRIBUTE_UNUSED,
+ rtx x ATTRIBUTE_UNUSED)
+{
+ return false;
+}
+
/* Assuming that X is an rtx (e.g., MEM, REG or SUBREG) for a fixed-point
number, return an rtx (MEM, SUBREG, or CONST_INT) that refers to the
least-significant part of X.