Skip to content

Commit

Permalink
Continue implementation portable u128
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian LALU committed Sep 26, 2024
1 parent 57be7a8 commit 2feb069
Show file tree
Hide file tree
Showing 2 changed files with 446 additions and 110 deletions.
25 changes: 12 additions & 13 deletions interface/core/i128/i128_intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,23 +321,23 @@ namespace hud
}

/** Logical OR */
constexpr i128_intrinsics &operator|=(i128_intrinsics right) noexcept
constexpr i128_intrinsics &operator|=(i128_intrinsics other) noexcept
{
intrinsic_value_ |= right.intrinsic_value_;
intrinsic_value_ |= other.intrinsic_value_;
return *this;
}

/** Logical AND */
constexpr i128_intrinsics &operator&=(i128_intrinsics right) noexcept
constexpr i128_intrinsics &operator&=(i128_intrinsics other) noexcept
{
intrinsic_value_ &= right.intrinsic_value_;
intrinsic_value_ &= other.intrinsic_value_;
return *this;
}

/** Logical XOR */
constexpr i128_intrinsics &operator^=(i128_intrinsics right) noexcept
constexpr i128_intrinsics &operator^=(i128_intrinsics other) noexcept
{
intrinsic_value_ ^= right.intrinsic_value_;
intrinsic_value_ ^= other.intrinsic_value_;
return *this;
}

Expand Down Expand Up @@ -478,7 +478,6 @@ namespace hud
intrinsic_value_ = static_cast<unsigned __int128>(value);
}

///////////////////////////
/** Retrieves the low part of the u64. */
[[nodiscard]] constexpr u64 low() const noexcept
{
Expand Down Expand Up @@ -696,23 +695,23 @@ namespace hud
}

/** Logical OR */
constexpr u128_intrinsics &operator|=(u128_intrinsics right) noexcept
constexpr u128_intrinsics &operator|=(u128_intrinsics other) noexcept
{
intrinsic_value_ |= right.intrinsic_value_;
intrinsic_value_ |= other.intrinsic_value_;
return *this;
}

/** Logical AND */
constexpr u128_intrinsics &operator&=(u128_intrinsics right) noexcept
constexpr u128_intrinsics &operator&=(u128_intrinsics other) noexcept
{
intrinsic_value_ &= right.intrinsic_value_;
intrinsic_value_ &= other.intrinsic_value_;
return *this;
}

/** Logical XOR */
constexpr u128_intrinsics &operator^=(u128_intrinsics right) noexcept
constexpr u128_intrinsics &operator^=(u128_intrinsics other) noexcept
{
intrinsic_value_ ^= right.intrinsic_value_;
intrinsic_value_ ^= other.intrinsic_value_;
return *this;
}

Expand Down
Loading

0 comments on commit 2feb069

Please sign in to comment.