From patchwork Wed Jan 5 00:40:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530132 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f5c:0:0:0:0:0 with SMTP id l28csp279922imf; Tue, 4 Jan 2022 16:46:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzQ+mIKqO3579C/ia56yEbkLUzxAzFvl5/kY5bzJVoNpVzvXRNMaeJNgbKJlFFnl0mqWSD X-Received: by 2002:a25:c944:: with SMTP id z65mr65505672ybf.514.1641343561208; Tue, 04 Jan 2022 16:46:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641343561; cv=none; d=google.com; s=arc-20160816; b=AORP0Rs1TK7Nj23AYnxQQ6PE0wBfFXrRCcUUHFMyqqcI1CJBoslh4EpmIk0KF84UI7 +AbDwzAHli6OJSWCJpnVQdkxYew3JtsoG1zmram/OcdwisZ/SOknN3sBAeWqiPuaXcmH Df0Hly/g5Z+ZycuudCvNSRywBYYzT4tMJweltQNIRzjYdBIia4k2i50+XRBMYXMqCXIe 1AMjm6m799V3WuI+1gr0U8krWygSdkihjWsiYn8rqfLN3ZCp7r88mhsOSql5p19CuBbv yb4tjkdkO79cb7xoduHiJW00C8J1kpj8L/P/09KGIldukt7cFk5ROted46MkdkXHNfDF R8xg== 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=jM9WH4tZn+WozYyxodUMJ3vMf971E4f0f2uwJh5rJpw=; b=X/I2Ag7AtF1hFKrQS6DFfPYkjxu9+J16J7sKEaC6BpKG5JyRoWfGQIGW5C5QfdnMKA WEIRXHkHA9r9sigCHg2h0Q0LuN7yOAOxIrl2D8YIZsDtvOp4dOtMZEDtsEWGRPi0B2oc n2YHXfHSCiyudAx9wJOI+8Pv/+4m46AlBd9H+DQaRvvDlFsHxZBY2fYFYOpywz7KJyG7 g9LmWTIDtN6Dzx+sVyLotPorVZwnN9pTF9KYFiineGBfNeddPgppM0a8BVJPFnh+DR+6 snE7qyvndlUQpCeueoKGFM4LFKhFxjhfkxTj91rA6TMElA4bI/v/gKpP7PzGXaYfw3Xy M6xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HRHc4Wzo; 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 e3si36799768ybi.812.2022.01.04.16.46.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jan 2022 16:46:01 -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=fail header.i=@linaro.org header.s=google header.b=HRHc4Wzo; 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]:35110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4uRE-0005P4-HG for patch@linaro.org; Tue, 04 Jan 2022 19:46:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4uMP-0005Cv-Nn for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:02 -0500 Received: from [2607:f8b0:4864:20::629] (port=33649 helo=mail-pl1-x629.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4uML-0005ez-UW for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:00 -0500 Received: by mail-pl1-x629.google.com with SMTP id i6so22144134pla.0 for ; Tue, 04 Jan 2022 16:40:57 -0800 (PST) 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=jM9WH4tZn+WozYyxodUMJ3vMf971E4f0f2uwJh5rJpw=; b=HRHc4Wzo89vBt/A8Gkis1iMXeE7IqYzDzZBBsSC7Fsnojr7vLv6Zn/dNseocyy+Rjd hkfemKB08AXe/3HF1MWnGM/2e6qwYLklWtEQlJvhV3Ri4ukCyhqlXx1Mt+Z+yICtr3Ud 1Eup4cVgJaokud6g51p3JvQm25+zapUqDdJpSdWwT2zFDnpsYS1KaRCcYoh0948XYxQ9 DSbNbcTCP8hwdseI7pZhMXZhnYIC1QxbUKMgyo2lv7QAJmj49M9YNY+fOMBl3vAH47cC GLtEBLwKom1BIdelE6Qqyp4LToaTvhugrCBBcobYvhrqqlkkLsL+DP75SrFFggS5OQRN ivgg== 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=jM9WH4tZn+WozYyxodUMJ3vMf971E4f0f2uwJh5rJpw=; b=kEkztIJVcoWpm7+Xa27WOqVD1bLHMwXTdPLfSU3AypHAUM70Je3clPrTtaiWUaox32 W56Hsl+VmQuDC4AHDuIvjIQLcMMP9hdAtHxi0UmibklwGeuuO+K41nsYuw3U+zn88Zs6 oVMyGcodVgIW7iEd8fUE8oUtnuqfuMb6c0rNDKIOx8Qc0FGiaGGwrF/HrKFGc8gzdOGx OlKwKOFgP5wxla2BKZp16aOLcbkUrtZhO/qRSbADbTDuzsRDT8P6OTvi3rQ12k/MHFgB Fs1Jq7RPbwdl9PBRJz8pGzKDsGiGlq9VuvkUcdv2CVloopSs5wqBLk+yD4b0qip+bXQR EKBA== X-Gm-Message-State: AOAM530aljfAFqSMRgI0xKyKB8tUYzRMsoqKYV1qv/SuQnflovK+U8Ft u/9Ml6phJPXqpM28MB1Bbpyd6AoCJucqjw== X-Received: by 2002:a17:90b:20e:: with SMTP id fy14mr12859pjb.22.1641343256756; Tue, 04 Jan 2022 16:40:56 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id k3sm35312356pgq.54.2022.01.04.16.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 16:40:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/4] linux-user: Fix trivial build error on loongarch64 hosts Date: Tue, 4 Jan 2022 16:40:52 -0800 Message-Id: <20220105004054.587588-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220105004054.587588-1-richard.henderson@linaro.org> References: <20220105004054.587588-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::629 (failed) 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: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: WANG Xuerui , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Song Gao Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can only be part of a statement and a declaration is not a statement uint32_t sel = (insn >> 15) & 0b11111111111; ^~~~~~~~ We don't use the 'sel' variable more than once, so drop it. Meson output for the record: Host machine cpu family: loongarch64 Host machine cpu: loongarch64 C compiler for the host machine: cc (gcc 8.3.0 "cc (Loongnix 8.3.0-6.lnd.vec.27) 8.3.0") C linker for the host machine: cc ld.bfd 2.31.1-system Fixes: ad812c3bd65 ("linux-user: Implement CPU-specific signal handler for loongarch64 hosts") Reported-by: Song Gao Suggested-by: Song Gao Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20220104215027.2180972-1-f4bug@amsat.org> Signed-off-by: Richard Henderson --- linux-user/host/loongarch64/host-signal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user/host/loongarch64/host-signal.h b/linux-user/host/loongarch64/host-signal.h index 05e2c82371..7effa24251 100644 --- a/linux-user/host/loongarch64/host-signal.h +++ b/linux-user/host/loongarch64/host-signal.h @@ -54,9 +54,7 @@ static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) } break; case 0b001110: /* indexed, atomic, bounds-checking memory operations */ - uint32_t sel = (insn >> 15) & 0b11111111111; - - switch (sel) { + switch ((insn >> 15) & 0b11111111111) { case 0b00000100000: /* stx.b */ case 0b00000101000: /* stx.h */ case 0b00000110000: /* stx.w */