summaryrefslogtreecommitdiffstats
path: root/target/cris
diff options
context:
space:
mode:
authorLluís Vilanova2017-07-14 10:17:35 +0200
committerRichard Henderson2017-07-19 23:45:16 +0200
commit9c489ea6bed134fecfd556b439c68bba48fbe102 (patch)
tree3d54a182709bc45c16e276cc33e36f01cbe7f4ee /target/cris
parenttcg/tci: enable bswap16_i64 (diff)
downloadqemu-9c489ea6bed134fecfd556b439c68bba48fbe102.tar.gz
qemu-9c489ea6bed134fecfd556b439c68bba48fbe102.tar.xz
qemu-9c489ea6bed134fecfd556b439c68bba48fbe102.zip
tcg: Pass generic CPUState to gen_intermediate_code()
Needed to implement a target-agnostic gen_intermediate_code() in the future. Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Benneé <alex.benee@linaro.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-Id: <150002025498.22386.18051908483085660588.stgit@frigg.lan> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/cris')
-rw-r--r--target/cris/translate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/cris/translate.c b/target/cris/translate.c
index 0ee05ca02d..12b96eb68f 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -3080,10 +3080,9 @@ static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
*/
/* generate intermediate code for basic block 'tb'. */
-void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb)
+void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
{
- CRISCPU *cpu = cris_env_get_cpu(env);
- CPUState *cs = CPU(cpu);
+ CPUCRISState *env = cs->env_ptr;
uint32_t pc_start;
unsigned int insn_len;
struct DisasContext ctx;
@@ -3105,7 +3104,7 @@ void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb)
* delayslot, like in real hw.
*/
pc_start = tb->pc & ~1;
- dc->cpu = cpu;
+ dc->cpu = cris_env_get_cpu(env);
dc->tb = tb;
dc->is_jmp = DISAS_NEXT;