Lines Matching refs:rhs

55 Scalar::Type Scalar::PromoteToMaxType(Scalar &lhs, Scalar &rhs) {  in PromoteToMaxType()  argument
69 PromotionKey rhs_key = rhs.GetPromoKey(); in PromoteToMaxType()
72 Promote(rhs, lhs); in PromoteToMaxType()
74 Promote(lhs, rhs); in PromoteToMaxType()
77 if (lhs.GetPromoKey() == rhs.GetPromoKey()) in PromoteToMaxType()
407 Scalar &Scalar::operator+=(Scalar rhs) { in operator +=() argument
409 if ((m_type = PromoteToMaxType(copy, rhs)) != Scalar::e_void) { in operator +=()
414 m_integer = copy.m_integer + rhs.m_integer; in operator +=()
418 m_float = copy.m_float + rhs.m_float; in operator +=()
425 Scalar &Scalar::operator<<=(const Scalar &rhs) { in operator <<=() argument
426 if (m_type == e_int && rhs.m_type == e_int) in operator <<=()
427 static_cast<APInt &>(m_integer) <<= rhs.m_integer; in operator <<=()
433 bool Scalar::ShiftRightLogical(const Scalar &rhs) { in ShiftRightLogical() argument
434 if (m_type == e_int && rhs.m_type == e_int) { in ShiftRightLogical()
435 m_integer = m_integer.lshr(rhs.m_integer); in ShiftRightLogical()
442 Scalar &Scalar::operator>>=(const Scalar &rhs) { in operator >>=() argument
450 switch (rhs.m_type) { in operator >>=()
456 m_integer = m_integer.ashr(rhs.m_integer); in operator >>=()
464 Scalar &Scalar::operator&=(const Scalar &rhs) { in operator &=() argument
465 if (m_type == e_int && rhs.m_type == e_int) in operator &=()
466 m_integer &= rhs.m_integer; in operator &=()
512 const Scalar lldb_private::operator+(const Scalar &lhs, const Scalar &rhs) { in operator +() argument
514 result += rhs; in operator +()
518 const Scalar lldb_private::operator-(Scalar lhs, Scalar rhs) { in operator -() argument
520 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator -()
525 result.m_integer = lhs.m_integer - rhs.m_integer; in operator -()
528 result.m_float = lhs.m_float - rhs.m_float; in operator -()
535 const Scalar lldb_private::operator/(Scalar lhs, Scalar rhs) { in operator /() argument
537 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void && in operator /()
538 !rhs.IsZero()) { in operator /()
543 result.m_integer = lhs.m_integer / rhs.m_integer; in operator /()
546 result.m_float = lhs.m_float / rhs.m_float; in operator /()
556 const Scalar lldb_private::operator*(Scalar lhs, Scalar rhs) { in operator *() argument
558 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator *()
563 result.m_integer = lhs.m_integer * rhs.m_integer; in operator *()
566 result.m_float = lhs.m_float * rhs.m_float; in operator *()
573 const Scalar lldb_private::operator&(Scalar lhs, Scalar rhs) { in operator &() argument
575 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator &()
577 result.m_integer = lhs.m_integer & rhs.m_integer; in operator &()
584 const Scalar lldb_private::operator|(Scalar lhs, Scalar rhs) { in operator |() argument
586 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator |()
588 result.m_integer = lhs.m_integer | rhs.m_integer; in operator |()
595 const Scalar lldb_private::operator%(Scalar lhs, Scalar rhs) { in operator %() argument
597 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator %()
598 if (!rhs.IsZero() && result.m_type == Scalar::e_int) { in operator %()
599 result.m_integer = lhs.m_integer % rhs.m_integer; in operator %()
607 const Scalar lldb_private::operator^(Scalar lhs, Scalar rhs) { in operator ^() argument
609 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) { in operator ^()
611 result.m_integer = lhs.m_integer ^ rhs.m_integer; in operator ^()
618 const Scalar lldb_private::operator<<(const Scalar &lhs, const Scalar &rhs) { in operator <<() argument
620 result <<= rhs; in operator <<()
624 const Scalar lldb_private::operator>>(const Scalar &lhs, const Scalar &rhs) { in operator >>() argument
626 result >>= rhs; in operator >>()
815 bool lldb_private::operator==(Scalar lhs, Scalar rhs) { in operator ==() argument
817 if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) in operator ==()
818 return lhs.m_type == rhs.m_type; in operator ==()
821 switch (Scalar::PromoteToMaxType(lhs, rhs)) { in operator ==()
825 return lhs.m_integer == rhs.m_integer; in operator ==()
827 result = lhs.m_float.compare(rhs.m_float); in operator ==()
834 bool lldb_private::operator!=(const Scalar &lhs, const Scalar &rhs) { in operator !=() argument
835 return !(lhs == rhs); in operator !=()
838 bool lldb_private::operator<(Scalar lhs, Scalar rhs) { in operator <() argument
839 if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void) in operator <()
843 switch (Scalar::PromoteToMaxType(lhs, rhs)) { in operator <()
847 return lhs.m_integer < rhs.m_integer; in operator <()
849 result = lhs.m_float.compare(rhs.m_float); in operator <()
856 bool lldb_private::operator<=(const Scalar &lhs, const Scalar &rhs) { in operator <=() argument
857 return !(rhs < lhs); in operator <=()
860 bool lldb_private::operator>(const Scalar &lhs, const Scalar &rhs) { in operator >() argument
861 return rhs < lhs; in operator >()
864 bool lldb_private::operator>=(const Scalar &lhs, const Scalar &rhs) { in operator >=() argument
865 return !(lhs < rhs); in operator >=()