Skip to content

Commit

Permalink
Applying formatting patch
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Apr 14, 2020
1 parent feb4fcd commit a7467da
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 43 deletions.
69 changes: 32 additions & 37 deletions src/coreclr/src/jit/hwintrinsic.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,43 +317,38 @@ struct HWIntrinsicInfo
};

#if defined(TARGET_XARCH)
#define _CMP_EQ_OQ 0x00 /* Equal (ordered, nonsignaling) */
#define _CMP_LT_OS 0x01 /* Less-than (ordered, signaling) */
#define _CMP_LE_OS 0x02 /* Less-than-or-equal (ordered, signaling) */
#define _CMP_UNORD_Q 0x03 /* Unordered (nonsignaling) */
#define _CMP_NEQ_UQ 0x04 /* Not-equal (unordered, nonsignaling) */
#define _CMP_NLT_US 0x05 /* Not-less-than (unordered, signaling) */
#define _CMP_NLE_US 0x06 /* Not-less-than-or-equal (unordered,
signaling) */
#define _CMP_ORD_Q 0x07 /* Ordered (nonsignaling) */
#define _CMP_EQ_UQ 0x08 /* Equal (unordered, non-signaling) */
#define _CMP_NGE_US 0x09 /* Not-greater-than-or-equal (unordered,
signaling) */
#define _CMP_NGT_US 0x0A /* Not-greater-than (unordered, signaling) */
#define _CMP_FALSE_OQ 0x0B /* False (ordered, nonsignaling) */
#define _CMP_NEQ_OQ 0x0C /* Not-equal (ordered, non-signaling) */
#define _CMP_GE_OS 0x0D /* Greater-than-or-equal (ordered, signaling) */
#define _CMP_GT_OS 0x0E /* Greater-than (ordered, signaling) */
#define _CMP_TRUE_UQ 0x0F /* True (unordered, non-signaling) */
#define _CMP_EQ_OS 0x10 /* Equal (ordered, signaling) */
#define _CMP_LT_OQ 0x11 /* Less-than (ordered, nonsignaling) */
#define _CMP_LE_OQ 0x12 /* Less-than-or-equal (ordered, nonsignaling) */
#define _CMP_UNORD_S 0x13 /* Unordered (signaling) */
#define _CMP_NEQ_US 0x14 /* Not-equal (unordered, signaling) */
#define _CMP_NLT_UQ 0x15 /* Not-less-than (unordered, nonsignaling) */
#define _CMP_NLE_UQ 0x16 /* Not-less-than-or-equal (unordered,
nonsignaling) */
#define _CMP_ORD_S 0x17 /* Ordered (signaling) */
#define _CMP_EQ_US 0x18 /* Equal (unordered, signaling) */
#define _CMP_NGE_UQ 0x19 /* Not-greater-than-or-equal (unordered,
nonsignaling) */
#define _CMP_NGT_UQ 0x1A /* Not-greater-than (unordered, nonsignaling) */
#define _CMP_FALSE_OS 0x1B /* False (ordered, signaling) */
#define _CMP_NEQ_OS 0x1C /* Not-equal (ordered, signaling) */
#define _CMP_GE_OQ 0x1D /* Greater-than-or-equal (ordered,
nonsignaling) */
#define _CMP_GT_OQ 0x1E /* Greater-than (ordered, nonsignaling) */
#define _CMP_TRUE_US 0x1F /* True (unordered, signaling) */
#define _CMP_EQ_OQ 0x00 /* Equal (ordered, nonsignaling) */
#define _CMP_LT_OS 0x01 /* Less-than (ordered, signaling) */
#define _CMP_LE_OS 0x02 /* Less-than-or-equal (ordered, signaling) */
#define _CMP_UNORD_Q 0x03 /* Unordered (nonsignaling) */
#define _CMP_NEQ_UQ 0x04 /* Not-equal (unordered, nonsignaling) */
#define _CMP_NLT_US 0x05 /* Not-less-than (unordered, signaling) */
#define _CMP_NLE_US 0x06 /* Not-less-than-or-equal (unordered, signaling) */
#define _CMP_ORD_Q 0x07 /* Ordered (nonsignaling) */
#define _CMP_EQ_UQ 0x08 /* Equal (unordered, non-signaling) */
#define _CMP_NGE_US 0x09 /* Not-greater-than-or-equal (unordered, signaling) */
#define _CMP_NGT_US 0x0A /* Not-greater-than (unordered, signaling) */
#define _CMP_FALSE_OQ 0x0B /* False (ordered, nonsignaling) */
#define _CMP_NEQ_OQ 0x0C /* Not-equal (ordered, non-signaling) */
#define _CMP_GE_OS 0x0D /* Greater-than-or-equal (ordered, signaling) */
#define _CMP_GT_OS 0x0E /* Greater-than (ordered, signaling) */
#define _CMP_TRUE_UQ 0x0F /* True (unordered, non-signaling) */
#define _CMP_EQ_OS 0x10 /* Equal (ordered, signaling) */
#define _CMP_LT_OQ 0x11 /* Less-than (ordered, nonsignaling) */
#define _CMP_LE_OQ 0x12 /* Less-than-or-equal (ordered, nonsignaling) */
#define _CMP_UNORD_S 0x13 /* Unordered (signaling) */
#define _CMP_NEQ_US 0x14 /* Not-equal (unordered, signaling) */
#define _CMP_NLT_UQ 0x15 /* Not-less-than (unordered, nonsignaling) */
#define _CMP_NLE_UQ 0x16 /* Not-less-than-or-equal (unordered, nonsignaling) */
#define _CMP_ORD_S 0x17 /* Ordered (signaling) */
#define _CMP_EQ_US 0x18 /* Equal (unordered, signaling) */
#define _CMP_NGE_UQ 0x19 /* Not-greater-than-or-equal (unordered, nonsignaling) */
#define _CMP_NGT_UQ 0x1A /* Not-greater-than (unordered, nonsignaling) */
#define _CMP_FALSE_OS 0x1B /* False (ordered, signaling) */
#define _CMP_NEQ_OS 0x1C /* Not-equal (ordered, signaling) */
#define _CMP_GE_OQ 0x1D /* Greater-than-or-equal (ordered, nonsignaling) */
#define _CMP_GT_OQ 0x1E /* Greater-than (ordered, nonsignaling) */
#define _CMP_TRUE_US 0x1F /* True (unordered, signaling) */
#endif

#endif // FEATURE_HW_INTRINSICS
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/src/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND
// hardware supported. Instead, they start with "swapped operands" and we fix that here.

int comparison = HWIntrinsicInfo::lookupIval(intrinsic);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison), NI_AVX_Compare,
baseType, simdSize);
}
Expand Down Expand Up @@ -1313,8 +1313,8 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAND
// hardware supported. Instead, they start with "swapped operands" and we fix that here.

int comparison = HWIntrinsicInfo::lookupIval(intrinsic);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison),
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison),
NI_AVX_CompareScalar, baseType, simdSize);
}
else
Expand Down Expand Up @@ -1407,7 +1407,7 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN
// hardware supported. Instead, they start with "swapped operands" and we fix that here.

int comparison = HWIntrinsicInfo::lookupIval(intrinsic);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison), NI_AVX_Compare,
baseType, simdSize);
}
Expand Down Expand Up @@ -1454,8 +1454,8 @@ GenTree* Compiler::impSSE2Intrinsic(NamedIntrinsic intrinsic, CORINFO_METHOD_HAN
// hardware supported. Instead, they start with "swapped operands" and we fix that here.

int comparison = HWIntrinsicInfo::lookupIval(intrinsic);
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison),
comparison = HWIntrinsicInfo::lookupFloatingComparisonForSwappedArgs(comparison);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, op2, gtNewIconNode(comparison),
NI_AVX_CompareScalar, baseType, simdSize);
}
else
Expand Down

0 comments on commit a7467da

Please sign in to comment.