From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL 01/18] target/mips: Add declarations for generic TCG helpers
Date: Fri, 2 Jul 2021 15:35:40 +0200 [thread overview]
Message-ID: <20210702133557.60317-2-f4bug@amsat.org> (raw)
In-Reply-To: <20210702133557.60317-1-f4bug@amsat.org>
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>
---
target/mips/tcg/translate.h | 5 +++++
target/mips/tcg/translate.c | 9 ++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index 61442590340..c25fad597d5 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
*/
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index b4a454ec09b..3e9945540fc 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();
--
2.31.1
next prev parent reply other threads:[~2021-07-02 13:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 13:35 [PULL 00/18] MIPS patches for 2021-07-02 Philippe Mathieu-Daudé
2021-07-02 13:35 ` Philippe Mathieu-Daudé [this message]
2021-07-02 13:35 ` [PULL 02/18] target/mips: Extract Code Compaction ASE translation routines Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 03/18] target/mips: Extract the microMIPS ISA " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 04/18] target/mips: Extract nanoMIPS " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 05/18] hw/pci-host/bonito: Trace PCI config accesses smaller than 32-bit Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 06/18] hw/pci-host/bonito: Allow " Philippe Mathieu-Daudé
2021-07-02 15:29 ` BALATON Zoltan
2021-07-02 13:35 ` [PULL 07/18] tests/acceptance: Test Linux on the Fuloong 2E machine Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 08/18] g364fb: use RAM memory region for framebuffer Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 09/18] g364fb: add VMStateDescription for G364SysBusState Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 10/18] dp8393x: checkpatch fixes Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 11/18] dp8393x: convert to trace-events Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 12/18] hw/mips/jazz: move PROM and checksum calculation from dp8393x device to board Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 13/18] hw/m68k/q800: " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 14/18] dp8393x: remove onboard PROM containing MAC address and checksum Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 15/18] qemu/bitops.h: add bitrev8 implementation Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 16/18] hw/m68k/q800: fix PROM checksum and MAC address storage Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally Philippe Mathieu-Daudé
2021-07-04 15:02 ` [PULL 00/18] MIPS patches for 2021-07-02 Peter Maydell
2021-07-04 15:24 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210702133557.60317-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).