aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2025-05-05 10:16:14 +0800
committerKito Cheng <kito.cheng@sifive.com>2025-05-05 10:24:18 +0800
commitd3651f07bbf56837f019e366b75d01f197dab2f1 (patch)
tree9fcb8e6be9e899f8941605c0b298afc002321e63 /gcc
parentc4d0f4c499c400f9f12068c721fbeac501223743 (diff)
downloadgcc-d3651f07bbf56837f019e366b75d01f197dab2f1.zip
gcc-d3651f07bbf56837f019e366b75d01f197dab2f1.tar.gz
gcc-d3651f07bbf56837f019e366b75d01f197dab2f1.tar.bz2
RISC-V: Apply clang-format to genrvv-type-indexer.cc [NFC]
Tweak the formatting of the genrvv-type-indexer.cc file to conform to the style used by clang-format. This is a no-functional-change commit that only modifies the formatting of the code. gcc/Changelog: * config/riscv/genrvv-type-indexer.cc: Apply clang-format to the file.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/riscv/genrvv-type-indexer.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/config/riscv/genrvv-type-indexer.cc b/gcc/config/riscv/genrvv-type-indexer.cc
index 2fd429a..f296089 100644
--- a/gcc/config/riscv/genrvv-type-indexer.cc
+++ b/gcc/config/riscv/genrvv-type-indexer.cc
@@ -23,8 +23,14 @@ along with GCC; see the file COPYING3. If not see
#include <assert.h>
#include <math.h>
-#define BOOL_SIZE_LIST {1, 2, 4, 8, 16, 32, 64}
-#define EEW_SIZE_LIST {8, 16, 32, 64}
+#define BOOL_SIZE_LIST \
+ { \
+ 1, 2, 4, 8, 16, 32, 64 \
+ }
+#define EEW_SIZE_LIST \
+ { \
+ 8, 16, 32, 64 \
+ }
#define LMUL1_LOG2 0
std::string
@@ -167,7 +173,7 @@ floattype (unsigned sew, int lmul_log2)
std::string
expand_floattype (unsigned sew, int lmul_log2, unsigned nf)
{
- if (sew != 8 || nf!= 1
+ if (sew != 8 || nf != 1
|| (!valid_type (sew * 4, lmul_log2 + 2, /*float_t*/ true)))
return "INVALID";
@@ -297,13 +303,13 @@ main (int argc, const char **argv)
for (unsigned eew : EEW_SIZE_LIST)
fprintf (fp, " /*SIGNED_EEW%d_LMUL1_INTERPRET*/ %s,\n", eew,
- inttype (eew, LMUL1_LOG2, /* unsigned_p */false).c_str ());
+ inttype (eew, LMUL1_LOG2, /* unsigned_p */ false).c_str ());
for (unsigned eew : EEW_SIZE_LIST)
fprintf (fp, " /*UNSIGNED_EEW%d_LMUL1_INTERPRET*/ %s,\n", eew,
- inttype (eew, LMUL1_LOG2, /* unsigned_p */true).c_str ());
+ inttype (eew, LMUL1_LOG2, /* unsigned_p */ true).c_str ());
- fprintf (fp, " /*X2*/ INVALID,\n");
+ fprintf (fp, " /*X2*/ INVALID,\n");
for (unsigned lmul_log2_offset : {1, 2, 3, 4, 5, 6})
{
@@ -428,8 +434,9 @@ main (int argc, const char **argv)
fprintf (fp, " /*UNSIGNED_EEW%d_LMUL1_INTERPRET*/ INVALID,\n",
eew);
- fprintf (fp, " /*X2*/ %s,\n",
- inttype (sew * 2, lmul_log2 + 1, /*unsigned_p*/ true).c_str ());
+ fprintf (
+ fp, " /*X2*/ %s,\n",
+ inttype (sew * 2, lmul_log2 + 1, /*unsigned_p*/ true).c_str ());
for (unsigned lmul_log2_offset : {1, 2, 3, 4, 5, 6})
{