[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 17/20] disas/nanomips: Replace Cpp enums for C enums
From: |
Milica Lazarevic |
Subject: |
[PATCH v2 17/20] disas/nanomips: Replace Cpp enums for C enums |
Date: |
Mon, 5 Sep 2022 11:55:19 +0200 |
Change enums to typedef enums to keep naming clear.
Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
disas/nanomips.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index a8295ebfa8..f57d255de3 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -51,16 +51,16 @@ typedef bool (*conditional_function)(uint64 instruction);
typedef char * (*disassembly_function)(uint64 instruction,
struct Dis_info *info);
-enum TABLE_ENTRY_TYPE {
+typedef enum {
instruction,
call_instruction,
branch_instruction,
return_instruction,
reserved_block,
pool,
-};
+} TABLE_ENTRY_TYPE;
-enum TABLE_ATTRIBUTE_TYPE {
+typedef enum {
MIPS64_ = 0x00000001,
XNP_ = 0x00000002,
XMMS_ = 0x00000004,
@@ -78,7 +78,7 @@ enum TABLE_ATTRIBUTE_TYPE {
TLB_ = 0x00004000,
MVH_ = 0x00008000,
ALL_ATTRIBUTES = 0xffffffffull,
-};
+} TABLE_ATTRIBUTE_TYPE;
struct Pool {
TABLE_ENTRY_TYPE type;
--
2.25.1
- Re: [PATCH v2 13/20] disas/nanomips: Prevent memory leaking, (continued)
- [PATCH v2 14/20] disas/nanomips: Remove function overloading, Milica Lazarevic, 2022/09/05
- [PATCH v2 15/20] disas/nanomips: Introduce Dis_info struct, Milica Lazarevic, 2022/09/05
- [PATCH v2 16/20] disas/nanomips: Replace exception handling, Milica Lazarevic, 2022/09/05
- [PATCH v2 18/20] disas/nanomips: Remove argument passing by ref, Milica Lazarevic, 2022/09/05
- [PATCH v2 17/20] disas/nanomips: Replace Cpp enums for C enums,
Milica Lazarevic <=
- [PATCH v2 19/20] disas/nanomips: Add struct keyword, Milica Lazarevic, 2022/09/05
- [PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c, Milica Lazarevic, 2022/09/05