[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] another SPARC issue

From: Vince Weaver
Subject: Re: [Qemu-devel] another SPARC issue
Date: Tue, 5 Aug 2008 22:33:29 -0400 (EDT)

I am not sure I followed the right path, but it seems that indeed
for asi ld/st the constant gets added twice:  once in the disas
function and once in gen_get_asi.

I agree.

The following patch to gen_get_asi() seems to fix things for me, the
bzip executable I am using gets much further along with this patch applied (still not working 100% though).

From what I can tell from the sparcv9 manual this patch is correct, but I
might be missing something.

--- translate.c.org     2008-08-05 22:30:15.000000000 -0400
+++ translate.c 2008-08-05 22:30:26.000000000 -0400
@@ -1641,13 +1641,11 @@
 #ifdef TARGET_SPARC64
 static inline TCGv gen_get_asi(int insn, TCGv r_addr)
-    int asi, offset;
+    int asi;
     TCGv r_asi;

     if (IS_IMM) {
         r_asi = tcg_temp_new(TCG_TYPE_I32);
-        offset = GET_FIELD(insn, 25, 31);
-        tcg_gen_addi_tl(r_addr, r_addr, offset);
         tcg_gen_ld_i32(r_asi, cpu_env, offsetof(CPUSPARCState, asi));
     } else {
         asi = GET_FIELD(insn, 19, 26);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]