From patchwork Mon Aug 31 16:05:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 248817 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3462650ilg; Mon, 31 Aug 2020 09:35:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDceoiwBKuYVJtnZSB/qn6zToXTJBGpDQNHSG5hyZj9dG2M2JFF2+eGo5ESot8Xg1O1ejJ X-Received: by 2002:a25:4055:: with SMTP id n82mr3073373yba.168.1598891728184; Mon, 31 Aug 2020 09:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598891728; cv=none; d=google.com; s=arc-20160816; b=JFYBgOguxpS2GqWdlXVF+hkllgEgdnAgYNAdwRFcgruRIb65TsP9JAuhut60wjBxWC xjnkS3RvzyGAYcrc0mV5NtfrYUtKSemsALKo4eJuj2kcmFjBqw+rRq1257AVPWwgVvr+ WLCxZ6zqTPGCb+HJdygoNBxyK71bfrXVEUgVhsDZwKPLVCCNvSqB14zUO3hBl2dgx7v5 0bVZyrnmimzyVHJlTdOLdlgcx9BRbcE/mObL2C94dj6RvBL9IkQyIFdy/hIUgOk5SEY2 g07qIaVIuqGaAeTS22mYJmuJorVLB9XNyfVLdBkLmB3NkAr3ZFXpUh8+38jWEgL3jj+l M7PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=NFMrG515781fPkhuV8GqRES+jyHXpSFNJfiQ1prWFi4=; b=0bTA1/soaE4myTtF27JYQurDVjrgHN9ODSDGgN+0Rs7oU1kpm4ur3BzHfJybdkyYSj bWT+4tv44yxYjKzVE5lGBq3iPkPhjQ6DUOM8NbEjv5dA4kL57jSehslURQvi675Vv7+f z+JxSTuKOkbKkOTsYMTddNvqk1BWkkZQWb4dstbd7utkN3EynpndQzzpEhhJByKdcWZa N+mccjQBEG5YX3KGdSFsobBtLjDPAi3KKnnp8vpZbMQ0JFsceZhEU3ylt+d8T8BBEbeM 2NidmqVPNqxyK6BTHZl/4HqLOY+JXLa7NdfwGIBF2CAI82fDJ3FmB4oaBUC/LW/MT2KN cVAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Eq2G/QjM"; 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=fail (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 125si8779392ybk.264.2020.08.31.09.35.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Aug 2020 09:35:28 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b="Eq2G/QjM"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCmmF-0004os-LF for patch@linaro.org; Mon, 31 Aug 2020 12:35:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCmLS-0006sj-R1 for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:07:46 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCmLR-0006Bh-3m for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:07:46 -0400 Received: by mail-pl1-x642.google.com with SMTP id k13so3225923plk.13 for ; Mon, 31 Aug 2020 09:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NFMrG515781fPkhuV8GqRES+jyHXpSFNJfiQ1prWFi4=; b=Eq2G/QjMwh1Lud9/DfzphAKW/OOoMT9096Ls4XhI0plD82Ti/L9FE6SxHlUEzXllmo OAZqmCFsmiFpU3PTjLwvduWtSMh4gxca9SPyA6Qastx2hZgkgFF2KO03ybOMCKxNO+xM w4hQ/YaBPYADuNKL962McDeBV9+bnNjt4V8R7uGv3uUWNL8GZgPVu7SgAzSPV41fdDP2 LDs69udQczV0lIic5dEWKggEE4cWkd/G+Nt5tkYHz6rjueBbQcX1a1oQxB9+epP3YOwF TXMQCgd+7UQOzrljVY4co3dQbGKuB4kdxw0whpm3FRIYBdS6OJ6XmnAE+9DlKMiVHa74 0vqA== 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:mime-version:content-transfer-encoding; bh=NFMrG515781fPkhuV8GqRES+jyHXpSFNJfiQ1prWFi4=; b=nUS0oTFDaWVNTH52Ut4x5kmKD+u84mVX37HmZnLzyhSVess2SAaAy/KveS4RjHqbNy RLvSpt1erv9KFyM4YqgeOZiE3QssikgEUH2qlkeuS24pamwqq9nTuKThvyOdCCdwMg0i waQC4pXcifd3UpAJn4IE0J98c7x4FhptEzfKHHBP5/Jg9KPRecbMb7v4KAyMRuQJnzj6 UC/TnGMVRPqbINnxiQdxlCh4ta5Xam7imabZBAtoGkCSHuMK+cnym5GT1DUFcO1QOneO X/sk666TX7Jx6fOGcfM3Wg8Ki4JLPYaHyTJDopo6tLQQ2C1nKy0DTGXt1mJVCHCL9Mo/ a5jw== X-Gm-Message-State: AOAM5308vdKXFhVTXNpDFeqe5+79L7PdVm8YF7fzAOarw9ROx67W/zH1 YSevufG6bav+ofiR6tBl7KSjF4v5RqnLmA== X-Received: by 2002:a17:90a:2b88:: with SMTP id u8mr76295pjd.37.1598890063437; Mon, 31 Aug 2020 09:07:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id gt13sm17218pjb.43.2020.08.31.09.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 09:07:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 74/76] target/microblaze: Remove cpu_R[0] Date: Mon, 31 Aug 2020 09:05:59 -0700 Message-Id: <20200831160601.833692-75-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831160601.833692-1-richard.henderson@linaro.org> References: <20200831160601.833692-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not initialize cpu_R[0], as this should be totally unused. The cpu_for_read and cpu_for_write functions use a local temp. Tested-by: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 8f69ca50b2..8c287457a9 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1842,7 +1842,13 @@ void mb_tcg_init(void) static const struct { TCGv_i32 *var; int ofs; char name[8]; } i32s[] = { - R(0), R(1), R(2), R(3), R(4), R(5), R(6), R(7), + /* + * Note that r0 is handled specially in reg_for_read + * and reg_for_write. Nothing should touch cpu_R[0]. + * Leave that element NULL, which will assert quickly + * inside the tcg generator functions. + */ + R(1), R(2), R(3), R(4), R(5), R(6), R(7), R(8), R(9), R(10), R(11), R(12), R(13), R(14), R(15), R(16), R(17), R(18), R(19), R(20), R(21), R(22), R(23), R(24), R(25), R(26), R(27), R(28), R(29), R(30), R(31),