aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch/riscv.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdb/arch/riscv.h
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/arch/riscv.h')
-rw-r--r--gdb/arch/riscv.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
index 54610ed..0e14cd9 100644
--- a/gdb/arch/riscv.h
+++ b/gdb/arch/riscv.h
@@ -67,9 +67,8 @@ struct riscv_gdbarch_features
/* Equality operator. */
bool operator== (const struct riscv_gdbarch_features &rhs) const
{
- return (xlen == rhs.xlen && flen == rhs.flen
- && embedded == rhs.embedded && vlen == rhs.vlen
- && has_fflags_reg == rhs.has_fflags_reg
+ return (xlen == rhs.xlen && flen == rhs.flen && embedded == rhs.embedded
+ && vlen == rhs.vlen && has_fflags_reg == rhs.has_fflags_reg
&& has_frm_reg == rhs.has_frm_reg
&& has_fcsr_reg == rhs.has_fcsr_reg);
}
@@ -83,13 +82,10 @@ struct riscv_gdbarch_features
/* Used by std::unordered_map to hash feature sets. */
std::size_t hash () const noexcept
{
- std::size_t val = ((embedded ? 1 : 0) << 10
- | (has_fflags_reg ? 1 : 0) << 11
- | (has_frm_reg ? 1 : 0) << 12
- | (has_fcsr_reg ? 1 : 0) << 13
- | (xlen & 0x1f) << 5
- | (flen & 0x1f) << 0
- | (vlen & 0xfff) << 14);
+ std::size_t val
+ = ((embedded ? 1 : 0) << 10 | (has_fflags_reg ? 1 : 0) << 11
+ | (has_frm_reg ? 1 : 0) << 12 | (has_fcsr_reg ? 1 : 0) << 13
+ | (xlen & 0x1f) << 5 | (flen & 0x1f) << 0 | (vlen & 0xfff) << 14);
return val;
}
};
@@ -100,8 +96,8 @@ struct riscv_gdbarch_features
This is only used directly from the gdbserver where the created target
description is modified after it is return. */
-target_desc_up riscv_create_target_description
- (const struct riscv_gdbarch_features features);
+target_desc_up
+riscv_create_target_description (const struct riscv_gdbarch_features features);
#else
@@ -112,10 +108,9 @@ target_desc_up riscv_create_target_description
GDBARCH_LIST_LOOKUP_BY_INFO performs a pointer comparison on target
descriptions to find candidate gdbarch objects. */
-const target_desc *riscv_lookup_target_description
- (const struct riscv_gdbarch_features features);
+const target_desc *
+riscv_lookup_target_description (const struct riscv_gdbarch_features features);
#endif /* GDBSERVER */
-
#endif /* ARCH_RISCV_H */