target/riscv: Use --static-decode for decodetree
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 1 Apr 2019 03:11:49 +0000 (10:11 +0700)
committerPalmer Dabbelt <palmer@sifive.com>
Fri, 24 May 2019 19:09:22 +0000 (12:09 -0700)
The generated functions are only used within translate.c
and do not need to be global, or declared.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
target/riscv/Makefile.objs
target/riscv/translate.c

index 9c6c1093271ee0eb25d7992c3af2eff4224b4218..c7a1b063edc20e727748674bbfebb6ceff3e15eb 100644 (file)
@@ -7,14 +7,14 @@ decode32-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn32-64.decode
 
 target/riscv/decode_insn32.inc.c: $(decode32-y) $(DECODETREE)
        $(call quiet-command, \
-         $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn32 $(decode32-y), \
-         "GEN", $(TARGET_DIR)$@)
+         $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \
+          $(decode32-y), "GEN", $(TARGET_DIR)$@)
 
 target/riscv/decode_insn16.inc.c: \
   $(SRC_PATH)/target/riscv/insn16.decode $(DECODETREE)
        $(call quiet-command, \
-         $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn16 --insnwidth 16 $<, \
-         "GEN", $(TARGET_DIR)$@)
+         $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \
+          --insnwidth 16 $<, "GEN", $(TARGET_DIR)$@)
 
 target/riscv/translate.o: target/riscv/decode_insn32.inc.c \
        target/riscv/decode_insn16.inc.c
index 928374242e8325c27afb96ed84da970348531b27..b09158117f3207c9c77f8bda798f8430588c3d71 100644 (file)
@@ -558,7 +558,6 @@ static int ex_rvc_register(DisasContext *ctx, int reg)
     return 8 + reg;
 }
 
-bool decode_insn32(DisasContext *ctx, uint32_t insn);
 /* Include the auto-generated decoder for 32 bit insn */
 #include "decode_insn32.inc.c"
 
@@ -701,8 +700,6 @@ static bool gen_shift(DisasContext *ctx, arg_r *a,
 # endif
 #endif
 
-bool decode_insn16(DisasContext *ctx, uint16_t insn);
-/* auto-generated decoder*/
 #include "decode_insn16.inc.c"
 #include "insn_trans/trans_rvc.inc.c"