Merge pull request #5557 from lioncash/round

This commit is contained in:
Ryan Houdek authored and GitHub committed 2026-06-16 22:09:20 -07:00
commit 0b1f336e03
3 files changed
+51 -1

No files matched your search

@@ -4019,7 +4019,7 @@ void OpDispatchBuilder::VectorRound(OpcodeArgs, IR::OpSize ElementSize) {
const uint64_t Mode = Op->Src[1].Literal();
Src = VectorRoundImpl(OpSizeFromDst(Op), ElementSize, Src, Mode);
StoreResultFPR(Op, Src);
StoreResult_WithAVXInsert(VectorOpType::SSE, RegClass::FPR, Op, Src);
}
void OpDispatchBuilder::AVXVectorRound(OpcodeArgs, IR::OpSize ElementSize) {
@@ -0,0 +1,25 @@
%ifdef CONFIG
{
"HostFeatures": ["AVX"],
"RegData": {
"XMM0": ["0x43cc1ad6970b4549", "0x8000000000000000", "0xccdbcfc31f3ff0f3", "0x108390defebac4be"],
"XMM1": ["0xc4be43cc1ad6970b", "0x4549bd7eb46a1278", "0", "0"],
"XMM2": ["0xc4be43cc1ad6970b", "0x4549bd7eb46a1278", "0xf793ef673dac6e4c", "0xbb7b5b3d85d34271"]
}
}
%endif
vmovaps ymm0, [rel .data]
vmovaps ymm1, [rel .data + (1 * 32)]
vmovaps ymm2, [rel .data + (2 * 32)]
roundpd xmm0, xmm1, 0b00
vroundpd xmm1, xmm2, 0b00
hlt
align 32
.data:
dq 0xfdecd28fab3fa4a5, 0x7d7ccd8836d09fc2, 0xccdbcfc31f3ff0f3, 0x108390defebac4be
dq 0x43cc1ad6970b4549, 0xbd7eb46a1278f793, 0xef673dac6e4cbb7b, 0x5b3d85d342718be9
dq 0xc4be43cc1ad6970b, 0x4549bd7eb46a1278, 0xf793ef673dac6e4c, 0xbb7b5b3d85d34271
@@ -0,0 +1,25 @@
%ifdef CONFIG
{
"HostFeatures": ["AVX"],
"RegData": {
"XMM0": ["0x43cc000080000000", "0x8000000000000000", "0xccdbcfc31f3ff0f3", "0x108390defebac4be"],
"XMM1": ["0xc4be400000000000", "0x4549c00080000000", "0", "0"],
"XMM2": ["0xc4be43cc1ad6970b", "0x4549bd7eb46a1278", "0xf793ef673dac6e4c", "0xbb7b5b3d85d34271"]
}
}
%endif
vmovaps ymm0, [rel .data]
vmovaps ymm1, [rel .data + (1 * 32)]
vmovaps ymm2, [rel .data + (2 * 32)]
roundps xmm0, xmm1, 0b00
vroundps xmm1, xmm2, 0b00
hlt
align 32
.data:
dq 0xfdecd28fab3fa4a5, 0x7d7ccd8836d09fc2, 0xccdbcfc31f3ff0f3, 0x108390defebac4be
dq 0x43cc1ad6970b4549, 0xbd7eb46a1278f793, 0xef673dac6e4cbb7b, 0x5b3d85d342718be9
dq 0xc4be43cc1ad6970b, 0x4549bd7eb46a1278, 0xf793ef673dac6e4c, 0xbb7b5b3d85d34271