From nobody Sun Feb 8 21:33:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547452552384134.6667069293693; Sun, 13 Jan 2019 23:55:52 -0800 (PST) Received: from localhost ([127.0.0.1]:55495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gix5y-00020N-6v for importer@patchew.org; Mon, 14 Jan 2019 02:55:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gix0A-0006Vt-Fn for qemu-devel@nongnu.org; Mon, 14 Jan 2019 02:49:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gix08-00022O-CS for qemu-devel@nongnu.org; Mon, 14 Jan 2019 02:49:42 -0500 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:41334) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gix08-0001qI-0B for qemu-devel@nongnu.org; Mon, 14 Jan 2019 02:49:40 -0500 Received: by mail-lf1-x142.google.com with SMTP id c16so14854654lfj.8 for ; Sun, 13 Jan 2019 23:49:23 -0800 (PST) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id g17sm16181570lfg.78.2019.01.13.23.49.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Jan 2019 23:49:21 -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=I9cO+HiCW5QlzzCTe5B+FRNDlWFB5rbQn6JvWgUzc9g=; b=TBBKvwRSy/coRswNMygo+vSqORfo7Ef0sxQPFYn53OiCFBGqhInym4wLKbhXaGoM4q 3wS5oe4l3B9cdy9paOPq8qjbVg8nkkj803znq8lgSaFN42lUTLJI7UKzeyviHAbBBc9K 31oTidQYHoShVXTWOxFpVnwkP0YPzS42lQDId7fPAxgoxj9og0sFfR+5onHOW1wVSrBY PraedpwUthphfd5B8o5pZ2dXzZgnF9rkaGRXeZElS+dbbFUzZRsGv+Y5OF+aSxKMdzU8 058bjiCDJ+OAS+NtnArvctt4aRZSQEtdyZXREBizRDEsYUWqVgV2kS1svFq3Z27wPdXt xB4A== 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=I9cO+HiCW5QlzzCTe5B+FRNDlWFB5rbQn6JvWgUzc9g=; b=p8NZOqO5hScHeKMP0USfapf12yfl8j6xnWwWxtf32rUUjpc5h1ZOIevIwdTjiXzGTJ bA7IWNunSXAneLecW3LvwOHVXMugR+9p7ElFoa0UCx19oMdM827SBWmGYJnk0c1KKiRC 1rTIRqwLiwpxLk9C0dOJCMYf5tx1rw9G0gwxqypU3SzDmzSx9qDuxxw1vMABT8TnD1R+ 24DDOTP5b1oypnsVjCPSEk6STKNpbfSrgX1R6w4TqEc4q/ypwzFm6KJ8A+/mcuXdNmNs Zg2fClv4zdyknO0mpNqo+jjDKmHVpRVI+34GfUtJBU2rzx8fBtProFKzBSFeabTiSpH2 NHuw== X-Gm-Message-State: AJcUukfZvzDAsFi0tRXLXYIFKyzLP1Z/tCi9nIRoF7SCytk8LyvvS4RI eORNZkV5mcRZ8bDgEdvdWA97Co+U X-Google-Smtp-Source: ALg8bN5CMQEUrMbMwrWzbNl5QAhL1AhNU9ybWFkJqED7n1+vQrliiMVUrEpogXfoejbip5v1Nx2edQ== X-Received: by 2002:a19:280f:: with SMTP id o15mr2755133lfo.0.1547452161979; Sun, 13 Jan 2019 23:49:21 -0800 (PST) From: Max Filippov To: qemu-devel@nongnu.org Date: Sun, 13 Jan 2019 23:48:50 -0800 Message-Id: <20190114074855.16891-3-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190114074855.16891-1-jcmvbkbc@gmail.com> References: <20190114074855.16891-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::142 Subject: [Qemu-devel] [PATCH 2/7] target/xtensa: extract windowed registers helpers 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 Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Move helper functions related to register windows from op_helper.c to win_helper.c. No functional changes. Signed-off-by: Max Filippov --- target/xtensa/Makefile.objs | 1 + target/xtensa/op_helper.c | 190 ------------------------------------- target/xtensa/win_helper.c | 222 ++++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 223 insertions(+), 190 deletions(-) create mode 100644 target/xtensa/win_helper.c diff --git a/target/xtensa/Makefile.objs b/target/xtensa/Makefile.objs index 1508714c4475..cc550c2ccb51 100644 --- a/target/xtensa/Makefile.objs +++ b/target/xtensa/Makefile.objs @@ -9,3 +9,4 @@ obj-y +=3D xtensa-isa.o obj-y +=3D translate.o op_helper.o helper.o cpu.o obj-y +=3D fpu_helper.o obj-y +=3D gdbstub.o +obj-y +=3D win_helper.o diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c index 47517359ca67..946ae1f91b0c 100644 --- a/target/xtensa/op_helper.c +++ b/target/xtensa/op_helper.c @@ -172,196 +172,6 @@ void HELPER(debug_exception)(CPUXtensaState *env, uin= t32_t pc, uint32_t cause) HELPER(exception)(env, EXC_DEBUG); } =20 -static void copy_window_from_phys(CPUXtensaState *env, - uint32_t window, uint32_t phys, uint32_t n) -{ - assert(phys < env->config->nareg); - if (phys + n <=3D env->config->nareg) { - memcpy(env->regs + window, env->phys_regs + phys, - n * sizeof(uint32_t)); - } else { - uint32_t n1 =3D env->config->nareg - phys; - memcpy(env->regs + window, env->phys_regs + phys, - n1 * sizeof(uint32_t)); - memcpy(env->regs + window + n1, env->phys_regs, - (n - n1) * sizeof(uint32_t)); - } -} - -static void copy_phys_from_window(CPUXtensaState *env, - uint32_t phys, uint32_t window, uint32_t n) -{ - assert(phys < env->config->nareg); - if (phys + n <=3D env->config->nareg) { - memcpy(env->phys_regs + phys, env->regs + window, - n * sizeof(uint32_t)); - } else { - uint32_t n1 =3D env->config->nareg - phys; - memcpy(env->phys_regs + phys, env->regs + window, - n1 * sizeof(uint32_t)); - memcpy(env->phys_regs, env->regs + window + n1, - (n - n1) * sizeof(uint32_t)); - } -} - - -static inline unsigned windowbase_bound(unsigned a, const CPUXtensaState *= env) -{ - return a & (env->config->nareg / 4 - 1); -} - -static inline unsigned windowstart_bit(unsigned a, const CPUXtensaState *e= nv) -{ - return 1 << windowbase_bound(a, env); -} - -void xtensa_sync_window_from_phys(CPUXtensaState *env) -{ - copy_window_from_phys(env, 0, env->sregs[WINDOW_BASE] * 4, 16); -} - -void xtensa_sync_phys_from_window(CPUXtensaState *env) -{ - copy_phys_from_window(env, env->sregs[WINDOW_BASE] * 4, 0, 16); -} - -static void xtensa_rotate_window_abs(CPUXtensaState *env, uint32_t positio= n) -{ - xtensa_sync_phys_from_window(env); - env->sregs[WINDOW_BASE] =3D windowbase_bound(position, env); - xtensa_sync_window_from_phys(env); -} - -void xtensa_rotate_window(CPUXtensaState *env, uint32_t delta) -{ - xtensa_rotate_window_abs(env, env->sregs[WINDOW_BASE] + delta); -} - -void HELPER(wsr_windowbase)(CPUXtensaState *env, uint32_t v) -{ - xtensa_rotate_window_abs(env, v); -} - -void HELPER(entry)(CPUXtensaState *env, uint32_t pc, uint32_t s, uint32_t = imm) -{ - int callinc =3D (env->sregs[PS] & PS_CALLINC) >> PS_CALLINC_SHIFT; - - env->regs[(callinc << 2) | (s & 3)] =3D env->regs[s] - imm; - xtensa_rotate_window(env, callinc); - env->sregs[WINDOW_START] |=3D - windowstart_bit(env->sregs[WINDOW_BASE], env); -} - -void HELPER(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w) -{ - uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); - uint32_t windowstart =3D xtensa_replicate_windowstart(env) >> - (env->sregs[WINDOW_BASE] + 1); - uint32_t n =3D ctz32(windowstart) + 1; - - assert(n <=3D w); - - xtensa_rotate_window(env, n); - env->sregs[PS] =3D (env->sregs[PS] & ~PS_OWB) | - (windowbase << PS_OWB_SHIFT) | PS_EXCM; - env->sregs[EPC1] =3D env->pc =3D pc; - - switch (ctz32(windowstart >> n)) { - case 0: - HELPER(exception)(env, EXC_WINDOW_OVERFLOW4); - break; - case 1: - HELPER(exception)(env, EXC_WINDOW_OVERFLOW8); - break; - default: - HELPER(exception)(env, EXC_WINDOW_OVERFLOW12); - break; - } -} - -void HELPER(test_ill_retw)(CPUXtensaState *env, uint32_t pc) -{ - int n =3D (env->regs[0] >> 30) & 0x3; - int m =3D 0; - uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); - uint32_t windowstart =3D env->sregs[WINDOW_START]; - - if (windowstart & windowstart_bit(windowbase - 1, env)) { - m =3D 1; - } else if (windowstart & windowstart_bit(windowbase - 2, env)) { - m =3D 2; - } else if (windowstart & windowstart_bit(windowbase - 3, env)) { - m =3D 3; - } - - if (n =3D=3D 0 || (m !=3D 0 && m !=3D n)) { - qemu_log_mask(LOG_GUEST_ERROR, "Illegal retw instruction(pc =3D %0= 8x), " - "PS =3D %08x, m =3D %d, n =3D %d\n", - pc, env->sregs[PS], m, n); - HELPER(exception_cause)(env, pc, ILLEGAL_INSTRUCTION_CAUSE); - } -} - -void HELPER(test_underflow_retw)(CPUXtensaState *env, uint32_t pc) -{ - int n =3D (env->regs[0] >> 30) & 0x3; - - if (!(env->sregs[WINDOW_START] & - windowstart_bit(env->sregs[WINDOW_BASE] - n, env))) { - uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], = env); - - xtensa_rotate_window(env, -n); - /* window underflow */ - env->sregs[PS] =3D (env->sregs[PS] & ~PS_OWB) | - (windowbase << PS_OWB_SHIFT) | PS_EXCM; - env->sregs[EPC1] =3D env->pc =3D pc; - - if (n =3D=3D 1) { - HELPER(exception)(env, EXC_WINDOW_UNDERFLOW4); - } else if (n =3D=3D 2) { - HELPER(exception)(env, EXC_WINDOW_UNDERFLOW8); - } else if (n =3D=3D 3) { - HELPER(exception)(env, EXC_WINDOW_UNDERFLOW12); - } - } -} - -uint32_t HELPER(retw)(CPUXtensaState *env, uint32_t pc) -{ - int n =3D (env->regs[0] >> 30) & 0x3; - uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); - uint32_t ret_pc =3D (pc & 0xc0000000) | (env->regs[0] & 0x3fffffff); - - xtensa_rotate_window(env, -n); - env->sregs[WINDOW_START] &=3D ~windowstart_bit(windowbase, env); - return ret_pc; -} - -void HELPER(rotw)(CPUXtensaState *env, uint32_t imm4) -{ - xtensa_rotate_window(env, imm4); -} - -void xtensa_restore_owb(CPUXtensaState *env) -{ - xtensa_rotate_window_abs(env, (env->sregs[PS] & PS_OWB) >> PS_OWB_SHIF= T); -} - -void HELPER(restore_owb)(CPUXtensaState *env) -{ - xtensa_restore_owb(env); -} - -void HELPER(movsp)(CPUXtensaState *env, uint32_t pc) -{ - if ((env->sregs[WINDOW_START] & - (windowstart_bit(env->sregs[WINDOW_BASE] - 3, env) | - windowstart_bit(env->sregs[WINDOW_BASE] - 2, env) | - windowstart_bit(env->sregs[WINDOW_BASE] - 1, env))) =3D=3D 0)= { - HELPER(exception_cause)(env, pc, ALLOCA_CAUSE); - } -} - void HELPER(dump_state)(CPUXtensaState *env) { XtensaCPU *cpu =3D xtensa_env_get_cpu(env); diff --git a/target/xtensa/win_helper.c b/target/xtensa/win_helper.c new file mode 100644 index 000000000000..7d793d4f9cff --- /dev/null +++ b/target/xtensa/win_helper.c @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2011 - 2019, Max Filippov, Open Source and Linux Lab. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are = met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in t= he + * documentation and/or other materials provided with the distributi= on. + * * Neither the name of the Open Source and Linux Lab nor the + * names of its contributors may be used to endorse or promote produ= cts + * derived from this software without specific prior written permiss= ion. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS= IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, T= HE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURP= OSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMA= GES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERV= ICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED= AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR T= ORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE O= F THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "qemu/osdep.h" +#include "qemu/main-loop.h" +#include "cpu.h" +#include "exec/helper-proto.h" +#include "qemu/host-utils.h" +#include "exec/exec-all.h" + +static void copy_window_from_phys(CPUXtensaState *env, + uint32_t window, uint32_t phys, uint32_t= n) +{ + assert(phys < env->config->nareg); + if (phys + n <=3D env->config->nareg) { + memcpy(env->regs + window, env->phys_regs + phys, + n * sizeof(uint32_t)); + } else { + uint32_t n1 =3D env->config->nareg - phys; + memcpy(env->regs + window, env->phys_regs + phys, + n1 * sizeof(uint32_t)); + memcpy(env->regs + window + n1, env->phys_regs, + (n - n1) * sizeof(uint32_t)); + } +} + +static void copy_phys_from_window(CPUXtensaState *env, + uint32_t phys, uint32_t window, uint32_t= n) +{ + assert(phys < env->config->nareg); + if (phys + n <=3D env->config->nareg) { + memcpy(env->phys_regs + phys, env->regs + window, + n * sizeof(uint32_t)); + } else { + uint32_t n1 =3D env->config->nareg - phys; + memcpy(env->phys_regs + phys, env->regs + window, + n1 * sizeof(uint32_t)); + memcpy(env->phys_regs, env->regs + window + n1, + (n - n1) * sizeof(uint32_t)); + } +} + +static inline unsigned windowbase_bound(unsigned a, const CPUXtensaState *= env) +{ + return a & (env->config->nareg / 4 - 1); +} + +static inline unsigned windowstart_bit(unsigned a, const CPUXtensaState *e= nv) +{ + return 1 << windowbase_bound(a, env); +} + +void xtensa_sync_window_from_phys(CPUXtensaState *env) +{ + copy_window_from_phys(env, 0, env->sregs[WINDOW_BASE] * 4, 16); +} + +void xtensa_sync_phys_from_window(CPUXtensaState *env) +{ + copy_phys_from_window(env, env->sregs[WINDOW_BASE] * 4, 0, 16); +} + +static void xtensa_rotate_window_abs(CPUXtensaState *env, uint32_t positio= n) +{ + xtensa_sync_phys_from_window(env); + env->sregs[WINDOW_BASE] =3D windowbase_bound(position, env); + xtensa_sync_window_from_phys(env); +} + +void xtensa_rotate_window(CPUXtensaState *env, uint32_t delta) +{ + xtensa_rotate_window_abs(env, env->sregs[WINDOW_BASE] + delta); +} + +void HELPER(wsr_windowbase)(CPUXtensaState *env, uint32_t v) +{ + xtensa_rotate_window_abs(env, v); +} + +void HELPER(entry)(CPUXtensaState *env, uint32_t pc, uint32_t s, uint32_t = imm) +{ + int callinc =3D (env->sregs[PS] & PS_CALLINC) >> PS_CALLINC_SHIFT; + + env->regs[(callinc << 2) | (s & 3)] =3D env->regs[s] - imm; + xtensa_rotate_window(env, callinc); + env->sregs[WINDOW_START] |=3D + windowstart_bit(env->sregs[WINDOW_BASE], env); +} + +void HELPER(window_check)(CPUXtensaState *env, uint32_t pc, uint32_t w) +{ + uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); + uint32_t windowstart =3D xtensa_replicate_windowstart(env) >> + (env->sregs[WINDOW_BASE] + 1); + uint32_t n =3D ctz32(windowstart) + 1; + + assert(n <=3D w); + + xtensa_rotate_window(env, n); + env->sregs[PS] =3D (env->sregs[PS] & ~PS_OWB) | + (windowbase << PS_OWB_SHIFT) | PS_EXCM; + env->sregs[EPC1] =3D env->pc =3D pc; + + switch (ctz32(windowstart >> n)) { + case 0: + HELPER(exception)(env, EXC_WINDOW_OVERFLOW4); + break; + case 1: + HELPER(exception)(env, EXC_WINDOW_OVERFLOW8); + break; + default: + HELPER(exception)(env, EXC_WINDOW_OVERFLOW12); + break; + } +} + +void HELPER(test_ill_retw)(CPUXtensaState *env, uint32_t pc) +{ + int n =3D (env->regs[0] >> 30) & 0x3; + int m =3D 0; + uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); + uint32_t windowstart =3D env->sregs[WINDOW_START]; + + if (windowstart & windowstart_bit(windowbase - 1, env)) { + m =3D 1; + } else if (windowstart & windowstart_bit(windowbase - 2, env)) { + m =3D 2; + } else if (windowstart & windowstart_bit(windowbase - 3, env)) { + m =3D 3; + } + + if (n =3D=3D 0 || (m !=3D 0 && m !=3D n)) { + qemu_log_mask(LOG_GUEST_ERROR, "Illegal retw instruction(pc =3D %0= 8x), " + "PS =3D %08x, m =3D %d, n =3D %d\n", + pc, env->sregs[PS], m, n); + HELPER(exception_cause)(env, pc, ILLEGAL_INSTRUCTION_CAUSE); + } +} + +void HELPER(test_underflow_retw)(CPUXtensaState *env, uint32_t pc) +{ + int n =3D (env->regs[0] >> 30) & 0x3; + + if (!(env->sregs[WINDOW_START] & + windowstart_bit(env->sregs[WINDOW_BASE] - n, env))) { + uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], = env); + + xtensa_rotate_window(env, -n); + /* window underflow */ + env->sregs[PS] =3D (env->sregs[PS] & ~PS_OWB) | + (windowbase << PS_OWB_SHIFT) | PS_EXCM; + env->sregs[EPC1] =3D env->pc =3D pc; + + if (n =3D=3D 1) { + HELPER(exception)(env, EXC_WINDOW_UNDERFLOW4); + } else if (n =3D=3D 2) { + HELPER(exception)(env, EXC_WINDOW_UNDERFLOW8); + } else if (n =3D=3D 3) { + HELPER(exception)(env, EXC_WINDOW_UNDERFLOW12); + } + } +} + +uint32_t HELPER(retw)(CPUXtensaState *env, uint32_t pc) +{ + int n =3D (env->regs[0] >> 30) & 0x3; + uint32_t windowbase =3D windowbase_bound(env->sregs[WINDOW_BASE], env); + uint32_t ret_pc =3D (pc & 0xc0000000) | (env->regs[0] & 0x3fffffff); + + xtensa_rotate_window(env, -n); + env->sregs[WINDOW_START] &=3D ~windowstart_bit(windowbase, env); + return ret_pc; +} + +void HELPER(rotw)(CPUXtensaState *env, uint32_t imm4) +{ + xtensa_rotate_window(env, imm4); +} + +void xtensa_restore_owb(CPUXtensaState *env) +{ + xtensa_rotate_window_abs(env, (env->sregs[PS] & PS_OWB) >> PS_OWB_SHIF= T); +} + +void HELPER(restore_owb)(CPUXtensaState *env) +{ + xtensa_restore_owb(env); +} + +void HELPER(movsp)(CPUXtensaState *env, uint32_t pc) +{ + if ((env->sregs[WINDOW_START] & + (windowstart_bit(env->sregs[WINDOW_BASE] - 3, env) | + windowstart_bit(env->sregs[WINDOW_BASE] - 2, env) | + windowstart_bit(env->sregs[WINDOW_BASE] - 1, env))) =3D=3D 0) { + HELPER(exception_cause)(env, pc, ALLOCA_CAUSE); + } +} --=20 2.11.0