}
} fop_div;
+// Implement fold for a cast from float to an int.
+bool
+operator_cast::fold_range (irange &, tree, const frange &,
+ const irange &, relation_trio) const
+{
+ return false;
+}
+
+// Implement op1_range for a cast from float to an int.
+bool
+operator_cast::op1_range (frange &, tree, const irange &,
+ const irange &, relation_trio) const
+{
+ return false;
+}
+
+// Implement fold for a cast from int to a float.
+bool
+operator_cast::fold_range (frange &, tree, const irange &,
+ const frange &, relation_trio) const
+{
+ return false;
+}
+
+// Implement op1_range for a cast from int to a float.
+bool
+operator_cast::op1_range (irange &, tree, const frange &,
+ const frange &, relation_trio) const
+{
+ return false;
+}
// Initialize any float operators to the primary table
bool fold_range (prange &r, tree type,
const irange &op1, const prange &op2,
relation_trio rel = TRIO_VARYING) const final override;
+ bool fold_range (irange &r, tree type,
+ const frange &lh,
+ const irange &rh,
+ relation_trio = TRIO_VARYING) const;
+ bool fold_range (frange &r, tree type,
+ const irange &lh,
+ const frange &rh,
+ relation_trio = TRIO_VARYING) const;
+
bool op1_range (irange &r, tree type,
const irange &lhs, const irange &op2,
relation_trio rel = TRIO_VARYING) const final override;
bool op1_range (prange &r, tree type,
const irange &lhs, const prange &op2,
relation_trio rel = TRIO_VARYING) const final override;
+ bool op1_range (frange &r, tree type,
+ const irange &lhs,
+ const irange &op2,
+ relation_trio = TRIO_VARYING) const;
+ bool op1_range (irange &r, tree type,
+ const frange &lhs,
+ const frange &op2,
+ relation_trio = TRIO_VARYING) const;
+
relation_kind lhs_op1_relation (const irange &lhs,
const irange &op1, const irange &op2,
relation_kind) const final override;
// These are the supported dispatch patterns. These map to the parameter list
// of the routines in range_operator. Note the last 3 characters are
// shorthand for the LHS, OP1, and OP2 range discriminator class.
+// Reminder, single operand instructions use the LHS type for op2, even if
+// unused. so FLOAT = INT would be RO_FIF.
const unsigned RO_III = dispatch_trio (VR_IRANGE, VR_IRANGE, VR_IRANGE);
const unsigned RO_IFI = dispatch_trio (VR_IRANGE, VR_FRANGE, VR_IRANGE);
return m_operator->fold_range (as_a <frange> (r), type,
as_a <irange> (lh),
as_a <irange> (rh), rel);
+ case RO_FIF:
+ return m_operator->fold_range (as_a <frange> (r), type,
+ as_a <irange> (lh),
+ as_a <frange> (rh), rel);
case RO_PPP:
return m_operator->fold_range (as_a <prange> (r), type,
as_a <prange> (lh),
return m_operator->op1_range (as_a <irange> (r), type,
as_a <irange> (lhs),
as_a <irange> (op2), rel);
+ case RO_IFF:
+ return m_operator->op1_range (as_a <irange> (r), type,
+ as_a <frange> (lhs),
+ as_a <frange> (op2), rel);
case RO_PPP:
return m_operator->op1_range (as_a <prange> (r), type,
as_a <prange> (lhs),
return m_operator->op1_range (as_a <frange> (r), type,
as_a <irange> (lhs),
as_a <frange> (op2), rel);
+ case RO_FII:
+ return m_operator->op1_range (as_a <frange> (r), type,
+ as_a <irange> (lhs),
+ as_a <irange> (op2), rel);
case RO_FFF:
return m_operator->op1_range (as_a <frange> (r), type,
as_a <frange> (lhs),
return true;
}
+
+bool
+range_operator::fold_range (frange &, tree, const irange &,
+ const frange &, relation_trio) const
+{
+ return false;
+}
+
+bool
+range_operator::op1_range (irange &, tree, const frange &,
+ const frange &, relation_trio) const
+{
+ return false;
+}
+
+bool
+range_operator::op1_range (frange &, tree, const irange &,
+ const irange &, relation_trio) const
+{
+ return false;
+}
+
+
+
// The default for op1_range is to return false.
bool
const irange &lh,
const irange &rh,
relation_trio = TRIO_VARYING) const;
+ virtual bool fold_range (frange &r, tree type,
+ const irange &lh,
+ const frange &rh,
+ relation_trio = TRIO_VARYING) const;
virtual bool fold_range (prange &r, tree type,
const prange &lh,
const prange &rh,
const irange &lhs,
const frange &op2,
relation_trio = TRIO_VARYING) const;
-
+ virtual bool op1_range (irange &r, tree type,
+ const frange &lhs,
+ const frange &op2,
+ relation_trio = TRIO_VARYING) const;
+ virtual bool op1_range (frange &r, tree type,
+ const irange &lhs,
+ const irange &op2,
+ relation_trio = TRIO_VARYING) const;
virtual bool op2_range (irange &r, tree type,
const irange &lhs,