Lines Matching defs:rhs
56 Scalar::Type Scalar::PromoteToMaxType(Scalar &lhs, Scalar &rhs) {
70 PromotionKey rhs_key = rhs.GetPromoKey();
73 Promote(rhs, lhs);
75 Promote(lhs, rhs);
78 if (lhs.GetPromoKey() == rhs.GetPromoKey())
408 Scalar &Scalar::operator+=(Scalar rhs) {
410 if ((m_type = PromoteToMaxType(copy, rhs)) != Scalar::e_void) {
415 m_integer = copy.m_integer + rhs.m_integer;
419 m_float = copy.m_float + rhs.m_float;
426 Scalar &Scalar::operator<<=(const Scalar &rhs) {
427 if (m_type == e_int && rhs.m_type == e_int)
428 static_cast<APInt &>(m_integer) <<= rhs.m_integer;
434 bool Scalar::ShiftRightLogical(const Scalar &rhs) {
435 if (m_type == e_int && rhs.m_type == e_int) {
436 m_integer = m_integer.lshr(rhs.m_integer);
443 Scalar &Scalar::operator>>=(const Scalar &rhs) {
451 switch (rhs.m_type) {
457 m_integer = m_integer.ashr(rhs.m_integer);
465 Scalar &Scalar::operator&=(const Scalar &rhs) {
466 if (m_type == e_int && rhs.m_type == e_int)
467 m_integer &= rhs.m_integer;
513 const Scalar lldb_private::operator+(const Scalar &lhs, const Scalar &rhs) {
515 result += rhs;
519 const Scalar lldb_private::operator-(Scalar lhs, Scalar rhs) {
521 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
526 result.m_integer = lhs.m_integer - rhs.m_integer;
529 result.m_float = lhs.m_float - rhs.m_float;
536 const Scalar lldb_private::operator/(Scalar lhs, Scalar rhs) {
538 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void &&
539 !rhs.IsZero()) {
544 result.m_integer = lhs.m_integer / rhs.m_integer;
547 result.m_float = lhs.m_float / rhs.m_float;
557 const Scalar lldb_private::operator*(Scalar lhs, Scalar rhs) {
559 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
564 result.m_integer = lhs.m_integer * rhs.m_integer;
567 result.m_float = lhs.m_float * rhs.m_float;
574 const Scalar lldb_private::operator&(Scalar lhs, Scalar rhs) {
576 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
578 result.m_integer = lhs.m_integer & rhs.m_integer;
585 const Scalar lldb_private::operator|(Scalar lhs, Scalar rhs) {
587 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
589 result.m_integer = lhs.m_integer | rhs.m_integer;
596 const Scalar lldb_private::operator%(Scalar lhs, Scalar rhs) {
598 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
599 if (!rhs.IsZero() && result.m_type == Scalar::e_int) {
600 result.m_integer = lhs.m_integer % rhs.m_integer;
608 const Scalar lldb_private::operator^(Scalar lhs, Scalar rhs) {
610 if ((result.m_type = Scalar::PromoteToMaxType(lhs, rhs)) != Scalar::e_void) {
612 result.m_integer = lhs.m_integer ^ rhs.m_integer;
619 const Scalar lldb_private::operator<<(const Scalar &lhs, const Scalar &rhs) {
621 result <<= rhs;
625 const Scalar lldb_private::operator>>(const Scalar &lhs, const Scalar &rhs) {
627 result >>= rhs;
855 APFloat::cmpResult lldb_private::compare(Scalar lhs, Scalar rhs) {
857 if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void)
858 return lhs.m_type == rhs.m_type ? APFloat::cmpEqual : APFloat::cmpUnordered;
860 switch (Scalar::PromoteToMaxType(lhs, rhs)) {
864 if (lhs.m_integer < rhs.m_integer)
866 if (lhs.m_integer > rhs.m_integer)
870 return lhs.m_float.compare(rhs.m_float);
875 bool lldb_private::operator==(const Scalar &lhs, const Scalar &rhs) {
876 return compare(lhs, rhs) == APFloat::cmpEqual;
879 bool lldb_private::operator!=(const Scalar &lhs, const Scalar &rhs) {
880 return compare(lhs, rhs) != APFloat::cmpEqual;
883 bool lldb_private::operator<(const Scalar &lhs, const Scalar &rhs) {
884 return compare(lhs, rhs) == APFloat::cmpLessThan;
887 bool lldb_private::operator<=(const Scalar &lhs, const Scalar &rhs) {
888 APFloat::cmpResult Res = compare(lhs, rhs);
892 bool lldb_private::operator>(const Scalar &lhs, const Scalar &rhs) {
893 return compare(lhs, rhs) == APFloat::cmpGreaterThan;
896 bool lldb_private::operator>=(const Scalar &lhs, const Scalar &rhs) {
897 APFloat::cmpResult Res = compare(lhs, rhs);