mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-16 20:17:05 +03:00
[bug] Fixed a bug in Vec::half() that halved to ZMM instead of XMM
This commit is contained in:
@@ -141,6 +141,10 @@ UNIT(x86_operand) {
|
||||
EXPECT_EQ(zmm7.ymm(), ymm7);
|
||||
EXPECT_EQ(zmm7.zmm(), zmm7);
|
||||
|
||||
EXPECT_EQ(xmm4.half(), xmm4);
|
||||
EXPECT_EQ(ymm4.half(), xmm4);
|
||||
EXPECT_EQ(zmm4.half(), ymm4);
|
||||
|
||||
INFO("Checking x86::Mm register properties");
|
||||
EXPECT_TRUE(Mm().is_reg());
|
||||
EXPECT_TRUE(mm2.is_reg());
|
||||
|
||||
@@ -237,7 +237,7 @@ class Vec : public UniVec {
|
||||
//! was ZMM, or XMM for whatever else input.
|
||||
[[nodiscard]]
|
||||
ASMJIT_INLINE_CONSTEXPR Vec half() const noexcept {
|
||||
return Vec(is_vec512() ? signature_of_t<RegType::kVec256>() : signature_of_t<RegType::kVec512>(), id());
|
||||
return Vec(is_vec512() ? signature_of_t<RegType::kVec256>() : signature_of_t<RegType::kVec128>(), id());
|
||||
}
|
||||
|
||||
//! \}
|
||||
|
||||
Reference in New Issue
Block a user