From patchwork Tue Feb 19 06:11:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10819291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1E7214E1 for ; Tue, 19 Feb 2019 06:22:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF8602B50F for ; Tue, 19 Feb 2019 06:22:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A37172B541; Tue, 19 Feb 2019 06:22:25 +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=-2.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 563502B50F for ; Tue, 19 Feb 2019 06:22:25 +0000 (UTC) Received: from localhost ([127.0.0.1]:42470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvynQ-0004cy-It for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Feb 2019 01:22:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvydy-0005Y1-NZ for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvydx-0007C9-Mq for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:38 -0500 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:43649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvydx-00076U-D5 for qemu-devel@nongnu.org; Tue, 19 Feb 2019 01:12:37 -0500 Received: by mail-lj1-x232.google.com with SMTP id z20so15355527ljj.10 for ; Mon, 18 Feb 2019 22:12:24 -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=mOA2OStR2b0TuIp3wIM4SBsbXXalpk2VVvZssmmK/XM=; b=UTIdFOnFuyyaA9B3JWjKrCCaD5a5PvlPmc6Fd1eN5ifblmjC57RPIFIG4zKnupuPiK dpd893DFvHxNgSjWJHKMqjrH1Z6YvC1PB4tdIY/O+FQ0EH2CF234qhBf4EMz6Xml091h 6UjsEJ7tWC8dWjaTSfWtiN6Ek33+ME9KpIqQyUW+hz1PnfQc4gskMNtA9VA0IuVeLKpw sC2NMROLbuC4A1rKp5AE20zWK0bPvO5umM4p8Cqi/Y2IfyICYdlvF3Skf2EMhSkhDfEx R+cCc2dDCqHl3mVxqx5aSxKLH5snYRHwKwDFKV0VRP6q3oBnisl6RyiJOiGFGVZrO2ju 7fIA== 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=mOA2OStR2b0TuIp3wIM4SBsbXXalpk2VVvZssmmK/XM=; b=uelXT+mzWbW39dRCByVNZu2phpiP4ZAkkrLafnGCoJF1tfO58mpDR18y4fky4johzp h3Vt0U+oaZjZnNbbTf4WRTjFDyzgu1bNNZ7xr/GoEDz7KznLSI64+2adizsb+GNtc+WL oE+KyFQtD94f/Ti8lo0hbK2m40100OPWqcf57TdGZiiGKsVg8fHVUHBjows/lQnRDuK/ OQWlLMhIjJ6gt40zRTYMv0f+bZ8qC4NAGYNOgRjCSg/ZZPyTH4SY/Ixz35urXTkngx1U zT2bbuohi1kk7peDaZ7d6Z/Y5KgEzHjfYqMGoJFCr0GLs3h43LIiE/r5HN4cpfWdt8I3 X7iA== X-Gm-Message-State: AHQUAuY3SVZ8e6vOTAeGupuGzLfzr+g6bad6+Aty+dnhRl6UVizpYl4p 8gPAYHix5MWjQ8FU9gvAHY+qotJXGIw= X-Google-Smtp-Source: AHgI3IaX2aKG/wyxZscopY/gKpt1rHJVHcYhAAVdL29T8u2Stjy9fwc7mGDftVBGl3EPj688Qgffug== X-Received: by 2002:a2e:5306:: with SMTP id h6-v6mr15744525ljb.67.1550556743105; Mon, 18 Feb 2019 22:12: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 f16-v6sm4235745lji.88.2019.02.18.22.12.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 22:12:22 -0800 (PST) From: Max Filippov To: qemu-devel@nongnu.org Date: Mon, 18 Feb 2019 22:11:02 -0800 Message-Id: <20190219061111.10231-15-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190219061111.10231-1-jcmvbkbc@gmail.com> References: <20190219061111.10231-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::232 Subject: [Qemu-devel] [PATCH 14/23] tests/tcg/xtensa: fix SR tests for big endian configs 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP SR tests generate instructions that the assembler does not recognize and thus must take care about configuration endianness. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_sr.S | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/tcg/xtensa/test_sr.S b/tests/tcg/xtensa/test_sr.S index e64653b8771e..b1a91a0637ee 100644 --- a/tests/tcg/xtensa/test_sr.S +++ b/tests/tcg/xtensa/test_sr.S @@ -2,11 +2,23 @@ test_suite sr +#if XCHAL_HAVE_BE +#define LOW__SR 0x04 +#define HI_RSR 0x30 +#define HI_WSR 0x31 +#define HI_XSR 0x16 +#else +#define LOW__SR 0x40 +#define HI_RSR 0x03 +#define HI_WSR 0x13 +#define HI_XSR 0x61 +#endif + .macro sr_op sym, op_sym, op_byte, sr .if \sym \op_sym a4, \sr .else - .byte 0x40, \sr, \op_byte + .byte LOW__SR, \sr, \op_byte .endif .endm @@ -32,9 +44,9 @@ test_suite sr .macro test_sr_mask sr, sym, mask test \sr - test_sr_op \sym, \mask & 1, rsr, 0x03, \sr - test_sr_op \sym, \mask & 2, wsr, 0x13, \sr - test_sr_op \sym, \mask & 4, xsr, 0x61, \sr + test_sr_op \sym, \mask & 1, rsr, HI_RSR, \sr + test_sr_op \sym, \mask & 2, wsr, HI_WSR, \sr + test_sr_op \sym, \mask & 4, xsr, HI_XSR, \sr test_end .endm