mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-28 00:00:35 +01:00
x86_64/VectorOps: Separate 128-bit VectorImm path
This commit is contained in:
1 parent
56ff09f3ac
commit
dc41c3bd9f
1 file changed
+9
-8
@@ -23,9 +23,12 @@ DEF_OP(VectorZero) {
|
||||
}
|
||||
|
||||
DEF_OP(VectorImm) {
|
||||
auto Op = IROp->C<IR::IROp_VectorImm>();
|
||||
const auto Op = IROp->C<IR::IROp_VectorImm>();
|
||||
const auto OpSize = IROp->Size;
|
||||
|
||||
const auto Is128Bit = OpSize == Core::CPUState::XMM_SSE_REG_SIZE;
|
||||
const auto Is256Bit = OpSize == Core::CPUState::XMM_AVX_REG_SIZE;
|
||||
|
||||
const uint8_t OpSize = IROp->Size;
|
||||
const uint64_t Imm = Op->Immediate;
|
||||
|
||||
const auto Dst = GetDst(Node);
|
||||
@@ -63,12 +66,10 @@ DEF_OP(VectorImm) {
|
||||
mov(TMP1, Element);
|
||||
vmovq(Dst, TMP1);
|
||||
|
||||
if (OpSize >= 16) {
|
||||
LOGMAN_THROW_AA_FMT(OpSize == 16 || OpSize == 32,
|
||||
"Can't handle a vector of size: {}", OpSize);
|
||||
|
||||
// Duplicate into upper elements
|
||||
vbroadcastsd(ToYMM(Dst), Dst);
|
||||
if (Is256Bit) {
|
||||
vpbroadcastq(ToYMM(Dst), Dst);
|
||||
} else if (Is128Bit) {
|
||||
vpbroadcastq(Dst, Dst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user