Skip to content

Commit 15b6908

Browse files
authored
[Headers][X86] Make brief descriptions briefer (#82422)
In Sony's document processing, the first "paragraph" of the description is duplicated into a Brief Description section. Add paragraph breaks to make those brief descriptions less verbose. In fmaintrin.h we were including the \code blocks, which are inappropriate for a brief description. While I was in there, change \code to \code{.operation} which the Intel document processing wants.
1 parent b6f4dd9 commit 15b6908

File tree

6 files changed

+201
-188
lines changed

6 files changed

+201
-188
lines changed

clang/lib/Headers/emmintrin.h

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,9 +2099,11 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_add_epi64(__m128i __a,
20992099
}
21002100

21012101
/// Adds, with saturation, the corresponding elements of two 128-bit
2102-
/// signed [16 x i8] vectors, saving each sum in the corresponding element of
2103-
/// a 128-bit result vector of [16 x i8]. Positive sums greater than 0x7F are
2104-
/// saturated to 0x7F. Negative sums less than 0x80 are saturated to 0x80.
2102+
/// signed [16 x i8] vectors, saving each sum in the corresponding element
2103+
/// of a 128-bit result vector of [16 x i8].
2104+
///
2105+
/// Positive sums greater than 0x7F are saturated to 0x7F. Negative sums
2106+
/// less than 0x80 are saturated to 0x80.
21052107
///
21062108
/// \headerfile <x86intrin.h>
21072109
///
@@ -2119,10 +2121,11 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_adds_epi8(__m128i __a,
21192121
}
21202122

21212123
/// Adds, with saturation, the corresponding elements of two 128-bit
2122-
/// signed [8 x i16] vectors, saving each sum in the corresponding element of
2123-
/// a 128-bit result vector of [8 x i16]. Positive sums greater than 0x7FFF
2124-
/// are saturated to 0x7FFF. Negative sums less than 0x8000 are saturated to
2125-
/// 0x8000.
2124+
/// signed [8 x i16] vectors, saving each sum in the corresponding element
2125+
/// of a 128-bit result vector of [8 x i16].
2126+
///
2127+
/// Positive sums greater than 0x7FFF are saturated to 0x7FFF. Negative sums
2128+
/// less than 0x8000 are saturated to 0x8000.
21262129
///
21272130
/// \headerfile <x86intrin.h>
21282131
///
@@ -2141,8 +2144,10 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_adds_epi16(__m128i __a,
21412144

21422145
/// Adds, with saturation, the corresponding elements of two 128-bit
21432146
/// unsigned [16 x i8] vectors, saving each sum in the corresponding element
2144-
/// of a 128-bit result vector of [16 x i8]. Positive sums greater than 0xFF
2145-
/// are saturated to 0xFF. Negative sums are saturated to 0x00.
2147+
/// of a 128-bit result vector of [16 x i8].
2148+
///
2149+
/// Positive sums greater than 0xFF are saturated to 0xFF. Negative sums are
2150+
/// saturated to 0x00.
21462151
///
21472152
/// \headerfile <x86intrin.h>
21482153
///
@@ -2161,8 +2166,10 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_adds_epu8(__m128i __a,
21612166

21622167
/// Adds, with saturation, the corresponding elements of two 128-bit
21632168
/// unsigned [8 x i16] vectors, saving each sum in the corresponding element
2164-
/// of a 128-bit result vector of [8 x i16]. Positive sums greater than
2165-
/// 0xFFFF are saturated to 0xFFFF. Negative sums are saturated to 0x0000.
2169+
/// of a 128-bit result vector of [8 x i16].
2170+
///
2171+
/// Positive sums greater than 0xFFFF are saturated to 0xFFFF. Negative sums
2172+
/// are saturated to 0x0000.
21662173
///
21672174
/// \headerfile <x86intrin.h>
21682175
///
@@ -2518,10 +2525,12 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sub_epi64(__m128i __a,
25182525
return (__m128i)((__v2du)__a - (__v2du)__b);
25192526
}
25202527

2521-
/// Subtracts corresponding 8-bit signed integer values in the input and
2522-
/// returns the differences in the corresponding bytes in the destination.
2523-
/// Differences greater than 0x7F are saturated to 0x7F, and differences less
2524-
/// than 0x80 are saturated to 0x80.
2528+
/// Subtracts, with saturation, corresponding 8-bit signed integer values in
2529+
/// the input and returns the differences in the corresponding bytes in the
2530+
/// destination.
2531+
///
2532+
/// Differences greater than 0x7F are saturated to 0x7F, and differences
2533+
/// less than 0x80 are saturated to 0x80.
25252534
///
25262535
/// \headerfile <x86intrin.h>
25272536
///
@@ -2538,8 +2547,10 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_subs_epi8(__m128i __a,
25382547
return (__m128i)__builtin_elementwise_sub_sat((__v16qs)__a, (__v16qs)__b);
25392548
}
25402549

2541-
/// Subtracts corresponding 16-bit signed integer values in the input and
2542-
/// returns the differences in the corresponding bytes in the destination.
2550+
/// Subtracts, with saturation, corresponding 16-bit signed integer values in
2551+
/// the input and returns the differences in the corresponding bytes in the
2552+
/// destination.
2553+
///
25432554
/// Differences greater than 0x7FFF are saturated to 0x7FFF, and values less
25442555
/// than 0x8000 are saturated to 0x8000.
25452556
///
@@ -2558,9 +2569,11 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_subs_epi16(__m128i __a,
25582569
return (__m128i)__builtin_elementwise_sub_sat((__v8hi)__a, (__v8hi)__b);
25592570
}
25602571

2561-
/// Subtracts corresponding 8-bit unsigned integer values in the input
2562-
/// and returns the differences in the corresponding bytes in the
2563-
/// destination. Differences less than 0x00 are saturated to 0x00.
2572+
/// Subtracts, with saturation, corresponding 8-bit unsigned integer values in
2573+
/// the input and returns the differences in the corresponding bytes in the
2574+
/// destination.
2575+
///
2576+
/// Differences less than 0x00 are saturated to 0x00.
25642577
///
25652578
/// \headerfile <x86intrin.h>
25662579
///
@@ -2577,9 +2590,11 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_subs_epu8(__m128i __a,
25772590
return (__m128i)__builtin_elementwise_sub_sat((__v16qu)__a, (__v16qu)__b);
25782591
}
25792592

2580-
/// Subtracts corresponding 16-bit unsigned integer values in the input
2581-
/// and returns the differences in the corresponding bytes in the
2582-
/// destination. Differences less than 0x0000 are saturated to 0x0000.
2593+
/// Subtracts, with saturation, corresponding 16-bit unsigned integer values in
2594+
/// the input and returns the differences in the corresponding bytes in the
2595+
/// destination.
2596+
///
2597+
/// Differences less than 0x0000 are saturated to 0x0000.
25832598
///
25842599
/// \headerfile <x86intrin.h>
25852600
///
@@ -4050,80 +4065,68 @@ void _mm_mfence(void);
40504065
} // extern "C"
40514066
#endif
40524067

4053-
/// Converts 16-bit signed integers from both 128-bit integer vector
4054-
/// operands into 8-bit signed integers, and packs the results into the
4055-
/// destination. Positive values greater than 0x7F are saturated to 0x7F.
4056-
/// Negative values less than 0x80 are saturated to 0x80.
4068+
/// Converts, with saturation, 16-bit signed integers from both 128-bit integer
4069+
/// vector operands into 8-bit signed integers, and packs the results into
4070+
/// the destination.
4071+
///
4072+
/// Positive values greater than 0x7F are saturated to 0x7F. Negative values
4073+
/// less than 0x80 are saturated to 0x80.
40574074
///
40584075
/// \headerfile <x86intrin.h>
40594076
///
40604077
/// This intrinsic corresponds to the <c> VPACKSSWB / PACKSSWB </c> instruction.
40614078
///
40624079
/// \param __a
4063-
/// A 128-bit integer vector of [8 x i16]. Each 16-bit element is treated as
4064-
/// a signed integer and is converted to a 8-bit signed integer with
4065-
/// saturation. Values greater than 0x7F are saturated to 0x7F. Values less
4066-
/// than 0x80 are saturated to 0x80. The converted [8 x i8] values are
4080+
/// A 128-bit integer vector of [8 x i16]. The converted [8 x i8] values are
40674081
/// written to the lower 64 bits of the result.
40684082
/// \param __b
4069-
/// A 128-bit integer vector of [8 x i16]. Each 16-bit element is treated as
4070-
/// a signed integer and is converted to a 8-bit signed integer with
4071-
/// saturation. Values greater than 0x7F are saturated to 0x7F. Values less
4072-
/// than 0x80 are saturated to 0x80. The converted [8 x i8] values are
4083+
/// A 128-bit integer vector of [8 x i16]. The converted [8 x i8] values are
40734084
/// written to the higher 64 bits of the result.
40744085
/// \returns A 128-bit vector of [16 x i8] containing the converted values.
40754086
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_packs_epi16(__m128i __a,
40764087
__m128i __b) {
40774088
return (__m128i)__builtin_ia32_packsswb128((__v8hi)__a, (__v8hi)__b);
40784089
}
40794090

4080-
/// Converts 32-bit signed integers from both 128-bit integer vector
4081-
/// operands into 16-bit signed integers, and packs the results into the
4082-
/// destination. Positive values greater than 0x7FFF are saturated to 0x7FFF.
4083-
/// Negative values less than 0x8000 are saturated to 0x8000.
4091+
/// Converts, with saturation, 32-bit signed integers from both 128-bit integer
4092+
/// vector operands into 16-bit signed integers, and packs the results into
4093+
/// the destination.
4094+
///
4095+
/// Positive values greater than 0x7FFF are saturated to 0x7FFF. Negative
4096+
/// values less than 0x8000 are saturated to 0x8000.
40844097
///
40854098
/// \headerfile <x86intrin.h>
40864099
///
40874100
/// This intrinsic corresponds to the <c> VPACKSSDW / PACKSSDW </c> instruction.
40884101
///
40894102
/// \param __a
4090-
/// A 128-bit integer vector of [4 x i32]. Each 32-bit element is treated as
4091-
/// a signed integer and is converted to a 16-bit signed integer with
4092-
/// saturation. Values greater than 0x7FFF are saturated to 0x7FFF. Values
4093-
/// less than 0x8000 are saturated to 0x8000. The converted [4 x i16] values
4103+
/// A 128-bit integer vector of [4 x i32]. The converted [4 x i16] values
40944104
/// are written to the lower 64 bits of the result.
40954105
/// \param __b
4096-
/// A 128-bit integer vector of [4 x i32]. Each 32-bit element is treated as
4097-
/// a signed integer and is converted to a 16-bit signed integer with
4098-
/// saturation. Values greater than 0x7FFF are saturated to 0x7FFF. Values
4099-
/// less than 0x8000 are saturated to 0x8000. The converted [4 x i16] values
4106+
/// A 128-bit integer vector of [4 x i32]. The converted [4 x i16] values
41004107
/// are written to the higher 64 bits of the result.
41014108
/// \returns A 128-bit vector of [8 x i16] containing the converted values.
41024109
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_packs_epi32(__m128i __a,
41034110
__m128i __b) {
41044111
return (__m128i)__builtin_ia32_packssdw128((__v4si)__a, (__v4si)__b);
41054112
}
41064113

4107-
/// Converts 16-bit signed integers from both 128-bit integer vector
4108-
/// operands into 8-bit unsigned integers, and packs the results into the
4109-
/// destination. Values greater than 0xFF are saturated to 0xFF. Values less
4110-
/// than 0x00 are saturated to 0x00.
4114+
/// Converts, with saturation, 16-bit signed integers from both 128-bit integer
4115+
/// vector operands into 8-bit unsigned integers, and packs the results into
4116+
/// the destination.
4117+
///
4118+
/// Values greater than 0xFF are saturated to 0xFF. Values less than 0x00
4119+
/// are saturated to 0x00.
41114120
///
41124121
/// \headerfile <x86intrin.h>
41134122
///
41144123
/// This intrinsic corresponds to the <c> VPACKUSWB / PACKUSWB </c> instruction.
41154124
///
41164125
/// \param __a
4117-
/// A 128-bit integer vector of [8 x i16]. Each 16-bit element is treated as
4118-
/// a signed integer and is converted to an 8-bit unsigned integer with
4119-
/// saturation. Values greater than 0xFF are saturated to 0xFF. Values less
4120-
/// than 0x00 are saturated to 0x00. The converted [8 x i8] values are
4126+
/// A 128-bit integer vector of [8 x i16]. The converted [8 x i8] values are
41214127
/// written to the lower 64 bits of the result.
41224128
/// \param __b
4123-
/// A 128-bit integer vector of [8 x i16]. Each 16-bit element is treated as
4124-
/// a signed integer and is converted to an 8-bit unsigned integer with
4125-
/// saturation. Values greater than 0xFF are saturated to 0xFF. Values less
4126-
/// than 0x00 are saturated to 0x00. The converted [8 x i8] values are
4129+
/// A 128-bit integer vector of [8 x i16]. The converted [8 x i8] values are
41274130
/// written to the higher 64 bits of the result.
41284131
/// \returns A 128-bit vector of [16 x i8] containing the converted values.
41294132
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_packus_epi16(__m128i __a,

clang/lib/Headers/fmaintrin.h

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ _mm_fmadd_pd(__m128d __A, __m128d __B, __m128d __C)
6060

6161
/// Computes a scalar multiply-add of the single-precision values in the
6262
/// low 32 bits of 128-bit vectors of [4 x float].
63-
/// \code
63+
///
64+
/// \code{.operation}
6465
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
6566
/// result[127:32] = __A[127:32]
6667
/// \endcode
@@ -88,7 +89,8 @@ _mm_fmadd_ss(__m128 __A, __m128 __B, __m128 __C)
8889

8990
/// Computes a scalar multiply-add of the double-precision values in the
9091
/// low 64 bits of 128-bit vectors of [2 x double].
91-
/// \code
92+
///
93+
/// \code{.operation}
9294
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
9395
/// result[127:64] = __A[127:64]
9496
/// \endcode
@@ -156,7 +158,8 @@ _mm_fmsub_pd(__m128d __A, __m128d __B, __m128d __C)
156158

157159
/// Computes a scalar multiply-subtract of the single-precision values in
158160
/// the low 32 bits of 128-bit vectors of [4 x float].
159-
/// \code
161+
///
162+
/// \code{.operation}
160163
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
161164
/// result[127:32] = __A[127:32]
162165
/// \endcode
@@ -184,7 +187,8 @@ _mm_fmsub_ss(__m128 __A, __m128 __B, __m128 __C)
184187

185188
/// Computes a scalar multiply-subtract of the double-precision values in
186189
/// the low 64 bits of 128-bit vectors of [2 x double].
187-
/// \code
190+
///
191+
/// \code{.operation}
188192
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
189193
/// result[127:64] = __A[127:64]
190194
/// \endcode
@@ -252,7 +256,8 @@ _mm_fnmadd_pd(__m128d __A, __m128d __B, __m128d __C)
252256

253257
/// Computes a scalar negated multiply-add of the single-precision values in
254258
/// the low 32 bits of 128-bit vectors of [4 x float].
255-
/// \code
259+
///
260+
/// \code{.operation}
256261
/// result[31:0] = -(__A[31:0] * __B[31:0]) + __C[31:0]
257262
/// result[127:32] = __A[127:32]
258263
/// \endcode
@@ -280,7 +285,8 @@ _mm_fnmadd_ss(__m128 __A, __m128 __B, __m128 __C)
280285

281286
/// Computes a scalar negated multiply-add of the double-precision values
282287
/// in the low 64 bits of 128-bit vectors of [2 x double].
283-
/// \code
288+
///
289+
/// \code{.operation}
284290
/// result[63:0] = -(__A[63:0] * __B[63:0]) + __C[63:0]
285291
/// result[127:64] = __A[127:64]
286292
/// \endcode
@@ -348,7 +354,8 @@ _mm_fnmsub_pd(__m128d __A, __m128d __B, __m128d __C)
348354

349355
/// Computes a scalar negated multiply-subtract of the single-precision
350356
/// values in the low 32 bits of 128-bit vectors of [4 x float].
351-
/// \code
357+
///
358+
/// \code{.operation}
352359
/// result[31:0] = -(__A[31:0] * __B[31:0]) - __C[31:0]
353360
/// result[127:32] = __A[127:32]
354361
/// \endcode
@@ -376,7 +383,8 @@ _mm_fnmsub_ss(__m128 __A, __m128 __B, __m128 __C)
376383

377384
/// Computes a scalar negated multiply-subtract of the double-precision
378385
/// values in the low 64 bits of 128-bit vectors of [2 x double].
379-
/// \code
386+
///
387+
/// \code{.operation}
380388
/// result[63:0] = -(__A[63:0] * __B[63:0]) - __C[63:0]
381389
/// result[127:64] = __A[127:64]
382390
/// \endcode
@@ -404,7 +412,8 @@ _mm_fnmsub_sd(__m128d __A, __m128d __B, __m128d __C)
404412

405413
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
406414
/// [4 x float].
407-
/// \code
415+
///
416+
/// \code{.operation}
408417
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
409418
/// result[63:32] = (__A[63:32] * __B[63:32]) + __C[63:32]
410419
/// result[95:64] = (__A[95:64] * __B[95:64]) - __C[95:64]
@@ -430,7 +439,8 @@ _mm_fmaddsub_ps(__m128 __A, __m128 __B, __m128 __C)
430439

431440
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
432441
/// [2 x double].
433-
/// \code
442+
///
443+
/// \code{.operation}
434444
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
435445
/// result[127:64] = (__A[127:64] * __B[127:64]) + __C[127:64]
436446
/// \endcode
@@ -454,7 +464,8 @@ _mm_fmaddsub_pd(__m128d __A, __m128d __B, __m128d __C)
454464

455465
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
456466
/// [4 x float].
457-
/// \code
467+
///
468+
/// \code{.operation}
458469
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
459470
/// result[63:32] = (__A[63:32] * __B[63:32]) - __C[63:32]
460471
/// result[95:64] = (__A[95:64] * __B[95:64]) + __C[95:64]
@@ -480,7 +491,8 @@ _mm_fmsubadd_ps(__m128 __A, __m128 __B, __m128 __C)
480491

481492
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
482493
/// [2 x double].
483-
/// \code
494+
///
495+
/// \code{.operation}
484496
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
485497
/// result[127:64] = (__A[127:64] * __B[127:64]) - __C[127:64]
486498
/// \endcode
@@ -664,7 +676,8 @@ _mm256_fnmsub_pd(__m256d __A, __m256d __B, __m256d __C)
664676

665677
/// Computes a multiply with alternating add/subtract of 256-bit vectors of
666678
/// [8 x float].
667-
/// \code
679+
///
680+
/// \code{.operation}
668681
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
669682
/// result[63:32] = (__A[63:32] * __B[63:32]) + __C[63:32]
670683
/// result[95:64] = (__A[95:64] * __B[95:64]) - __C[95:64]
@@ -694,7 +707,8 @@ _mm256_fmaddsub_ps(__m256 __A, __m256 __B, __m256 __C)
694707

695708
/// Computes a multiply with alternating add/subtract of 256-bit vectors of
696709
/// [4 x double].
697-
/// \code
710+
///
711+
/// \code{.operation}
698712
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
699713
/// result[127:64] = (__A[127:64] * __B[127:64]) + __C[127:64]
700714
/// result[191:128] = (__A[191:128] * __B[191:128]) - __C[191:128]
@@ -720,7 +734,8 @@ _mm256_fmaddsub_pd(__m256d __A, __m256d __B, __m256d __C)
720734

721735
/// Computes a vector multiply with alternating add/subtract of 256-bit
722736
/// vectors of [8 x float].
723-
/// \code
737+
///
738+
/// \code{.operation}
724739
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
725740
/// result[63:32] = (__A[63:32] * __B[63:32]) - __C[63:32]
726741
/// result[95:64] = (__A[95:64] * __B[95:64]) + __C[95:64]
@@ -750,7 +765,8 @@ _mm256_fmsubadd_ps(__m256 __A, __m256 __B, __m256 __C)
750765

751766
/// Computes a vector multiply with alternating add/subtract of 256-bit
752767
/// vectors of [4 x double].
753-
/// \code
768+
///
769+
/// \code{.operation}
754770
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
755771
/// result[127:64] = (__A[127:64] * __B[127:64]) - __C[127:64]
756772
/// result[191:128] = (__A[191:128] * __B[191:128]) + __C[191:128]

0 commit comments

Comments
 (0)