diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-05-30 00:39:07 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-07-02 10:41:15 +0200 |
commit | d507663151daf1b9942a41ea6677ad81aec61012 (patch) | |
tree | 11d01fd0dea53893a9648169843327beb26c0b26 /target | |
parent | 67e25eed977cb60e723b918207f0a3469baceef4 (diff) | |
download | qemu-d507663151daf1b9942a41ea6677ad81aec61012.zip qemu-d507663151daf1b9942a41ea6677ad81aec61012.tar.gz qemu-d507663151daf1b9942a41ea6677ad81aec61012.tar.bz2 |
target/mips: Add declarations for generic TCG helpers
We want to extract the microMIPS ISA and Code Compaction ASE to
new compilation units.
We will first extract this code as included source files (.c.inc),
then make them new compilation units afterward.
The following methods are going to be used externally:
micromips_translate.c.inc:1778: gen_ldxs(ctx, rs, rt, rd);
micromips_translate.c.inc:1806: gen_align(ctx, 32, rd, rs, ...
micromips_translate.c.inc:2859: gen_addiupc(ctx, reg, offset, ...
mips16e_translate.c.inc:444: gen_addiupc(ctx, ry, offset, ...
To avoid too much code churn, it is simpler to declare these
prototypes in "translate.h" now.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210617174907.2904067-2-f4bug@amsat.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/mips/tcg/translate.c | 9 | ||||
-rw-r--r-- | target/mips/tcg/translate.h | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index b4a454e..3e99455 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5629,8 +5629,7 @@ static void gen_align_bits(DisasContext *ctx, int wordsz, int rd, int rs, tcg_temp_free(t0); } -static void gen_align(DisasContext *ctx, int wordsz, int rd, int rs, int rt, - int bp) +void gen_align(DisasContext *ctx, int wordsz, int rd, int rs, int rt, int bp) { gen_align_bits(ctx, wordsz, rd, rs, rt, bp * 8); } @@ -12778,8 +12777,8 @@ static void gen_mips16_restore(DisasContext *ctx, tcg_temp_free(t2); } -static void gen_addiupc(DisasContext *ctx, int rx, int imm, - int is_64_bit, int extended) +void gen_addiupc(DisasContext *ctx, int rx, int imm, + int is_64_bit, int extended) { TCGv t0; @@ -14510,7 +14509,7 @@ static void gen_pool16c_r6_insn(DisasContext *ctx) } } -static void gen_ldxs(DisasContext *ctx, int base, int index, int rd) +void gen_ldxs(DisasContext *ctx, int base, int index, int rd) { TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index 6144259..c25fad5 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -146,6 +146,11 @@ void gen_store_fpr32(DisasContext *ctx, TCGv_i32 t, int reg); void gen_store_fpr64(DisasContext *ctx, TCGv_i64 t, int reg); int get_fp_bit(int cc); +void gen_ldxs(DisasContext *ctx, int base, int index, int rd); +void gen_align(DisasContext *ctx, int wordsz, int rd, int rs, int rt, int bp); +void gen_addiupc(DisasContext *ctx, int rx, int imm, + int is_64_bit, int extended); + /* * Address Computation and Large Constant Instructions */ |