| 2131 | |
| 2132 | template<IR::OpSize SrcElementSize, bool HostRoundingMode> |
| 2133 | void OpDispatchBuilder::CVTFPR_To_GPR(OpcodeArgs) { |
| 2134 | // If loading a vector, use the full size, so we don't |
| 2135 | // unnecessarily zero extend the vector. Otherwise, if |
| 2136 | // memory, then we want to load the element size exactly. |
| 2137 | const auto SrcSize = Op->Src[0].IsGPR() ? OpSize::i128Bit : SrcElementSize; |
| 2138 | Ref Src = LoadSource_WithOpSize(FPRClass, Op, Op->Src[0], SrcSize, Op->Flags); |
| 2139 | Ref Result = CVTFPR_To_GPRImpl(Op, Src, SrcElementSize, HostRoundingMode); |
| 2140 | StoreResult(GPRClass, Op, Result, OpSize::iInvalid); |
| 2141 | } |
| 2142 | |
| 2143 | template void OpDispatchBuilder::CVTFPR_To_GPR<OpSize::i32Bit, true>(OpcodeArgs); |
| 2144 | template void OpDispatchBuilder::CVTFPR_To_GPR<OpSize::i32Bit, false>(OpcodeArgs); |