Another fix on VectorInsert FP32 (thanks to LDj3SNuD
This commit is contained in:
parent
6b42189d05
commit
c7e78bcb45
1 changed files with 9 additions and 3 deletions
|
@ -1292,11 +1292,17 @@ namespace ARMeilleure.CodeGen.X86
|
|||
int mask1 = 0b11_10_01_00;
|
||||
|
||||
mask0 = BitUtils.RotateRight(mask0, index * 2, 8);
|
||||
//mask1 = BitUtils.RotateLeft (mask1, index * 2, 8);
|
||||
mask1 = BitUtils.RotateRight(mask1, 8 - index * 2, 8);
|
||||
|
||||
context.Assembler.Pshufd(src1, src1, (byte)mask0);
|
||||
context.Assembler.Movss (dest, src1, src2);
|
||||
context.Assembler.Pshufd(src1, src1, (byte)mask1);
|
||||
context.Assembler.Pshufd(src1, src1, (byte)mask0); // Lane to be inserted in position 0.
|
||||
context.Assembler.Movss (dest, src1, src2); // dest[127:0] = src1[127:32] | src2[31:0]
|
||||
context.Assembler.Pshufd(dest, dest, (byte)mask1); // Inserted lane in original position.
|
||||
|
||||
if (dest.GetRegister() != src1.GetRegister())
|
||||
{
|
||||
context.Assembler.Pshufd(src1, src1, (byte)mask1); // Restore src1.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue