From: Jay Foad <jay.foad@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] target-sparc: fix --enable-debug build
Date: Fri, 19 Feb 2010 18:24:13 +0000 [thread overview]
Message-ID: <ee2e06e91002191024rc2914eeia8a772e2e096f8cb@mail.gmail.com> (raw)
On Linux/x86, configuring with --enable-debug, I get:
CC sparc64-linux-user/translate.o
/home/foad/git/qemu/target-sparc/translate.c: In function
‘gen_load_trap_state_at_tl’:
/home/foad/git/qemu/target-sparc/translate.c:1684: error: incompatible
type for argument 3 of ‘tcg_gen_add_i32’
/home/foad/git/qemu/tcg/tcg-op.h:422: note: expected ‘TCGv_i32’ but
argument is of type ‘TCGv_i64’
make[1]: *** [translate.o] Error 1
Does this look like a reasonable fix?
Signed-off-by: Jay Foad <address@hidden>
---
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 7e9f0cf..b7d2a32 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -1663,27 +1663,27 @@ static inline TCGv get_src2(unsigned int insn, TCGv def)
#ifdef TARGET_SPARC64
static inline void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr,
TCGv_ptr cpu_env)
{
- TCGv r_tl = tcg_temp_new();
+ TCGv_i32 r_tl = tcg_temp_new_i32();
/* load env->tl into r_tl */
- {
- TCGv_i32 r_tl_tmp = tcg_temp_new_i32();
- tcg_gen_ld_i32(r_tl_tmp, cpu_env, offsetof(CPUSPARCState, tl));
- tcg_gen_ext_i32_tl(r_tl, r_tl_tmp);
- tcg_temp_free_i32(r_tl_tmp);
- }
+ tcg_gen_ld_i32(r_tl, cpu_env, offsetof(CPUSPARCState, tl));
/* tl = [0 ... MAXTL_MASK] where MAXTL_MASK must be power of 2 */
- tcg_gen_andi_tl(r_tl, r_tl, MAXTL_MASK);
+ tcg_gen_andi_i32(r_tl, r_tl, MAXTL_MASK);
/* calculate offset to current trap state from env->ts, reuse r_tl */
- tcg_gen_muli_tl(r_tl, r_tl, sizeof (trap_state));
+ tcg_gen_muli_i32(r_tl, r_tl, sizeof (trap_state));
tcg_gen_addi_ptr(r_tsptr, cpu_env, offsetof(CPUState, ts));
/* tsptr = env->ts[env->tl & MAXTL_MASK] */
- tcg_gen_add_ptr(r_tsptr, r_tsptr, r_tl);
+ {
+ TCGv_ptr r_tl_tmp = tcg_temp_new_ptr();
+ tcg_gen_ext_i32_ptr(r_tl_tmp, r_tl);
+ tcg_gen_add_ptr(r_tsptr, r_tsptr, r_tl_tmp);
+ tcg_temp_free_i32(r_tl_tmp);
+ }
- tcg_temp_free(r_tl);
+ tcg_temp_free_i32(r_tl);
}
#endif
next reply other threads:[~2010-02-19 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 18:24 Jay Foad [this message]
2010-02-20 8:56 ` [Qemu-devel] [PATCH] target-sparc: fix --enable-debug build Blue Swirl
2010-02-20 9:43 ` Jay Foad
2010-02-20 9:49 ` Blue Swirl
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=ee2e06e91002191024rc2914eeia8a772e2e096f8cb@mail.gmail.com \
--to=jay.foad@gmail.com \
--cc=qemu-devel@nongnu.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).