diff mbox series

[v2,17/20] disas/nanomips: Replace Cpp enums for C enums

Message ID 20220905095522.66941-18-milica.lazarevic@syrmia.com (mailing list archive)
State New, archived
Headers show
Series Convert nanoMIPS disassembler from C++ to C | expand

Commit Message

Milica Lazarevic Sept. 5, 2022, 9:55 a.m. UTC
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(-)

Comments

Richard Henderson Sept. 5, 2022, 11:47 a.m. UTC | #1
On 9/5/22 10:55, Milica Lazarevic wrote:
> 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(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

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;