Removed more unnecessary sse checks
This commit is contained in:
parent
14f44e47af
commit
8db1e8a6c6
3 changed files with 7 additions and 74 deletions
|
@ -317,11 +317,6 @@ namespace ChocolArm64.Instructions
|
|||
|
||||
private unsafe static void FromByteArrayToVector(byte[] state, ref Vector128<float> op)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
fixed (byte* ptr = &state[0])
|
||||
{
|
||||
op = Sse.StaticCast<byte, float>(Sse2.LoadVector128(ptr));
|
||||
|
|
|
@ -239,21 +239,7 @@ namespace ChocolArm64.Memory
|
|||
}
|
||||
}
|
||||
|
||||
public Vector128<float> ReadVector8(long position)
|
||||
{
|
||||
if (Sse2.IsSupported)
|
||||
{
|
||||
return Vector128.Create(ReadByte(position), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).As<float>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector128<float> value = VectorHelper.VectorSingleZero();
|
||||
|
||||
value = VectorHelper.VectorInsertInt(ReadByte(position), value, 0, 0);
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
public Vector128<float> ReadVector8(long position) => Vector128.Create(ReadByte(position), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).As<float>();
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public Vector128<float> ReadVector16(long position)
|
||||
|
|
|
@ -430,35 +430,11 @@ namespace Ryujinx.Tests.Cpu
|
|||
bool IsNormalOrSubnormalD(double d) => double.IsNormal(d) || double.IsSubnormal(d);
|
||||
}
|
||||
|
||||
protected static Vector128<float> MakeVectorE0(double e0)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE0(double e0) => Vector128.Create(BitConverter.DoubleToInt64Bits(e0), 0).As<float>();
|
||||
|
||||
return Vector128.Create(BitConverter.DoubleToInt64Bits(e0), 0).As<float>();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE0E1(double e0, double e1) => Vector128.Create(BitConverter.DoubleToInt64Bits(e0), BitConverter.DoubleToInt64Bits(e1)).As<float>();
|
||||
|
||||
protected static Vector128<float> MakeVectorE0E1(double e0, double e1)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
return Vector128.Create(BitConverter.DoubleToInt64Bits(e0), BitConverter.DoubleToInt64Bits(e1)).As<float>();
|
||||
}
|
||||
|
||||
protected static Vector128<float> MakeVectorE1(double e1)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
return Vector128.Create(0, BitConverter.DoubleToInt64Bits(e1)).As<float>();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE1(double e1) => Vector128.Create(0, BitConverter.DoubleToInt64Bits(e1)).As<float>();
|
||||
|
||||
protected static float VectorExtractSingle(Vector128<float> vector, byte index)
|
||||
{
|
||||
|
@ -484,35 +460,11 @@ namespace Ryujinx.Tests.Cpu
|
|||
return BitConverter.Int64BitsToDouble(value);
|
||||
}
|
||||
|
||||
protected static Vector128<float> MakeVectorE0(ulong e0)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE0(ulong e0) => Vector128.Create(e0, 0).As<float>();
|
||||
|
||||
return Vector128.Create(e0, 0).As<float>();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE0E1(ulong e0, ulong e1) => Vector128.Create(e0, e1).As<float>();
|
||||
|
||||
protected static Vector128<float> MakeVectorE0E1(ulong e0, ulong e1)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
return Vector128.Create(e0, e1).As<float>();
|
||||
}
|
||||
|
||||
protected static Vector128<float> MakeVectorE1(ulong e1)
|
||||
{
|
||||
if (!Sse2.IsSupported)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
return Vector128.Create(0, e1).As<float>();
|
||||
}
|
||||
protected static Vector128<float> MakeVectorE1(ulong e1) => Vector128.Create(0, e1).As<float>();
|
||||
|
||||
protected static ulong GetVectorE0(Vector128<float> vector)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue