From patchwork Sun Dec 18 17:50:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 634969 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1924836pvb; Sun, 18 Dec 2022 09:51:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf4VpP1sdqKCRnTOxgtIaxqvYvra5b3Qg836DRX6uExPGD1pVC8E99SUnVFt5Wawn9Emuv0Q X-Received: by 2002:a0c:e514:0:b0:4c7:8f0f:f8b8 with SMTP id l20-20020a0ce514000000b004c78f0ff8b8mr56815822qvm.38.1671385869410; Sun, 18 Dec 2022 09:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671385869; cv=none; d=google.com; s=arc-20160816; b=s2QIpxvbj373xVRQJFWNQTSLw3IOr/I8IMM7U4XVxvmebKqR4s5XcIY6vlhh/WOGjW ZdQPvOfq9yOojuElksd6PyDBUV/81jfOT1UsgalvnnfrFdIJVhcu/dGFrcACpc+7T+3B xbn/fTmVZMncrXh/cd0pBuwFELffd8bvxEJjIqOVTmY++TRmJknq/FYBQz5p9ZR6zPr6 wD1Zr1a8FudWUuPEUXZVe2fgHl39Z2DBEVTxuValyQMPY6Bo5nBOK7XE682W1OT3KOrP cx7iL0p2LZ25g3nRiaIPtDTqMPv7xLIW3I+ycyS2H3mlZmHERXJgWje1Z8t63bbrQTEz oFaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ChM3sc+CzkwOQP5vDmtYYgkxWLAHmyAWfx0/hRvgZJM=; b=uuTyRWfemqXI8KXCgpK4PagOGHIgSr9ZNapTurbEf+066xYA2/ZPhZHeq/sJsmhUjQ Gx2iuWbNtBJfH9amLA15/i8ALLOvDGRqqXs8Zdq7mEKq1IiTZgGb/DiacmzcVblV9bIl l06iZsTZGsQUmi71ZH+fyShSEv1mNQpXGlkKwErvSYXBHUPC7lDGgyK7oSLp1flQFls7 g8lJ694HcwTmocdpuEZvdmooP7xBP2q5WxQDm9VI62+oXUQ410IwvDBDZasrd5p+Bno8 OKjrbAgU329IV1KWd5CYgEKlyvPkJ56sa9yafrnoOdTV3w0TpuBTupJ2ZncCJMdJie6Z x3CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUTDnrC1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q9-20020ad45749000000b004c692566ec5si1370325qvx.167.2022.12.18.09.51.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Dec 2022 09:51:09 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUTDnrC1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6xoA-0007R3-IK; Sun, 18 Dec 2022 12:50:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6xo8-0007Q7-SJ for qemu-devel@nongnu.org; Sun, 18 Dec 2022 12:50:40 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6xo7-0000L4-BU for qemu-devel@nongnu.org; Sun, 18 Dec 2022 12:50:40 -0500 Received: by mail-pl1-x629.google.com with SMTP id a9so6983527pld.7 for ; Sun, 18 Dec 2022 09:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ChM3sc+CzkwOQP5vDmtYYgkxWLAHmyAWfx0/hRvgZJM=; b=aUTDnrC1x//mLA6hkNfbMg8ksldr4oU22bQtO0rpFjQKuWxfHvchU8EkjAU958j1oR 0NSP3F9MrVaCV04v2F09lG198oOz3pMAjBrIeHs/ZmQUnwiQQkEt2nbP1bNWCHzo/fHm ghxnNqkI5IQXnhHdQY6RIjf2geIzfggR/7WdKWP2neD1rsIV0YKoN+zcpwOcY4vlFyhb HKQrWnlJUBSgrRDAhukIYLRigo3KB9zG0GRJvdbCl6LcUJUF5DAANcRsjusWwMHR3qQQ FghiZRdF8JHsqbKfHsL1nFQAbaDI2cbKBqZ3w+Vn/hgyTvgd8/gSgNYeGSaJjGyKYRHo bnZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ChM3sc+CzkwOQP5vDmtYYgkxWLAHmyAWfx0/hRvgZJM=; b=wyzGZ2cZXDeY70D7rT3/VCLe54IpL2B7t4eitjMENIi6Z3FDklW5Ht8Age3LWxYR5X NCfRJATXFAEjrOgSihnB0n2rM+d9GAx14mw6x6Y5nMEZgN+BRLr9PKGUzUwTAvbbRAOe t+2vbGOOUvULCD1vTttbtgSTisyuLLP77yoxnir5oFUEYManXYLRjtxEV9WxJcudknjf F0LSbaVwOXA6nubxso3m/bBvaKRC9fw+oaJehqNNpl4zGzJtBrlaHKhBYEmKiM3aEgRA ZoC4QumI5bAFucytSr/3r5b2PBnOYhD+Vq5XNMy4ddiFabWBITv46biIwcxKhuL0/od1 AASg== X-Gm-Message-State: ANoB5pmOHuoc8YX1Vo17yOVchYBADZMX1yOHdwHgnx2gpXMbMHYkQEjE 9mJckV8uyFeIqR0poG2rzmlLN3Vu3VQV5Lbu X-Received: by 2002:a17:903:2481:b0:189:b0ff:e316 with SMTP id p1-20020a170903248100b00189b0ffe316mr37262655plw.38.1671385837906; Sun, 18 Dec 2022 09:50:37 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:3808:f064:41b8:eb9e]) by smtp.gmail.com with ESMTPSA id n9-20020a170902d2c900b00176b84eb29asm5318837plc.301.2022.12.18.09.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 09:50:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Guenter Roeck , qemu-stable@nongnu.org Subject: [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags Date: Sun, 18 Dec 2022 09:50:34 -0800 Message-Id: <20221218175035.449904-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221218175035.449904-1-richard.henderson@linaro.org> References: <20221218175035.449904-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Guenter Roeck The values in env->flags are a subset of tb->flags. Restore only the bits that belong. Cc: qemu-stable@nongnu.org Fixes: ab419fd8a035 ("target/sh4: Fix TB_FLAG_UNALIGN") Signed-off-by: Guenter Roeck Message-ID: <20221212011345.GA2235238@roeck-us.net> [rth: Reduce to only the the superh_cpu_synchronize_from_tb change] Signed-off-by: Richard Henderson --- target/sh4/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 951eb6b9c8..f0934b20fa 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -47,7 +47,7 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs, SuperHCPU *cpu = SUPERH_CPU(cs); cpu->env.pc = tb_pc(tb); - cpu->env.flags = tb->flags; + cpu->env.flags = tb->flags & TB_FLAG_ENVFLAGS_MASK; } static void superh_restore_state_to_opc(CPUState *cs, From patchwork Sun Dec 18 17:50:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 634970 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1924886pvb; Sun, 18 Dec 2022 09:51:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4rdUocue5R56f4ggUHV2vuiyEkJzsryhUEC4w5LEnqXuvc+xgnnZ9atqyiF+Nrw9jtDtvY X-Received: by 2002:a05:622a:5c10:b0:3a8:287c:8aa9 with SMTP id gd16-20020a05622a5c1000b003a8287c8aa9mr34310482qtb.31.1671385884810; Sun, 18 Dec 2022 09:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671385884; cv=none; d=google.com; s=arc-20160816; b=pjn35E4JpeN2LCKULmluACP6PrdlQoRHj7wIipj3IPzvrfQ236o7ITNXyHB0O7ZF+/ 4u48L3nDW8k4DCknXpBgM2aHJXwVmT4tNv6NVsoO70eFDyUTkZEQ6oMcBMjcTPOcc08S jdcavmjsn+r2Pzh3dqZpS/2Kq1Wow2u1k0Knt0bdfzRidVw/MvobpjnRQK6xWELGCuzN q2/8N0oAFPinjsHS2b13ICT0BJTPA8qHaeGAumiJ8W2MgzZiuqM4U6pVZFCFJJtD8jbv Ep37cveC2Atj81uyexJ1LXGh9IB+cb6Kuas6wR26qNDA34vzzk8AZ0iHBbLBG2GgGTn/ OTcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h5VmXk62ylG0x2kw8eeCrfeTg9zdaLaKYI3gkMyaAsI=; b=I6rnhgh9VObAVqqvbICHUfMyEv7bstRTnSPBBXrr2kL5wvQFQZyakkDqhSYbn3D0MU xBshc8mZjToGCyFLaHhO8nYE66MVyGh4rnH3Y6P2dBPVgGv8i9GZVVSHv1ZS7tUnf/hX pjqpLp9mlRK+O+9zoChbLqn0SAFP8aHyXPSNmdqS8f4By+inAHIqsWVmh5rPzQraTinp yXa7zWnPwylJF39W9lEtX/KQVF4xejWW7kPQKbQi/yOaVaFZhcSzbkMG/FJajNrXBMdg JeszH06m+40wBrqO6UHOY4aMNIHyB8f68z8zdVwnx1DOSeX4JUFBkEmtMLqkmYqVufBW 0+Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u+Oeh66M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u9-20020a05620a430900b006fab918423dsi3260926qko.584.2022.12.18.09.51.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Dec 2022 09:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u+Oeh66M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6xoB-0007SM-Jo; Sun, 18 Dec 2022 12:50:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6xoA-0007Qt-Ba for qemu-devel@nongnu.org; Sun, 18 Dec 2022 12:50:42 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6xo8-0000Lm-5B for qemu-devel@nongnu.org; Sun, 18 Dec 2022 12:50:42 -0500 Received: by mail-pl1-x62f.google.com with SMTP id d3so6967099plr.10 for ; Sun, 18 Dec 2022 09:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h5VmXk62ylG0x2kw8eeCrfeTg9zdaLaKYI3gkMyaAsI=; b=u+Oeh66MXglvKNCFiCuNaeItHcCiSCE+MSZwJzwZjAqqJdgnKTmFJOYQ3RBPVUJuxg 57sv2CXliYcJlr0U6Zpy+JVwSPalANH2JhAqk/eY0pYdAjQQLaUv6L43/z5IY4idMeK/ xSvTWjWKw2PCELAbCOVLxq9iddGG38F9ThIf4fN/Wrsve8VoKkAQVpRcWQWxWFrrlZAE fifCnYsQDI/asdE9Wtt+3fQukXaGbb0nXSikT5Vjlryy5qNOmNg7YDHt2giD/oSMf9Dd nm6gawvHU9q+PVzCSiI1R2AZSyUzlkxg7ZkHzPCHmKA1TtFTDs4Qa31Q6u9YheYYkdwm rwnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h5VmXk62ylG0x2kw8eeCrfeTg9zdaLaKYI3gkMyaAsI=; b=VAc60Uo9+yiUFiSqtAF9Klz3vFzufLuMjnHVYz3xEnPb6L/Wd7OyGHmEcXAWwVhElI X+oVGNzj3uXeWoJOlk5XMXO53g6y8YZm6LMI/3cEpLQiJ2BfTlTw3f+L9I+50UsXyc2Y F70V0RX9+ckOY6dAww2TJK3ftseegVqxDfmfngbd+qaAwwDE9KNVIUmJI6t+a4eRDRyn pw85UCUXXjwvKj5IzWP3QQ7i1d6Sa6FdSriKesni9rSsiagOKbuEMUMKXqV611/9Y9Nz ZQcvo1PNPdiQFy6u0w2Vp3aE+ps8lKy4fwRSc051lrRX0fuT0ztDFepbM03wDuynRfiy 6JjA== X-Gm-Message-State: ANoB5plQFicDYJzgfut+FKtiKQ0LUEykH1TgJGt75w7ju7j1M9+z72ry vuxa4dkLswfaow4VMFqR1nk00DD4rjm5nWMy X-Received: by 2002:a17:903:264b:b0:189:ec62:3b2d with SMTP id je11-20020a170903264b00b00189ec623b2dmr42081235plb.4.1671385838887; Sun, 18 Dec 2022 09:50:38 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:3808:f064:41b8:eb9e]) by smtp.gmail.com with ESMTPSA id n9-20020a170902d2c900b00176b84eb29asm5318837plc.301.2022.12.18.09.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 09:50:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 2/2] target/tricore: Fix gdbstub write to address registers Date: Sun, 18 Dec 2022 09:50:35 -0800 Message-Id: <20221218175035.449904-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221218175035.449904-1-richard.henderson@linaro.org> References: <20221218175035.449904-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Typo had double-writes to data registers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/tricore/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/gdbstub.c b/target/tricore/gdbstub.c index ebf32defde..3a27a7e65d 100644 --- a/target/tricore/gdbstub.c +++ b/target/tricore/gdbstub.c @@ -130,7 +130,7 @@ int tricore_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) if (n < 16) { /* data registers */ env->gpr_d[n] = tmp; } else if (n < 32) { /* address registers */ - env->gpr_d[n - 16] = tmp; + env->gpr_a[n - 16] = tmp; } else { tricore_cpu_gdb_write_csfr(env, n, tmp); }