Skip to content

Commit 0ba22f5

Browse files
committed
[builtins] Use single line C++/C99 comment style
Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 llvm-svn: 359411
1 parent 082b89b commit 0ba22f5

File tree

240 files changed

+3489
-3869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+3489
-3869
lines changed

compiler-rt/lib/builtins/absvdi2.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
/*===-- absvdi2.c - Implement __absvdi2 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
*===----------------------------------------------------------------------===
8-
*
9-
* This file implements __absvdi2 for the compiler_rt library.
10-
*
11-
*===----------------------------------------------------------------------===
12-
*/
1+
//===-- absvdi2.c - Implement __absvdi2 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __absvdi2 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

16-
/* Returns: absolute value */
15+
// Returns: absolute value
1716

18-
/* Effects: aborts if abs(x) < 0 */
17+
// Effects: aborts if abs(x) < 0
1918

2019
COMPILER_RT_ABI di_int __absvdi2(di_int a) {
2120
const int N = (int)(sizeof(di_int) * CHAR_BIT);

compiler-rt/lib/builtins/absvsi2.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
/* ===-- absvsi2.c - Implement __absvsi2 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*
9-
* This file implements __absvsi2 for the compiler_rt library.
10-
*
11-
* ===----------------------------------------------------------------------===
12-
*/
1+
//===-- absvsi2.c - Implement __absvsi2 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __absvsi2 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

16-
/* Returns: absolute value */
15+
// Returns: absolute value
1716

18-
/* Effects: aborts if abs(x) < 0 */
17+
// Effects: aborts if abs(x) < 0
1918

2019
COMPILER_RT_ABI si_int __absvsi2(si_int a) {
2120
const int N = (int)(sizeof(si_int) * CHAR_BIT);

compiler-rt/lib/builtins/absvti2.c

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
/* ===-- absvti2.c - Implement __absvdi2 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*
9-
* This file implements __absvti2 for the compiler_rt library.
10-
*
11-
* ===----------------------------------------------------------------------===
12-
*/
1+
//===-- absvti2.c - Implement __absvdi2 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __absvti2 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

1615
#ifdef CRT_HAS_128BIT
1716

18-
/* Returns: absolute value */
17+
// Returns: absolute value
1918

20-
/* Effects: aborts if abs(x) < 0 */
19+
// Effects: aborts if abs(x) < 0
2120

2221
COMPILER_RT_ABI ti_int __absvti2(ti_int a) {
2322
const int N = (int)(sizeof(ti_int) * CHAR_BIT);
@@ -27,4 +26,4 @@ COMPILER_RT_ABI ti_int __absvti2(ti_int a) {
2726
return (a ^ s) - s;
2827
}
2928

30-
#endif /* CRT_HAS_128BIT */
29+
#endif // CRT_HAS_128BIT

compiler-rt/lib/builtins/addvdi3.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
/* ===-- addvdi3.c - Implement __addvdi3 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*
9-
* This file implements __addvdi3 for the compiler_rt library.
10-
*
11-
* ===----------------------------------------------------------------------===
12-
*/
1+
//===-- addvdi3.c - Implement __addvdi3 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __addvdi3 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

16-
/* Returns: a + b */
15+
// Returns: a + b
1716

18-
/* Effects: aborts if a + b overflows */
17+
// Effects: aborts if a + b overflows
1918

2019
COMPILER_RT_ABI di_int __addvdi3(di_int a, di_int b) {
2120
di_int s = (du_int)a + (du_int)b;

compiler-rt/lib/builtins/addvsi3.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
/* ===-- addvsi3.c - Implement __addvsi3 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*
9-
* This file implements __addvsi3 for the compiler_rt library.
10-
*
11-
* ===----------------------------------------------------------------------===
12-
*/
1+
//===-- addvsi3.c - Implement __addvsi3 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __addvsi3 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

16-
/* Returns: a + b */
15+
// Returns: a + b
1716

18-
/* Effects: aborts if a + b overflows */
17+
// Effects: aborts if a + b overflows
1918

2019
COMPILER_RT_ABI si_int __addvsi3(si_int a, si_int b) {
2120
si_int s = (su_int)a + (su_int)b;

compiler-rt/lib/builtins/addvti3.c

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
/* ===-- addvti3.c - Implement __addvti3 -----------------------------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*
9-
* This file implements __addvti3 for the compiler_rt library.
10-
*
11-
* ===----------------------------------------------------------------------===
12-
*/
1+
//===-- addvti3.c - Implement __addvti3 -----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements __addvti3 for the compiler_rt library.
10+
//
11+
//===----------------------------------------------------------------------===//
1312

1413
#include "int_lib.h"
1514

1615
#ifdef CRT_HAS_128BIT
1716

18-
/* Returns: a + b */
17+
// Returns: a + b
1918

20-
/* Effects: aborts if a + b overflows */
19+
// Effects: aborts if a + b overflows
2120

2221
COMPILER_RT_ABI ti_int __addvti3(ti_int a, ti_int b) {
2322
ti_int s = (tu_int)a + (tu_int)b;
@@ -31,4 +30,4 @@ COMPILER_RT_ABI ti_int __addvti3(ti_int a, ti_int b) {
3130
return s;
3231
}
3332

34-
#endif /* CRT_HAS_128BIT */
33+
#endif // CRT_HAS_128BIT

compiler-rt/lib/builtins/apple_versioning.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/* ===-- apple_versioning.c - Adds versioning symbols for ld ---------------===
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
* ===----------------------------------------------------------------------===
8-
*/
1+
//===-- apple_versioning.c - Adds versioning symbols for ld ---------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
98

109
#if __APPLE__
1110
#include <Availability.h>
@@ -36,9 +35,8 @@
3635
__attribute__((visibility("default"))) const char sym##_tmp6 = 0;
3736
#endif
3837

39-
/* Symbols in libSystem.dylib in 10.6 and later,
40-
* but are in libgcc_s.dylib in earlier versions
41-
*/
38+
// Symbols in libSystem.dylib in 10.6 and later,
39+
// but are in libgcc_s.dylib in earlier versions
4240

4341
NOT_HERE_BEFORE_10_6(__absvdi2)
4442
NOT_HERE_BEFORE_10_6(__absvsi2)
@@ -146,7 +144,7 @@ NOT_HERE_BEFORE_10_6(__gcc_qdiv)
146144
NOT_HERE_BEFORE_10_6(__gcc_qmul)
147145
NOT_HERE_BEFORE_10_6(__gcc_qsub)
148146
NOT_HERE_BEFORE_10_6(__trampoline_setup)
149-
#endif /* __ppc__ */
147+
#endif // __ppc__
150148

151149
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange)
152150
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_1)
@@ -334,8 +332,8 @@ NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4)
334332
NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4)
335333
#endif // __arm__ && __DYNAMIC__
336334

337-
#else /* !__APPLE__ */
335+
#else // !__APPLE__
338336

339337
extern int avoid_empty_file;
340338

341-
#endif /* !__APPLE__*/
339+
#endif // !__APPLE__

compiler-rt/lib/builtins/arm/adddf3vfp.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88

99
#include "../assembly.h"
1010

11-
//
1211
// double __adddf3vfp(double a, double b) { return a + b; }
1312
//
1413
// Adds two double precision floating point numbers using the Darwin
1514
// calling convention where double arguments are passsed in GPR pairs
16-
//
15+
1716
.syntax unified
1817
.p2align 2
1918
DEFINE_COMPILERRT_FUNCTION(__adddf3vfp)
@@ -22,7 +21,7 @@ DEFINE_COMPILERRT_FUNCTION(__adddf3vfp)
2221
#else
2322
vmov d6, r0, r1 // move first param from r0/r1 pair into d6
2423
vmov d7, r2, r3 // move second param from r2/r3 pair into d7
25-
vadd.f64 d6, d6, d7
24+
vadd.f64 d6, d6, d7
2625
vmov r0, r1, d6 // move result back to r0/r1 pair
2726
#endif
2827
bx lr

compiler-rt/lib/builtins/arm/addsf3.S

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
/*===-- addsf3.S - Adds two single precision floating pointer numbers-----===//
2-
*
3-
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4-
* See https://llvm.org/LICENSE.txt for license information.
5-
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*
7-
*===----------------------------------------------------------------------===//
8-
*
9-
* This file implements the __addsf3 (single precision floating pointer number
10-
* addition with the IEEE-754 default rounding (to nearest, ties to even)
11-
* function for the ARM Thumb1 ISA.
12-
*
13-
*===----------------------------------------------------------------------===*/
1+
//===-- addsf3.S - Adds two single precision floating pointer numbers-----===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file implements the __addsf3 (single precision floating pointer number
10+
// addition with the IEEE-754 default rounding (to nearest, ties to even)
11+
// function for the ARM Thumb1 ISA.
12+
//
13+
//===----------------------------------------------------------------------===//
1414

1515
#include "../assembly.h"
1616
#define significandBits 23
@@ -28,9 +28,9 @@ DEFINE_COMPILERRT_THUMB_FUNCTION(__addsf3)
2828
// Get the absolute value of a and b.
2929
lsls r2, r0, #1
3030
lsls r3, r1, #1
31-
lsrs r2, r2, #1 /* aAbs */
31+
lsrs r2, r2, #1 // aAbs
3232
beq LOCAL_LABEL(a_zero_nan_inf)
33-
lsrs r3, r3, #1 /* bAbs */
33+
lsrs r3, r3, #1 // bAbs
3434
beq LOCAL_LABEL(zero_nan_inf)
3535

3636
// Detect if a or b is infinity or Nan.
@@ -54,9 +54,9 @@ LOCAL_LABEL(no_swap):
5454

5555
// Get the significands and shift them to give us round, guard and sticky.
5656
lsls r4, r0, #(typeWidth - significandBits)
57-
lsrs r4, r4, #(typeWidth - significandBits - 3) /* aSignificand << 3 */
57+
lsrs r4, r4, #(typeWidth - significandBits - 3) // aSignificand << 3
5858
lsls r5, r1, #(typeWidth - significandBits)
59-
lsrs r5, r5, #(typeWidth - significandBits - 3) /* bSignificand << 3 */
59+
lsrs r5, r5, #(typeWidth - significandBits - 3) // bSignificand << 3
6060

6161
// Get the implicitBit.
6262
movs r6, #1
@@ -198,7 +198,7 @@ LOCAL_LABEL(do_substraction):
198198
beq 1f
199199
movs r7, #1
200200
1:
201-
lsrs r4, r6 /* aSignificand >> shift */
201+
lsrs r4, r6 // aSignificand >> shift
202202
orrs r4, r7
203203
b LOCAL_LABEL(form_result)
204204

0 commit comments

Comments
 (0)