Background and motivation
See #94018 (comment) for background.
The following was approved in #94018
public static unsafe Vector<float> ConvertToSingleEvenRoundToOdd(Vector<double> value); // FCVTX // predicated, MOVPRFX
public static unsafe Vector<float> ConvertToSingleOddRoundToOdd(Vector<double> value); // FCVTXNT // predicated
The specs for these instructions are:
FCVTX
Convert active double-precision floating-point elements from the source vector to single-precision, rounding to Odd, and place the results in the even-numbered 32-bit elements of the destination vector, while setting the odd-numbered elements to zero. Inactive elements in the destination vector register remain unmodified.
FCVTXNT
Convert active double-precision floating-point elements from the source vector to single-precision, rounding to Odd, and place the results in the odd-numbered 32-bit elements of the destination vector, leaving the even-numbered elements unchanged. Inactive elements in the destination vector register remain unmodified.
When these were implemented, we added an even argument to both APIs. However this is incorrect as only FCVTXNT requires the extra input
API Proposal
ConvertToSingleEvenRoundToOdd should remain as currently designed. But ConvertToSingleOddRoundToOdd should be updated to take in a even argument.
public static unsafe Vector<float> ConvertToSingleEvenRoundToOdd(Vector<double> value); // FCVTX // predicated, MOVPRFX
public static unsafe Vector<float> ConvertToSingleOddRoundToOdd(Vector<float> even, Vector<double> value); // FCVTXNT // predicated
Once this is confirmed, we'll then need to fix up the CoreCLR code.
Background and motivation
See #94018 (comment) for background.
The following was approved in #94018
The specs for these instructions are:
FCVTX
Convert active double-precision floating-point elements from the source vector to single-precision, rounding to Odd, and place the results in the even-numbered 32-bit elements of the destination vector, while setting the odd-numbered elements to zero. Inactive elements in the destination vector register remain unmodified.
FCVTXNT
Convert active double-precision floating-point elements from the source vector to single-precision, rounding to Odd, and place the results in the odd-numbered 32-bit elements of the destination vector, leaving the even-numbered elements unchanged. Inactive elements in the destination vector register remain unmodified.
When these were implemented, we added an
evenargument to both APIs. However this is incorrect as only FCVTXNT requires the extra inputAPI Proposal
ConvertToSingleEvenRoundToOdd should remain as currently designed. But ConvertToSingleOddRoundToOdd should be updated to take in a
evenargument.Once this is confirmed, we'll then need to fix up the CoreCLR code.