Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind PR toolchain/55837



details:   https://anonhg.NetBSD.org/src/rev/369ec896b584
branches:  trunk
changeset: 1021471:369ec896b584
user:      rin <rin%NetBSD.org@localhost>
date:      Mon May 31 21:31:33 2021 +0000

description:
PR toolchain/55837

Stop using enum for flags, as per request from joerg.

#define constants and #undef after use.

diffstat:

 sys/lib/libunwind/Registers.hpp |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r 6e0286fa2ef8 -r 369ec896b584 sys/lib/libunwind/Registers.hpp
--- a/sys/lib/libunwind/Registers.hpp   Mon May 31 17:22:44 2021 +0000
+++ b/sys/lib/libunwind/Registers.hpp   Mon May 31 21:31:33 2021 +0000
@@ -332,6 +332,11 @@
   REGNO_ARM32_S31 = 80,
 };
 
+#define        FLAGS_VFPV2_USED                0x1
+#define        FLAGS_VFPV3_USED                0x2
+#define        FLAGS_LEGACY_VFPV2_REGNO        0x4
+#define        FLAGS_EXTENDED_VFPV2_REGNO      0x8
+
 class Registers_arm32 {
 public:
   enum {
@@ -438,14 +443,12 @@
   uint32_t reg[REGNO_ARM32_SPSR + 1];
   uint32_t flags;
   uint64_t fpreg[32];
+};
 
-  enum {
-    FLAGS_VFPV2_USED = 0x1,
-    FLAGS_VFPV3_USED = 0x2,
-    FLAGS_LEGACY_VFPV2_REGNO = 0x4,
-    FLAGS_EXTENDED_VFPV2_REGNO = 0x8,
-  };
-};
+#undef FLAGS_VFPV2_USED
+#undef FLAGS_VFPV3_USED
+#undef FLAGS_LEGACY_VFPV2_REGNO
+#undef FLAGS_EXTENDED_VFPV2_REGNO
 
 enum {
   DWARF_VAX_R0 = 0,



Home | Main Index | Thread Index | Old Index