Message ID | 20220421151735.31996-65-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp575123map; Thu, 21 Apr 2022 09:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznivCsiMlfodvwS2mmy4jBe+X8NpSBWQkomo5OmN03YLv4C4lVvXzYqHk6OF7HBE2CSL5Z X-Received: by 2002:a81:5356:0:b0:2f4:e375:87dd with SMTP id h83-20020a815356000000b002f4e37587ddmr340077ywb.259.1650557517712; Thu, 21 Apr 2022 09:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650557517; cv=none; d=google.com; s=arc-20160816; b=ItBd2ubsQ2zhhh0ukZPQEWNHNS3gPOZT7uIblbm/LHS02QImE00tYt6ZoF+na1kB4E 3fPoxzDNkHuQv9H2M6L9RGZlyBag0txJ0qzlEh2PiruwhZebBhk0OjcQ9Cexi7Wyhp/w QhYeLun0+s7wwPvSC3lyuBMH/ZFcGScGccYL89r+ky7/NGvllyBieqC36E8xHq55549T 5Xaxk6e/tc5B4gQEv53avZA9IBeFYBlCRODPGzc0VQGZ+JKd305El0adDhVi+w11TPT1 HKM2zKyHYlVs/QJff0tj8ndPpE5HjrgZEInzVwLk5qLjdPQq7crXQ6h+OKgOcYcBkOHU dxPQ== 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=HwV7h+cRAVlBMNxIV8xTU8C+Bl+pxTzWQ3OYqttL/GI=; b=AySM8+3HG0bxFwgOi9M0sqZLPz/i7N6rmKo4fiok62KHkEw8kBKapGoUnIXub5ZaL2 r6u8wG2qBKfdk2PJcWVVTii7xaKdfYITBFK2059xJ4jTQZmYIRI4ZmNCGWoJjRpJBk3t 9ksN82xcNKufNR/n65+7GPu6MYMFcfzYGPbPbBnlm6ajT6ODkIJDNtNXJOia34PUycm3 i8WUJz+nyfLBW/hv8WnyR8GJTtnGEnCOwFQjq0Gr2afg3tgT7uQQfnGJrSbmvLa/fulI 9orW0aQJ9oaKyebUOX0pX4jU+tDkutUAp5OC8mBClCpD3czkup6vKIaDZ2T1Dbjc4ZrB 0bDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BxM1FJlm; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y193-20020a814bca000000b002f1a7cbf3c5si2702322ywa.57.2022.04.21.09.11.57 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 09:11:57 -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=pass header.i=@linaro.org header.s=google header.b=BxM1FJlm; 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]:33594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nhZPR-000698-7X for patch@linaro.org; Thu, 21 Apr 2022 12:11:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhYdO-0005o8-Qp for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:22:20 -0400 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:39701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhYdN-0007HX-9n for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:22:18 -0400 Received: by mail-il1-x134.google.com with SMTP id d4so3252713iln.6 for <qemu-devel@nongnu.org>; Thu, 21 Apr 2022 08:22:15 -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=HwV7h+cRAVlBMNxIV8xTU8C+Bl+pxTzWQ3OYqttL/GI=; b=BxM1FJlmscGPBFByibhZl9u4CzIDwgUxyuZ4L5GOUD0qroCyt8FJx6C1FG1evk/Bym F77PJvl+8TEwYxvAr2Io8aLl6mAVFmbTh6RZROD1Xt2CvYcUGNUgZ1acE+qBx5sod3uD qvau20IPis07qoW8IOS0KQ4lxViXY+fitpHwsqYnl0u3wuLb55UBiN6mE7uZbUgk+wqc 7zdTnjdO0KabK5qnRmGyhrsG3Hu51eSCtN+uk+r5uj6D9jNMxvdB7eFhO8yAGHQkoSY+ IRNOFIy82WBHGWFujyYlHS/bC+sS5rDt0s7vJ5LiQIzQb3IJnKx+vh88bPZD/pn/joIQ LvSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HwV7h+cRAVlBMNxIV8xTU8C+Bl+pxTzWQ3OYqttL/GI=; b=lg3E5UHyFEGWQWxcG8gy1VEz1Vw+5FlnVVtKM9O+Ne2T8GC9Rem9VrOMcm1zlUSvVN WFGQEgvly3AsaZfYQ6YvnO8T7WJaSAPsRNXQG+ytR0/nw3LU0S3/NIPXYUqrDkdXsWrN ngsjZaTqGdqzs0gu+USlivGce+xVKvoqYZvqYJZMPouTiVfqDnCCgI2ybUv+KWy7J93g 199ve5RbWtAdqIWpp7hr4UEA1sKlV2CGvqbs0V3IMb0E1KBd3OZ5H6wxwSFaY+P3cV+f s4vQhRrv0BA2yxFaBBi3iPQKR78797s1wjwvFiQNaDw0iubKB/ws1qM4bMzM8qIpnoAt 5Dhg== X-Gm-Message-State: AOAM533ay8GWzNIO35AjeMXpsV58FMibj+ubweRRZYFNoq1B8o5oBMLV z+BDOxLx5p2DvS6lUl1B3Q7wczjHo6Cg7g== X-Received: by 2002:a05:6e02:1a6b:b0:2cc:1eef:9c8c with SMTP id w11-20020a056e021a6b00b002cc1eef9c8cmr89733ilv.256.1650554534952; Thu, 21 Apr 2022 08:22:14 -0700 (PDT) Received: from stoup.. ([2607:fb90:80c8:6cf3:a91a:4957:ba18:ac18]) by smtp.gmail.com with ESMTPSA id j1-20020a926e01000000b002cc52449a19sm3985402ilc.35.2022.04.21.08.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 08:22:13 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v7 64/64] tests/tcg/nios2: Add test-shadow-1 Date: Thu, 21 Apr 2022 08:17:35 -0700 Message-Id: <20220421151735.31996-65-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220421151735.31996-1-richard.henderson@linaro.org> References: <20220421151735.31996-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::134; envelope-from=richard.henderson@linaro.org; helo=mail-il1-x134.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, T_SCC_BODY_TEXT_LINE=-0.01 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
nios2 fixes, cleanups, shadow reg sets
|
expand
|
On Thu, 21 Apr 2022 at 17:13, Richard Henderson <richard.henderson@linaro.org> wrote: > > Add a regression test for tcg indirect global lowering. > > This appeared with nios2, with cps != 0, so that we use > indirection into the shadow register set. An indirect > call verifies alignment of rA. The use of rA was live > across the brcond leading to a tcg_debug_assert failure. > > Cc: Alex Bennée <alex.bennee@linaro.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > +/* > + * Regresion test for TCG indirect global lowering. "Regression". Also, file is missing copyright/license header comment. Otherwise Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/tests/tcg/nios2/Makefile.softmmu-target b/tests/tcg/nios2/Makefile.softmmu-target index 70664db81c..b5f6a08848 100644 --- a/tests/tcg/nios2/Makefile.softmmu-target +++ b/tests/tcg/nios2/Makefile.softmmu-target @@ -27,3 +27,4 @@ QEMU_OPTS = -M 10m50-ghrd,vic=on -semihosting >$@.out -kernel memory: CFLAGS+=-DCHECK_UNALIGNED=0 TESTS += $(MULTIARCH_TESTS) +TESTS += test-shadow-1 diff --git a/tests/tcg/nios2/test-shadow-1.S b/tests/tcg/nios2/test-shadow-1.S new file mode 100644 index 0000000000..33076ddf59 --- /dev/null +++ b/tests/tcg/nios2/test-shadow-1.S @@ -0,0 +1,37 @@ +/* + * Regresion test for TCG indirect global lowering. + */ + +#include "semicall.h" + + .text + .set noat + .align 2 + .globl main + .type main, @function + +main: + /* Initialize r0 in shadow register set 1. */ + movhi at, 1 /* PRS=1, CRS=0, RSIE=0, PIE=0 */ + wrctl status, at + wrprs zero, zero + + /* Change current register set to 1. */ + movi at, 1 << 10 /* PRS=0, CRS=1, RSIE=0, PIE=0 */ + wrctl estatus, at + movia ea, 1f + eret + + /* Load address for callr, then end TB. */ +1: movia at, 3f + br 2f + + /* Test case! TCG abort on indirect lowering across brcond. */ +2: callr at + + /* exit(0) */ +3: movi r4, HOSTED_EXIT + movi r5, 0 + semihosting_call + + .size main, . - main
Add a regression test for tcg indirect global lowering. This appeared with nios2, with cps != 0, so that we use indirection into the shadow register set. An indirect call verifies alignment of rA. The use of rA was live across the brcond leading to a tcg_debug_assert failure. Cc: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tests/tcg/nios2/Makefile.softmmu-target | 1 + tests/tcg/nios2/test-shadow-1.S | 37 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/tcg/nios2/test-shadow-1.S