util: Remove the subfunc arg from M5OP_FOREACH.
authorGabe Black <gabeblack@google.com>
Sat, 14 Mar 2020 06:24:39 +0000 (23:24 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 31 Mar 2020 22:19:29 +0000 (22:19 +0000)
Now that the annotation pseudo ops are removed, the subfunction is
always zero. It is no longer decoded within gem5 either. The format of
the pseudo op func/subfunc mechanism is unchanged for compatibility, but
the subfunc field will always be zero now.

Change-Id: I2167571577b6557d06aa26d8aecaca78797f5f59
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27205
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

include/gem5/asm/generic/m5ops.h
util/m5/m5op_arm.S
util/m5/m5op_arm_A64.S

index 8b1f04ae43ccc7bbdff100f3fe8b6d44050213aa..e887b72fe910108a87574b5bb7db05344abe16b8 100644 (file)
 
 
 #define M5OP_FOREACH                                            \
-    M5OP(m5_arm, M5OP_ARM, 0);                                  \
-    M5OP(m5_quiesce, M5OP_QUIESCE, 0);                          \
-    M5OP(m5_quiesce_ns, M5OP_QUIESCE_NS, 0);                    \
-    M5OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE, 0);              \
-    M5OP(m5_quiesce_time, M5OP_QUIESCE_TIME, 0);                \
-    M5OP(m5_rpns, M5OP_RPNS, 0);                                \
-    M5OP(m5_wake_cpu, M5OP_WAKE_CPU, 0);                        \
-    M5OP(m5_exit, M5OP_EXIT, 0);                                \
-    M5OP(m5_fail, M5OP_FAIL, 0);                                \
-    M5OP(m5_init_param, M5OP_INIT_PARAM, 0);                    \
-    M5OP(m5_load_symbol, M5OP_LOAD_SYMBOL, 0);                  \
-    M5OP(m5_reset_stats, M5OP_RESET_STATS, 0);                  \
-    M5OP(m5_dump_stats, M5OP_DUMP_STATS, 0);                    \
-    M5OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS, 0);        \
-    M5OP(m5_checkpoint, M5OP_CHECKPOINT, 0);                    \
-    M5OP(m5_read_file, M5OP_READ_FILE, 0);                      \
-    M5OP(m5_write_file, M5OP_WRITE_FILE, 0);                    \
-    M5OP(m5_debug_break, M5OP_DEBUG_BREAK, 0);                  \
-    M5OP(m5_switch_cpu, M5OP_SWITCH_CPU, 0);                    \
-    M5OP(m5_add_symbol, M5OP_ADD_SYMBOL, 0);                    \
-    M5OP(m5_panic, M5OP_PANIC, 0);                              \
-    M5OP(m5_work_begin, M5OP_WORK_BEGIN, 0);                    \
-    M5OP(m5_work_end, M5OP_WORK_END, 0);                        \
-    M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC, 0);
+    M5OP(m5_arm, M5OP_ARM);                                     \
+    M5OP(m5_quiesce, M5OP_QUIESCE);                             \
+    M5OP(m5_quiesce_ns, M5OP_QUIESCE_NS);                       \
+    M5OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE);                 \
+    M5OP(m5_quiesce_time, M5OP_QUIESCE_TIME);                   \
+    M5OP(m5_rpns, M5OP_RPNS);                                   \
+    M5OP(m5_wake_cpu, M5OP_WAKE_CPU);                           \
+    M5OP(m5_exit, M5OP_EXIT);                                   \
+    M5OP(m5_fail, M5OP_FAIL);                                   \
+    M5OP(m5_init_param, M5OP_INIT_PARAM);                       \
+    M5OP(m5_load_symbol, M5OP_LOAD_SYMBOL);                     \
+    M5OP(m5_reset_stats, M5OP_RESET_STATS);                     \
+    M5OP(m5_dump_stats, M5OP_DUMP_STATS);                       \
+    M5OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS);           \
+    M5OP(m5_checkpoint, M5OP_CHECKPOINT);                       \
+    M5OP(m5_read_file, M5OP_READ_FILE);                         \
+    M5OP(m5_write_file, M5OP_WRITE_FILE);                       \
+    M5OP(m5_debug_break, M5OP_DEBUG_BREAK);                     \
+    M5OP(m5_switch_cpu, M5OP_SWITCH_CPU);                       \
+    M5OP(m5_add_symbol, M5OP_ADD_SYMBOL);                       \
+    M5OP(m5_panic, M5OP_PANIC);                                 \
+    M5OP(m5_work_begin, M5OP_WORK_BEGIN);                       \
+    M5OP(m5_work_end, M5OP_WORK_END);                           \
+    M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC);
 
 #endif //  __GEM5_ASM_GENERIC_M5OPS_H__
index c0487c01c46f532a255aa7d6a8d1334131eefc61..b4f7fb3ccaa99a43e6631648a5f5b3a9f1ac2e99 100644 (file)
 
 .text
 
-.macro m5op_func name, func, subfunc
+.macro m5op_func name, func
         .align 2
         .globl \name
 \name:
 #ifdef __thumb__
         .short 0xEE00 | \func
-        .short 0x0110 | (\subfunc << 12)
+        .short 0x0110
 #else
-        .long 0xEE000110 | (\func << 16) | (\subfunc << 12)
+        .long 0xEE000110 | (\func << 16)
 #endif
         mov pc,lr
 .endm
 
 .text
-#define M5OP(name, func, subfunc) m5op_func name, func, subfunc
+#define M5OP(name, func) m5op_func name, func
         M5OP_FOREACH
index 09d31d3f0c430555bded0043e57078aaa597a1c2..011da0af6cd2fcbd59e342810916530981e62e4a 100644 (file)
 #include <gem5/asm/generic/m5ops.h>
 
 #ifdef M5OP_ADDR
-.macro m5op_func, name, func, subfunc
+.macro m5op_func, name, func
         .globl \name
         \name:
         ldr x9, m5_mem
-        movz x10, #((\func << 8) | \subfunc)
+        movz x10, #(\func << 8)
         ldr x0, [ x9, x10 ]
         ret
 .endm
 #else
-.macro m5op_func, name, func, subfunc
+.macro m5op_func, name, func
         .globl \name
         \name:
-        .long 0xff000110 | (\func << 16) | (\subfunc << 12)
+        .long 0xff000110 | (\func << 16)
         ret
 .endm
 #endif
 
 .text
-#define M5OP(name, func, subfunc) m5op_func name, func, subfunc
+#define M5OP(name, func) m5op_func name, func
         M5OP_FOREACH