From patchwork Tue Dec 19 05:38:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10122363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9020760390 for ; Tue, 19 Dec 2017 05:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81E5C28FC8 for ; Tue, 19 Dec 2017 05:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 768F128FF3; Tue, 19 Dec 2017 05:40:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2F65328FC8 for ; Tue, 19 Dec 2017 05:40:52 +0000 (UTC) Received: from localhost ([::1]:50594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRAe3-0001sc-8R for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Dec 2017 00:40:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRAck-0000Zq-Cb for qemu-devel@nongnu.org; Tue, 19 Dec 2017 00:39:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRAcj-0001e3-Ej for qemu-devel@nongnu.org; Tue, 19 Dec 2017 00:39:30 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:43813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRAcj-0001dF-8K for qemu-devel@nongnu.org; Tue, 19 Dec 2017 00:39:29 -0500 Received: by mail-wr0-x241.google.com with SMTP id w68so4553461wrc.10 for ; Mon, 18 Dec 2017 21:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WXWbRbnRHSmcxid/58cxuzJ8gV3fSS3dw4mXi1bN0F8=; b=Oc+YgNSQxuUzZieVTBe3UqZUAkMQ2d5UPGbF+TaKVorhlRg71z6mZyMyez3nDkh9mw bqfrh+XWCv0xfBEbZHxtqp3asBiNRe+GqS23A1Y6HuPRt6UfVpCzS7FEStr8p1pTjsDJ 69AkAzLGGzhWI/hyPEGlM6eKTQ0ll//sWKSvaDrJbJS68aWvbO5q4L1Eo8/qz1oyWDS3 L1c8e0gbZYXfbwAILM9Gx/hMua9xXO4lbvHdYvTbgDmAffqcJSv68Gx2jN/8kSarx8D/ q1EJW4/ZlJVMhR7ZwrM3+2DBCsMusH0iCLjhPXBF7aKgX+KPofc8Xny4kdk5nbPT5Ju/ V6OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WXWbRbnRHSmcxid/58cxuzJ8gV3fSS3dw4mXi1bN0F8=; b=VATk7Gd3/IG+uXBfoVa+Wni7nAZ1tShY4A2LD+Sq8rqxo47NO0Ydrx0R0FdXHKRL0W 8eZpd2vQq7naJVX1pev0kI3j5tWvWc4rjgh0XieuCxcW73U0ROOyr2XJ2n8bijMyJhJc GRR7KXuMNlWpi54NmuBS1yvTo6vAfid6SEVruz/pyznXIodr8Ll3WO241fkbBAazatWN GEChiWF15ItPVxDnaTBijixNS1gtJm78zb6cKuhPRGh83xoRAy2tUefVpwb1+XEquGVW 14HLgaepXm23xbDqkHuNNGkCfpWxVaWg5aa2eBmknL/B6lBptV9FEeYeLmsSyYnoAbhC 3BVg== X-Gm-Message-State: AKGB3mIqiS1GptxcdK/kfCak0gGWj8/csJCah91/4A8slNo22v5v0C+6 mfHpnRlrq8+ltQBwxuhbTqI9vA== X-Google-Smtp-Source: ACJfBotPd8dbtujTX06UXIPPpNo4B3OFjny2aJ3fZo45mSHWdaCvFa9kAz+R0tmu1cs19btctvpcCg== X-Received: by 10.46.29.67 with SMTP id d64mr1275989ljd.139.1513661968001; Mon, 18 Dec 2017 21:39:28 -0800 (PST) Received: from octofox.net (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id f67sm673187lfb.83.2017.12.18.21.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Dec 2017 21:39:27 -0800 (PST) From: Max Filippov To: qemu-devel@nongnu.org Date: Mon, 18 Dec 2017 21:38:37 -0800 Message-Id: <1513661932-6849-2-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1513661932-6849-1-git-send-email-jcmvbkbc@gmail.com> References: <1513661932-6849-1-git-send-email-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v2 01/16] target/xtensa: pass actual frame size to the entry helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);