qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <rth@twiddle.net>, Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH v2 01/16] target/xtensa: pass actual frame size to the entry helper
Date: Mon, 18 Dec 2017 21:38:37 -0800	[thread overview]
Message-ID: <1513661932-6849-2-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1513661932-6849-1-git-send-email-jcmvbkbc@gmail.com>

Currently 'entry' opcode helper accepts frame size divided by 8, as it
is encoded in the opcode. Make it more natural and accept actual frame
size instead.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target/xtensa/op_helper.c | 2 +-
 target/xtensa/translate.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 3d990c0caa44..012552817f74 100644
--- a/target/xtensa/op_helper.c
+++ b/target/xtensa/op_helper.c
@@ -249,7 +249,7 @@ void HELPER(entry)(CPUXtensaState *env, uint32_t pc, uint32_t s, uint32_t imm)
         if (windowstart & ((1 << callinc) - 1)) {
             HELPER(window_check)(env, pc, callinc);
         }
-        env->regs[(callinc << 2) | (s & 3)] = env->regs[s] - (imm << 3);
+        env->regs[(callinc << 2) | (s & 3)] = env->regs[s] - imm;
         rotate_window(env, callinc);
         env->sregs[WINDOW_START] |=
             windowstart_bit(env->sregs[WINDOW_BASE], env);
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 20f7ddf042f8..225e4a5fe870 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2830,7 +2830,7 @@ static void disas_xtensa_insn(CPUXtensaState *env, DisasContext *dc)
                 {
                     TCGv_i32 pc = tcg_const_i32(dc->pc);
                     TCGv_i32 s = tcg_const_i32(BRI12_S);
-                    TCGv_i32 imm = tcg_const_i32(BRI12_IMM12);
+                    TCGv_i32 imm = tcg_const_i32(BRI12_IMM12 << 3);
                     gen_helper_entry(cpu_env, pc, s, imm);
                     tcg_temp_free(imm);
                     tcg_temp_free(s);
-- 
2.1.4

  reply	other threads:[~2017-12-19  5:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19  5:38 [Qemu-devel] [PATCH v2 00/16] target/xtensa: switch to libisa Max Filippov
2017-12-19  5:38 ` Max Filippov [this message]
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 02/16] target/xtensa: import libisa source Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 03/16] target/xtensa: extract core opcode translators Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 04/16] target/xtensa: extract FPU2000 " Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 05/16] target/xtensa: update import_core.sh script for libisa Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 06/16] target/xtensa: switch dc232b to libisa Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 07/16] target/xtensa: switch dc233c " Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 08/16] target/xtensa: switch fsf " Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 09/16] target/xtensa: use libisa for instruction decoding Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 10/16] target/xtensa: tests: fix memctl SR test Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 11/16] target/xtensa: drop DisasContext::litbase Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 12/16] target/xtensa: add internal/noop SRs and opcodes Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 13/16] target/xtensa: implement salt/saltu Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 14/16] target/xtensa: implement GPIO32 Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 15/16] target/xtensa: implement const16 Max Filippov
2017-12-19  5:38 ` [Qemu-devel] [PATCH v2 16/16] target/xtensa: implement disassembler Max Filippov
2018-01-18 13:34   ` Peter Maydell
2017-12-19  6:14 ` [Qemu-devel] [PATCH v2 00/16] target/xtensa: switch to libisa no-reply

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=1513661932-6849-2-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).