From patchwork Sat Nov 4 03:45:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10041411 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 6033D6032A for ; Sat, 4 Nov 2017 03:47:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5060929ADB for ; Sat, 4 Nov 2017 03:47:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 442C829ADD; Sat, 4 Nov 2017 03:47:15 +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, HK_RANDOM_FROM, 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 3539B29ADB for ; Sat, 4 Nov 2017 03:47:14 +0000 (UTC) Received: from localhost ([::1]:39203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eApQP-0005sl-6x for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Nov 2017 23:47:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eApP7-0005rG-DW for qemu-devel@nongnu.org; Fri, 03 Nov 2017 23:45:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eApP6-0000TX-L4 for qemu-devel@nongnu.org; Fri, 03 Nov 2017 23:45:53 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:49622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eApP6-0000SF-Dk for qemu-devel@nongnu.org; Fri, 03 Nov 2017 23:45:52 -0400 Received: by mail-lf0-x242.google.com with SMTP id w21so5156653lfc.6 for ; Fri, 03 Nov 2017 20:45:52 -0700 (PDT) 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=PJD3ro8KJeIoDdbFu78I2PWruUH4Y5s5l9jAquzoLQXoc8FlTDWapadiIdzyC9F3tH Sj1Vq89CI4nQu/9IHh6WLAGLmf5CVHTaXLrABwx6dVVqjN+8onJIutynIpAur90oKt65 hYHv4VIFdmVzu8BGCp4XTmyqN2Ngth+MLfMhGJ7ox0iBLBaPW/n18o3rRtn64BDXDrMs Thz1VcSU6aCZSMCImhOoOXmxmY3zSKsS3nKnuqtTuMeTOibhiWiSfgnCTeKkKfMs9FpH vSNnb3Iddt2Tq4IooRC55SQZs9QfCa0PP7DhV7AnK9jo5ZRiHQyQlvyyEpvZQ1cK0XzG gWSw== 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=tNtKLNStwiMYTMw1bgwMu3zDtsV+cv6c2qzbYCtmPEf8L40mgNetBORKGzAXpOY0F8 NKnhqUCriIv3kVG2LhH8R1Zs8NvnzGOVKnmeQTmbqBidPxJqMgBUP9nDk/6cqWYvaY/z o2dABQMJb8meWEmrs1B5x0jzjs8W+UUF27dmOvfO7RDiPuYpXDmH40llVgXQmcucaQuP 8Kk1alRaKfA1BXh1GuyYy7CwS03CjwOeRpIxd9Y8UghhRTxvs20zMm0u/9s+KNx4qeOl oq0PAiSBPO53HBpDggq8fUhQFMiLMmhHOMnnbObRP4P0DvXGtme7U3vm9JeI/lcpSBCQ nYAw== X-Gm-Message-State: AJaThX43Ak1xfWX6pKtKfN3Le/Ov4/UIt63eJJI/lpJqzhAGWFTyuoWT 9+WKBwGYX3NryOfWIFFvmtKaww== X-Google-Smtp-Source: ABhQp+R01279Igvagv//D/Yimya0T257EsVP1ujP1LQAEuuWj7C8DcVX9EMVxz23w5aiiSrFNc73Jg== X-Received: by 10.25.18.214 with SMTP id 83mr3196170lfs.9.1509767150881; Fri, 03 Nov 2017 20:45:50 -0700 (PDT) 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 h3sm1258383lfj.26.2017.11.03.20.45.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Nov 2017 20:45:50 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 3 Nov 2017 20:45:06 -0700 Message-Id: <1509767121-26925-2-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1509767121-26925-1-git-send-email-jcmvbkbc@gmail.com> References: <1509767121-26925-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:4010:c07::242 Subject: [Qemu-devel] [PATCH 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);