diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-11-29 15:07:59 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-11-30 18:13:42 +0000 |
commit | 65a4b373267813ae5e47ac519da2e70d9c7e09d3 (patch) | |
tree | f7ef8cba13b81bdc1608001572fd1c7eb6024c05 /gdb/riscv-tdep.c | |
parent | 0ff80bf7b9901b5e3c6805b99d30fd555f512d69 (diff) | |
download | gdb-65a4b373267813ae5e47ac519da2e70d9c7e09d3.zip gdb-65a4b373267813ae5e47ac519da2e70d9c7e09d3.tar.gz gdb-65a4b373267813ae5e47ac519da2e70d9c7e09d3.tar.bz2 |
gdb/riscv: Add equality operators to riscv_gdb_features
Add '==' and '!=' operators for the struct riscv_gdb_features,
allowing a small simplification.
gdb/ChangeLog:
* arch/riscv.h (riscv_gdb_features::operator==): New.
(riscv_gdb_features::operator!=): New.
* riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
operator.
Diffstat (limited to 'gdb/riscv-tdep.c')
-rw-r--r-- | gdb/riscv-tdep.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index d66fe5c..30c777d 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -3025,9 +3025,7 @@ riscv_gdbarch_init (struct gdbarch_info info, gdbarch. */ struct gdbarch_tdep *other_tdep = gdbarch_tdep (arches->gdbarch); - if (other_tdep->features.hw_float_abi != features.hw_float_abi - || other_tdep->features.xlen != features.xlen - || other_tdep->features.flen != features.flen) + if (other_tdep->features != features) continue; break; |