Signed-off-by: Brian Cain <bc...@quicinc.com>
---
 target/hexagon/cpu_bits.h | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h
index eec456d8f9..2454ef72bf 100644
--- a/target/hexagon/cpu_bits.h
+++ b/target/hexagon/cpu_bits.h
@@ -23,15 +23,21 @@
 #define PCALIGN 4
 #define PCALIGN_MASK (PCALIGN - 1)
 
-#define HEX_EVENT_TRAP0           0x008
-#define HEX_EVENT_FETCH_NO_UPAGE  0x012
-#define HEX_EVENT_INVALID_PACKET  0x015
-#define HEX_EVENT_INVALID_OPCODE  0x015
-#define HEX_EVENT_PC_NOT_ALIGNED  0x01e
-#define HEX_EVENT_PRIV_NO_UREAD   0x024
-#define HEX_EVENT_PRIV_NO_UWRITE  0x025
+enum hex_event {
+    HEX_EVENT_NONE           = -1,
+    HEX_EVENT_TRAP0          =  0x008,
+    HEX_EVENT_FETCH_NO_UPAGE =  0x012,
+    HEX_EVENT_INVALID_PACKET =  0x015,
+    HEX_EVENT_INVALID_OPCODE =  0x015,
+    HEX_EVENT_PC_NOT_ALIGNED =  0x01e,
+    HEX_EVENT_PRIV_NO_UREAD  =  0x024,
+    HEX_EVENT_PRIV_NO_UWRITE =  0x025,
+};
 
-#define HEX_CAUSE_TRAP0           0x172
+enum hex_cause {
+    HEX_CAUSE_NONE = -1,
+    HEX_CAUSE_TRAP0 = 0x172,
+};
 
 #define PACKET_WORDS_MAX         4
 
-- 
2.34.1

Reply via email to