| 135 | } |
| 136 | |
| 137 | void OpDispatchBuilder::MOVLPOp(OpcodeArgs) { |
| 138 | if (Op->Dest.IsGPR()) { |
| 139 | // xmm, xmm is movhlps special case |
| 140 | if (Op->Src[0].IsGPR()) { |
| 141 | Ref Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags, {.Align = OpSize::i128Bit}); |
| 142 | Ref Dest = LoadSource(FPRClass, Op, Op->Dest, Op->Flags, {.Align = OpSize::i128Bit}); |
| 143 | auto Result = _VInsElement(OpSize::i128Bit, OpSize::i64Bit, 0, 1, Dest, Src); |
| 144 | StoreResult_WithOpSize(FPRClass, Op, Op->Dest, Result, OpSize::i128Bit, OpSize::i128Bit); |
| 145 | } else { |
| 146 | const auto DstSize = OpSizeFromDst(Op); |
| 147 | Ref Src = MakeSegmentAddress(Op, Op->Src[0]); |
| 148 | Ref Dest = LoadSource_WithOpSize(FPRClass, Op, Op->Dest, DstSize, Op->Flags); |
| 149 | auto Result = _VLoadVectorElement(OpSize::i128Bit, OpSize::i64Bit, Dest, 0, Src); |
| 150 | StoreResult(FPRClass, Op, Result, OpSize::iInvalid); |
| 151 | } |
| 152 | } else { |
| 153 | Ref Src = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags, {.Align = OpSize::i64Bit}); |
| 154 | StoreResult_WithOpSize(FPRClass, Op, Op->Dest, Src, OpSize::i64Bit, OpSize::i64Bit); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void OpDispatchBuilder::VMOVLPOp(OpcodeArgs) { |
| 159 | Ref Src1 = LoadSource(FPRClass, Op, Op->Src[0], Op->Flags, {.Align = OpSize::i128Bit}); |