Skip to content

Commit 1da7f41

Browse files
authored
[Headers][X86] Editorial fixes to ia32intrin.h descriptions (llvm#80490)
Use indicative not imperative; fix missing capitalization; spell out some abbreviations; "time-stamp" not "time stamp"; and similar.
1 parent 76eb8e3 commit 1da7f41

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

clang/lib/Headers/ia32intrin.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS
2727
#endif
2828

29-
/// Find the first set bit starting from the lsb. Result is undefined if
30-
/// input is 0.
29+
/// Finds the first set bit starting from the least significant bit. The result
30+
/// is undefined if the input is 0.
3131
///
3232
/// \headerfile <x86intrin.h>
3333
///
@@ -43,8 +43,8 @@ __bsfd(int __A) {
4343
return __builtin_ctz((unsigned int)__A);
4444
}
4545

46-
/// Find the first set bit starting from the msb. Result is undefined if
47-
/// input is 0.
46+
/// Finds the first set bit starting from the most significant bit. The result
47+
/// is undefined if the input is 0.
4848
///
4949
/// \headerfile <x86intrin.h>
5050
///
@@ -90,8 +90,8 @@ _bswap(int __A) {
9090
return (int)__builtin_bswap32((unsigned int)__A);
9191
}
9292

93-
/// Find the first set bit starting from the lsb. Result is undefined if
94-
/// input is 0.
93+
/// Finds the first set bit starting from the least significant bit. The result
94+
/// is undefined if the input is 0.
9595
///
9696
/// \headerfile <x86intrin.h>
9797
///
@@ -108,8 +108,8 @@ _bswap(int __A) {
108108
/// \see __bsfd
109109
#define _bit_scan_forward(A) __bsfd((A))
110110

111-
/// Find the first set bit starting from the msb. Result is undefined if
112-
/// input is 0.
111+
/// Finds the first set bit starting from the most significant bit. The result
112+
/// is undefined if the input is 0.
113113
///
114114
/// \headerfile <x86intrin.h>
115115
///
@@ -127,8 +127,8 @@ _bswap(int __A) {
127127
#define _bit_scan_reverse(A) __bsrd((A))
128128

129129
#ifdef __x86_64__
130-
/// Find the first set bit starting from the lsb. Result is undefined if
131-
/// input is 0.
130+
/// Finds the first set bit starting from the least significant bit. The result
131+
/// is undefined if the input is 0.
132132
///
133133
/// \headerfile <x86intrin.h>
134134
///
@@ -143,8 +143,8 @@ __bsfq(long long __A) {
143143
return (long long)__builtin_ctzll((unsigned long long)__A);
144144
}
145145

146-
/// Find the first set bit starting from the msb. Result is undefined if
147-
/// input is 0.
146+
/// Finds the first set bit starting from the most significant bit. The result
147+
/// is undefined if input is 0.
148148
///
149149
/// \headerfile <x86intrin.h>
150150
///
@@ -159,7 +159,7 @@ __bsrq(long long __A) {
159159
return 63 - __builtin_clzll((unsigned long long)__A);
160160
}
161161

162-
/// Swaps the bytes in the input. Converting little endian to big endian or
162+
/// Swaps the bytes in the input, converting little endian to big endian or
163163
/// vice versa.
164164
///
165165
/// \headerfile <x86intrin.h>
@@ -175,7 +175,7 @@ __bswapq(long long __A) {
175175
return (long long)__builtin_bswap64((unsigned long long)__A);
176176
}
177177

178-
/// Swaps the bytes in the input. Converting little endian to big endian or
178+
/// Swaps the bytes in the input, converting little endian to big endian or
179179
/// vice versa.
180180
///
181181
/// \headerfile <x86intrin.h>
@@ -198,7 +198,7 @@ __bswapq(long long __A) {
198198
/// \headerfile <x86intrin.h>
199199
///
200200
/// This intrinsic corresponds to the \c POPCNT instruction or a
201-
/// a sequence of arithmetic and logic ops to calculate it.
201+
/// sequence of arithmetic and logic operations to calculate it.
202202
///
203203
/// \param __A
204204
/// An unsigned 32-bit integer operand.
@@ -220,7 +220,7 @@ __popcntd(unsigned int __A)
220220
/// \endcode
221221
///
222222
/// This intrinsic corresponds to the \c POPCNT instruction or a
223-
/// a sequence of arithmetic and logic ops to calculate it.
223+
/// sequence of arithmetic and logic operations to calculate it.
224224
///
225225
/// \param A
226226
/// An unsigned 32-bit integer operand.
@@ -235,7 +235,7 @@ __popcntd(unsigned int __A)
235235
/// \headerfile <x86intrin.h>
236236
///
237237
/// This intrinsic corresponds to the \c POPCNT instruction or a
238-
/// a sequence of arithmetic and logic ops to calculate it.
238+
/// sequence of arithmetic and logic operations to calculate it.
239239
///
240240
/// \param __A
241241
/// An unsigned 64-bit integer operand.
@@ -257,7 +257,7 @@ __popcntq(unsigned long long __A)
257257
/// \endcode
258258
///
259259
/// This intrinsic corresponds to the \c POPCNT instruction or a
260-
/// a sequence of arithmetic and logic ops to calculate it.
260+
/// sequence of arithmetic and logic operations to calculate it.
261261
///
262262
/// \param A
263263
/// An unsigned 64-bit integer operand.
@@ -268,7 +268,7 @@ __popcntq(unsigned long long __A)
268268
#endif /* __x86_64__ */
269269

270270
#ifdef __x86_64__
271-
/// Returns the program status and control \c RFLAGS register with the \c VM
271+
/// Returns the program status-and-control \c RFLAGS register with the \c VM
272272
/// and \c RF flags cleared.
273273
///
274274
/// \headerfile <x86intrin.h>
@@ -282,7 +282,7 @@ __readeflags(void)
282282
return __builtin_ia32_readeflags_u64();
283283
}
284284

285-
/// Writes the specified value to the program status and control \c RFLAGS
285+
/// Writes the specified value to the program status-and-control \c RFLAGS
286286
/// register. Reserved bits are not affected.
287287
///
288288
/// \headerfile <x86intrin.h>
@@ -298,7 +298,7 @@ __writeeflags(unsigned long long __f)
298298
}
299299

300300
#else /* !__x86_64__ */
301-
/// Returns the program status and control \c EFLAGS register with the \c VM
301+
/// Returns the program status-and-control \c EFLAGS register with the \c VM
302302
/// and \c RF flags cleared.
303303
///
304304
/// \headerfile <x86intrin.h>
@@ -312,7 +312,7 @@ __readeflags(void)
312312
return __builtin_ia32_readeflags_u32();
313313
}
314314

315-
/// Writes the specified value to the program status and control \c EFLAGS
315+
/// Writes the specified value to the program status-and-control \c EFLAGS
316316
/// register. Reserved bits are not affected.
317317
///
318318
/// \headerfile <x86intrin.h>
@@ -328,7 +328,7 @@ __writeeflags(unsigned int __f)
328328
}
329329
#endif /* !__x86_64__ */
330330

331-
/// Cast a 32-bit float value to a 32-bit unsigned integer value.
331+
/// Casts a 32-bit float value to a 32-bit unsigned integer value.
332332
///
333333
/// \headerfile <x86intrin.h>
334334
///
@@ -337,13 +337,13 @@ __writeeflags(unsigned int __f)
337337
///
338338
/// \param __A
339339
/// A 32-bit float value.
340-
/// \returns a 32-bit unsigned integer containing the converted value.
340+
/// \returns A 32-bit unsigned integer containing the converted value.
341341
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CAST
342342
_castf32_u32(float __A) {
343343
return __builtin_bit_cast(unsigned int, __A);
344344
}
345345

346-
/// Cast a 64-bit float value to a 64-bit unsigned integer value.
346+
/// Casts a 64-bit float value to a 64-bit unsigned integer value.
347347
///
348348
/// \headerfile <x86intrin.h>
349349
///
@@ -352,13 +352,13 @@ _castf32_u32(float __A) {
352352
///
353353
/// \param __A
354354
/// A 64-bit float value.
355-
/// \returns a 64-bit unsigned integer containing the converted value.
355+
/// \returns A 64-bit unsigned integer containing the converted value.
356356
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CAST
357357
_castf64_u64(double __A) {
358358
return __builtin_bit_cast(unsigned long long, __A);
359359
}
360360

361-
/// Cast a 32-bit unsigned integer value to a 32-bit float value.
361+
/// Casts a 32-bit unsigned integer value to a 32-bit float value.
362362
///
363363
/// \headerfile <x86intrin.h>
364364
///
@@ -367,13 +367,13 @@ _castf64_u64(double __A) {
367367
///
368368
/// \param __A
369369
/// A 32-bit unsigned integer value.
370-
/// \returns a 32-bit float value containing the converted value.
370+
/// \returns A 32-bit float value containing the converted value.
371371
static __inline__ float __DEFAULT_FN_ATTRS_CAST
372372
_castu32_f32(unsigned int __A) {
373373
return __builtin_bit_cast(float, __A);
374374
}
375375

376-
/// Cast a 64-bit unsigned integer value to a 64-bit float value.
376+
/// Casts a 64-bit unsigned integer value to a 64-bit float value.
377377
///
378378
/// \headerfile <x86intrin.h>
379379
///
@@ -382,7 +382,7 @@ _castu32_f32(unsigned int __A) {
382382
///
383383
/// \param __A
384384
/// A 64-bit unsigned integer value.
385-
/// \returns a 64-bit float value containing the converted value.
385+
/// \returns A 64-bit float value containing the converted value.
386386
static __inline__ double __DEFAULT_FN_ATTRS_CAST
387387
_castu64_f64(unsigned long long __A) {
388388
return __builtin_bit_cast(double, __A);
@@ -470,7 +470,7 @@ __crc32q(unsigned long long __C, unsigned long long __D)
470470
}
471471
#endif /* __x86_64__ */
472472

473-
/// Reads the specified performance monitoring counter. Refer to your
473+
/// Reads the specified performance-monitoring counter. Refer to your
474474
/// processor's documentation to determine which performance counters are
475475
/// supported.
476476
///
@@ -487,22 +487,22 @@ __rdpmc(int __A) {
487487
return __builtin_ia32_rdpmc(__A);
488488
}
489489

490-
/// Reads the processor's time stamp counter and the \c IA32_TSC_AUX MSR
490+
/// Reads the processor's time-stamp counter and the \c IA32_TSC_AUX MSR
491491
/// \c (0xc0000103).
492492
///
493493
/// \headerfile <x86intrin.h>
494494
///
495495
/// This intrinsic corresponds to the \c RDTSCP instruction.
496496
///
497497
/// \param __A
498-
/// Address of where to store the 32-bit \c IA32_TSC_AUX value.
499-
/// \returns The 64-bit value of the time stamp counter.
498+
/// The address of where to store the 32-bit \c IA32_TSC_AUX value.
499+
/// \returns The 64-bit value of the time-stamp counter.
500500
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
501501
__rdtscp(unsigned int *__A) {
502502
return __builtin_ia32_rdtscp(__A);
503503
}
504504

505-
/// Reads the processor's time stamp counter.
505+
/// Reads the processor's time-stamp counter.
506506
///
507507
/// \headerfile <x86intrin.h>
508508
///
@@ -512,7 +512,7 @@ __rdtscp(unsigned int *__A) {
512512
///
513513
/// This intrinsic corresponds to the \c RDTSC instruction.
514514
///
515-
/// \returns The 64-bit value of the time stamp counter.
515+
/// \returns The 64-bit value of the time-stamp counter.
516516
#define _rdtsc() __rdtsc()
517517

518518
/// Reads the specified performance monitoring counter. Refer to your

0 commit comments

Comments
 (0)