From nobody Mon Apr 29 10:06:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1641343936; cv=none; d=zohomail.com; s=zohoarc; b=cIwUQGFPLmyjcGym63k5bPYPy0U4YmvXoVl0HyUBz7GqLjqFePj50e/AhVNm1+QW4YZV4yj36R6MtDd+dhuSUNzutKarbYK4sHaGX816BVtK/8P1SDPI4JeLzxbmGPd6LEfzW2JwXsVVlUPyZ3X/c0nalFIknmnr2pZnZ1vAcA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641343936; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5JjYgAjXn1kQxSGxYgLEIz1R3XcGictv5Sz0+SPB7Hc=; b=kFWnbw/+rx8gZyyQMJkpHNaoXEyOJCH0M63eKW1qvlRwRbbYAxWTCJHdpGbrKGLaLv0lEQVkvWxhHD+73wQ9e6b11aojGLAd39CbsFT/de0uG9non4LHu0Gl90zjp6NbMlC/hNl61nEEWoRoCDDzvQfp393uoEF9qqHMoHPilRM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641343936151690.5702136476103; Tue, 4 Jan 2022 16:52:16 -0800 (PST) Received: from localhost ([::1]:44292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4uXG-0003T2-NE for importer@patchew.org; Tue, 04 Jan 2022 19:52:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4uMW-0005Eb-Ls for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:12 -0500 Received: from [2607:f8b0:4864:20::1034] (port=45886 helo=mail-pj1-x1034.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-0005eu-Em for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:08 -0500 Received: by mail-pj1-x1034.google.com with SMTP id l16-20020a17090a409000b001b2e9628c9cso4785087pjg.4 for ; Tue, 04 Jan 2022 16:40:57 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 16:40:55 -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=5JjYgAjXn1kQxSGxYgLEIz1R3XcGictv5Sz0+SPB7Hc=; b=okq8YPLpf8gr+v1HLphYVdWkyNhpTaBGTZXgSz5MxC7wkCPXN9QKxAEvI0ILgxOoqF yYBHSd7k3HMVqptvHqGViuDD/ByRXTlT9A7fw4rIDbF76u6rkM6fhZ4U+xSwkckzvHxF lb3QR6CNAcO1FscanxVPCVT7xP0zYmmkG+gOq6A6VPmeUSgRKFpnN8hDxOVQTpn9vfdK qorZAG62A4Tu8sTpgxIwlEogZxpIU6qWArXRR3zErc0RPlcyqqlTQuz1gyEuOR5kANm/ HYe9KMhj/Q+TEImj37F3Gf4owjqA2uav7CzDJYHJ6X2fhlnRPqr5RB/IzBRvj9fs5mro 7Iyw== 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=5JjYgAjXn1kQxSGxYgLEIz1R3XcGictv5Sz0+SPB7Hc=; b=upy/0BgbksnmMhbLn2VgypWGMtt6ePIHItMilA2uLSBqVWbcDW1I7xOkrDP6yKtbs8 +WJtDyNoCOx/rrORDmby/N0Y7LJqZf+Gd5UyzYEnd8x8VfexgFULh/fMV6+RH9/F6N+E nvnRPcLKNSy3UziCD1VMPvvA8shOdcpOVFLNCwCIB+bVhVilCOeMrQB/dxV6rVrzD/Bl 06eslgNq3ABdoZMEAFUfDtIVA0bqLcfgwpFWnaH3Q/o43ZgY2oLAlTeO+8yBd2eh+aup A6DD2UkAx4z9Oc4GD17wngfRUHzIeZ5FlOOTxb0mbg33ECy3PJAPZhxO8tLRcza0JAoH vz+Q== X-Gm-Message-State: AOAM533qR424MdkXPllqf2UDZt+1dlEVYJHRBDxTYI9LZoNcg98HLdK9 PeorJWlUYDjfAS7aHgf0RGh8YcBZpjSaqg== X-Google-Smtp-Source: ABdhPJzeanz0S3bR2zMY8WuSvOQAlmj+GW702GpRNqDCkaLd7RKzCiZS951DK2f5W6WoTSIAOGQLuQ== X-Received: by 2002:a17:902:d487:b0:149:c6e8:b4aa with SMTP id c7-20020a170902d48700b00149c6e8b4aamr3805936plg.108.1641343256134; Tue, 04 Jan 2022 16:40:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 1/4] tcg/optimize: Fix folding of vector ops Date: Tue, 4 Jan 2022 16:40:51 -0800 Message-Id: <20220105004054.587588-2-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1034 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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, 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: qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1641343937608100001 Bitwise operations are easy to fold, because the operation is identical regardless of element size. But add and sub need extra element size info that is not currently propagated. Fixes: 2f9f08ba43d Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/799 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/optimize.c | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 2397f2cf93..e573000951 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -308,13 +308,13 @@ static uint64_t do_constant_folding_2(TCGOpcode op, u= int64_t x, uint64_t y) CASE_OP_32_64(mul): return x * y; =20 - CASE_OP_32_64(and): + CASE_OP_32_64_VEC(and): return x & y; =20 - CASE_OP_32_64(or): + CASE_OP_32_64_VEC(or): return x | y; =20 - CASE_OP_32_64(xor): + CASE_OP_32_64_VEC(xor): return x ^ y; =20 case INDEX_op_shl_i32: @@ -347,16 +347,16 @@ static uint64_t do_constant_folding_2(TCGOpcode op, u= int64_t x, uint64_t y) case INDEX_op_rotl_i64: return rol64(x, y & 63); =20 - CASE_OP_32_64(not): + CASE_OP_32_64_VEC(not): return ~x; =20 CASE_OP_32_64(neg): return -x; =20 - CASE_OP_32_64(andc): + CASE_OP_32_64_VEC(andc): return x & ~y; =20 - CASE_OP_32_64(orc): + CASE_OP_32_64_VEC(orc): return x | ~y; =20 CASE_OP_32_64(eqv): @@ -751,6 +751,12 @@ static bool fold_const2(OptContext *ctx, TCGOp *op) return false; } =20 +static bool fold_commutative(OptContext *ctx, TCGOp *op) +{ + swap_commutative(op->args[0], &op->args[1], &op->args[2]); + return false; +} + static bool fold_const2_commutative(OptContext *ctx, TCGOp *op) { swap_commutative(op->args[0], &op->args[1], &op->args[2]); @@ -905,6 +911,16 @@ static bool fold_add(OptContext *ctx, TCGOp *op) return false; } =20 +/* We cannot as yet do_constant_folding with vectors. */ +static bool fold_add_vec(OptContext *ctx, TCGOp *op) +{ + if (fold_commutative(ctx, op) || + fold_xi_to_x(ctx, op, 0)) { + return true; + } + return false; +} + static bool fold_addsub2(OptContext *ctx, TCGOp *op, bool add) { if (arg_is_const(op->args[2]) && arg_is_const(op->args[3]) && @@ -1938,10 +1954,10 @@ static bool fold_sub_to_neg(OptContext *ctx, TCGOp = *op) return false; } =20 -static bool fold_sub(OptContext *ctx, TCGOp *op) +/* We cannot as yet do_constant_folding with vectors. */ +static bool fold_sub_vec(OptContext *ctx, TCGOp *op) { - if (fold_const2(ctx, op) || - fold_xx_to_i(ctx, op, 0) || + if (fold_xx_to_i(ctx, op, 0) || fold_xi_to_x(ctx, op, 0) || fold_sub_to_neg(ctx, op)) { return true; @@ -1949,6 +1965,11 @@ static bool fold_sub(OptContext *ctx, TCGOp *op) return false; } =20 +static bool fold_sub(OptContext *ctx, TCGOp *op) +{ + return fold_const2(ctx, op) || fold_sub_vec(ctx, op); +} + static bool fold_sub2(OptContext *ctx, TCGOp *op) { return fold_addsub2(ctx, op, false); @@ -2052,9 +2073,12 @@ void tcg_optimize(TCGContext *s) * Sorted alphabetically by opcode as much as possible. */ switch (opc) { - CASE_OP_32_64_VEC(add): + CASE_OP_32_64(add): done =3D fold_add(&ctx, op); break; + case INDEX_op_add_vec: + done =3D fold_add_vec(&ctx, op); + break; CASE_OP_32_64(add2): done =3D fold_add2(&ctx, op); break; @@ -2193,9 +2217,12 @@ void tcg_optimize(TCGContext *s) CASE_OP_32_64(sextract): done =3D fold_sextract(&ctx, op); break; - CASE_OP_32_64_VEC(sub): + CASE_OP_32_64(sub): done =3D fold_sub(&ctx, op); break; + case INDEX_op_sub_vec: + done =3D fold_sub_vec(&ctx, op); + break; CASE_OP_32_64(sub2): done =3D fold_sub2(&ctx, op); break; --=20 2.25.1 From nobody Mon Apr 29 10:06:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641343652225495.74356704745674; Tue, 4 Jan 2022 16:47:32 -0800 (PST) Received: from localhost ([::1]:38816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4uSh-00086k-5A for importer@patchew.org; Tue, 04 Jan 2022 19:47:31 -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) 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) 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-Google-Smtp-Source: ABdhPJwhjjvZR9uzNm4otbcTm2A+I+p2F0mZm/dO++0ICdLpV/Z6nwxmgX+3eBu7v8UqMN1fLvb9fQ== X-Received: by 2002:a17:90b:20e:: with SMTP id fy14mr12859pjb.22.1641343256756; 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::629 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=20Mathieu-Daud=C3=A9?= , Song Gao Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1641343653338100003 From: Philippe Mathieu-Daud=C3=A9 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 =E2=80=98host_s= ignal_write=E2=80=99: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can onl= y be part of a statement and a declaration is not a statement uint32_t sel =3D (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=C3=A9 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/lo= ongarch64/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, uco= ntext_t *uc) } break; case 0b001110: /* indexed, atomic, bounds-checking memory operations */ - uint32_t sel =3D (insn >> 15) & 0b11111111111; - - switch (sel) { + switch ((insn >> 15) & 0b11111111111) { case 0b00000100000: /* stx.b */ case 0b00000101000: /* stx.h */ case 0b00000110000: /* stx.w */ --=20 2.25.1 From nobody Mon Apr 29 10:06:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1641343686; cv=none; d=zohomail.com; s=zohoarc; b=Y+HuQpl4rSFiKeC8QjlSjTySKwkVoeGzwZ5kk4A7Xrff9VocLUesnbtvCL68hcxNyd4bhXk/strwAKGv5pHKEFu3gKeMAQZcmDfNXfulOw66eRy26N9ehp94c94TDpprf4LFOi1SsMQ1kHZQnPTqNgCvtxCHwo/Apcif59gCziI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641343686; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YcPV3VwSDfshYOTe7weRDXAZxBZo/GP8+IJKpZqZQJU=; b=a0VcSeBjlhascR2slojGE0XA4xnOi3BEBCksX6+a8XpwtJ7yPlCuxsn+odgrPYx1elDIWI07UIO1NkZVzfsz1xem1obv5/kWvPCFmjcP3S0RW0OdBpUStzBcVEGDsCCsIMVzRFy0qz3xuUGOtct+DybOZ67YJhdMQzYBsemo6Ps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641343686562836.0223787122765; Tue, 4 Jan 2022 16:48:06 -0800 (PST) Received: from localhost ([::1]:39606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4uTF-0000Bc-1p for importer@patchew.org; Tue, 04 Jan 2022 19:48:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4uMP-0005Cd-Qa for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:02 -0500 Received: from [2607:f8b0:4864:20::1036] (port=33536 helo=mail-pj1-x1036.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4uMM-0005fC-Nh for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:00 -0500 Received: by mail-pj1-x1036.google.com with SMTP id g11-20020a17090a7d0b00b001b2c12c7273so2534929pjl.0 for ; Tue, 04 Jan 2022 16:40:58 -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: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=YcPV3VwSDfshYOTe7weRDXAZxBZo/GP8+IJKpZqZQJU=; b=s2VfolWq3b3H2u0VfbQEvQzNjrQYFtvwehOlgKhi39cHOKCB5gXoyEj3TVV51Ouctc D0JQ85pX3/3ATU7NTTSn1uV5oNhphGWZOAz4EybTFVqRkU7VIWudzcsMYgsd+JqikmQp nWtmE6IVqeXqki6NlG93158i+NMj7ZZWoJxmDlYajN/afwzTJ/75OC4uD4Bc1ALdr/J5 9HSav6dn/XWaCzEowVC18vqtcmtLNRm3rMxJZkHqlOAxIeVp1lsWk/zUMJ7BGLPRi/Mz Jn7fN59LzhDRJIskgS7bYskF/A1j+ZmeCXLM/zusAUb5sBL9Wb0NHjvRWLs2KnwNuDD4 FkiA== 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=YcPV3VwSDfshYOTe7weRDXAZxBZo/GP8+IJKpZqZQJU=; b=01TQDfRsd8xVG6doOsvIdhbEIWy+DpYIwu2yCBhnW+bu1AzRZMnTqqyT3Y0qJ5JHbJ MR6VhqTjNuKVafkGxzqAps2Qxa+zyiiwNXJi7ms8unh/F9kSUoefD1eVhJ+6GcwhuEqw 6cOs6FUHV+OvwEY4/scgf2+pSoTLHhhoUoo63ODrlbKcV56sBLJIRjJXjP21ZIW0hcWM c0bbVAEWBrxLFA/VXAI0ICez6XnmEsY2Q1uqOkziSmJa4WN5kI+yCmEKJbm+PrfeKuQM U6UVGupe2EB4KE2VwVl90PH+AjeCvNA9IPS+KL/Uw1BBWuM5yHrUErgljFHLwU6aoMRm 6Krg== X-Gm-Message-State: AOAM531yFRSupmL3HVYB+iwZUmkZ+fjzdYK+k5mxXUm6urKrryC3Ytfs Kqau/HAad2eZI63vc9Z9GncJxwDJo+7mTw== X-Google-Smtp-Source: ABdhPJxkqCmahfY2L1fcYyJZKPzZE9/7UWSjfG2pkj4kDRpxJ4U9C/fFsVijLxbu86gsdBQeoEcnkw== X-Received: by 2002:a17:90b:38c1:: with SMTP id nn1mr1132529pjb.65.1641343257374; Tue, 04 Jan 2022 16:40:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/4] sysemu: Cleanup qemu_run_machine_init_done_notifiers() Date: Tue, 4 Jan 2022 16:40:53 -0800 Message-Id: <20220105004054.587588-4-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1036 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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: Xiaoyao Li , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1641343689036100001 From: Xiaoyao Li Remove qemu_run_machine_init_done_notifiers() since no implementation and user. Fixes: f66dc8737c9 ("vl: move all generic initialization out of vl.c") Signed-off-by: Xiaoyao Li Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220104024136.1433545-1-xiaoyao.li@intel.com> Signed-off-by: Richard Henderson --- include/sysemu/sysemu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 8fae667172..b9421e03ff 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -16,7 +16,6 @@ extern bool qemu_uuid_set; void qemu_add_exit_notifier(Notifier *notify); void qemu_remove_exit_notifier(Notifier *notify); =20 -void qemu_run_machine_init_done_notifiers(void); void qemu_add_machine_init_done_notifier(Notifier *notify); void qemu_remove_machine_init_done_notifier(Notifier *notify); =20 --=20 2.25.1 From nobody Mon Apr 29 10:06:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1641344003; cv=none; d=zohomail.com; s=zohoarc; b=WVxEIqNR1XTXq4bKaScndC3v6K7gmq7XitZzdWcovz/t8Xcokt60aDPJgBctaJK4dxvoOL0ciNrkhCS3V6XamFu5aF099v83ErVGVjzYQWIfHIsgJ2lhQPa/nx5RCl5arGf6QfOSiGyW+PxcwY5xvW3QgRc6g5UcuZACInLD1VI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641344003; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nhccvc7jO1lfQcqH/y9qaOyEsCQIn9/GtRZwxj3VwPc=; b=NfXqeBooZBdXcQh1LS0EutA8CvUISiEbBJPbry89nGRcWw1JCtHjQbG65xUiwyuHHL1iVcZfQIg3vdnUBP6j7pbMNlX66gFOj6VStbcq7PrTW6un3AWQzHPIiR/r7lFpUP4nWm+bIN3Ls0jG8zYSW/dsB5/GxQK5WhjesLb4c4k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641344003839263.05756959523126; Tue, 4 Jan 2022 16:53:23 -0800 (PST) Received: from localhost ([::1]:44802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4uYM-0003nW-FC for importer@patchew.org; Tue, 04 Jan 2022 19:53:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4uMP-0005Cw-OQ for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:02 -0500 Received: from [2607:f8b0:4864:20::1030] (port=42561 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4uMN-0005fI-7f for qemu-devel@nongnu.org; Tue, 04 Jan 2022 19:41:00 -0500 Received: by mail-pj1-x1030.google.com with SMTP id lr15-20020a17090b4b8f00b001b19671cbebso4793152pjb.1 for ; Tue, 04 Jan 2022 16:40:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); 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=Nhccvc7jO1lfQcqH/y9qaOyEsCQIn9/GtRZwxj3VwPc=; b=DFqByQYViWahJCUHFKCiNgbawmqnRTKsEOmnZ8v9Op2TPOzrOUE3Ow8KOlmbk8gRvG jsMbnmeDhWgoKHiWbhQu6BVuGT9r/JyXFZKzPuH2TAHeg/dJc/ow9+QZSdnDW0YXkhDr wa78WxQ0pcAkMOCwVPtGQTj+xFhghK1EagThE6Xco3R1JDLJZ1/u1TRY4RBtP4U/fxuk gOF32cXGPEUkGcJDGONGdQ2miZtdv2yQho2ERWWi9db0Eu/2iQ0W70mLPGhk2tB3ax0+ MZV6TtV3Sl7r8pbbo4Q9FqiYi2NkDZydO1i3XBFIVcc7TNiiOJsLQbO1Zh2tM0CZU2Cn XQoA== 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=Nhccvc7jO1lfQcqH/y9qaOyEsCQIn9/GtRZwxj3VwPc=; b=NVpwA0sYI5b+B4WuSZpw7LH2NcFMUOjetmMkLRyVyOic8QH08qGAUOIYiD1zQg9X0D wBL9E2fm1TOvQCG5G3ufpqyPVXH3dGinnbRS5pzfbc0yxp1iqliG3dcl7sOq/t1Zu7jb bP9mYiCb1D9TwTU+hOaYIgp2FctvgoVA3attucjfJKIbgPRQoG26OFN281F3HHfEJsBn GUF+mmOmwxQjo65SFO3fLCLhLVzqBhmmcqGX+tnxWDdK4s7f0tspOrEEdqc8Wzew9jaF 20v+x9Xc4OFYLBepSMNcNjapEdTdVH8WkdEG71Ad6nPVuTSLBrzWI4isiPBISrs4SnXx tRiQ== X-Gm-Message-State: AOAM532pUkjdztzYg0dJrJRZQL40n+edCVsLIPsH4CT6aX9+YMbXh2Jj KTko25/HMt7VA/2oBI9LH6nhnnwyl8juqw== X-Google-Smtp-Source: ABdhPJy1f4yWF/vHX3LD++WpvkaVofTpXWr9rDR7WVNVYdHUmfEQox8QbZumQLv947kQqRLS8WFcfw== X-Received: by 2002:a17:90a:e603:: with SMTP id j3mr1145313pjy.166.1641343257944; Tue, 04 Jan 2022 16:40:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 4/4] common-user: Fix tail calls to safe_syscall_set_errno_tail Date: Tue, 4 Jan 2022 16:40:54 -0800 Message-Id: <20220105004054.587588-5-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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: Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1641344005032100001 For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 ("linux-user: Move syscall error detection into safe_sy= scall_base") Reported-by: Laurent Vivier Tested-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Message-Id: <20220104190454.542225-1-richard.henderson@linaro.org> --- common-user/host/i386/safe-syscall.inc.S | 1 + common-user/host/mips/safe-syscall.inc.S | 1 + common-user/host/x86_64/safe-syscall.inc.S | 1 + 3 files changed, 3 insertions(+) diff --git a/common-user/host/i386/safe-syscall.inc.S b/common-user/host/i3= 86/safe-syscall.inc.S index baf5400a29..9c45e56e48 100644 --- a/common-user/host/i386/safe-syscall.inc.S +++ b/common-user/host/i386/safe-syscall.inc.S @@ -120,6 +120,7 @@ safe_syscall_end: pop %ebp .cfi_adjust_cfa_offset -4 .cfi_restore ebp + mov %eax, (%esp) jmp safe_syscall_set_errno_tail =20 .cfi_endproc diff --git a/common-user/host/mips/safe-syscall.inc.S b/common-user/host/mi= ps/safe-syscall.inc.S index fc75a337d1..6a44614970 100644 --- a/common-user/host/mips/safe-syscall.inc.S +++ b/common-user/host/mips/safe-syscall.inc.S @@ -141,6 +141,7 @@ safe_syscall_end: 1: USE_ALT_CP(t0) SETUP_GPX(t1) SETUP_GPX64(t0, t1) + move a0, v0 PTR_LA t9, safe_syscall_set_errno_tail jr t9 =20 diff --git a/common-user/host/x86_64/safe-syscall.inc.S b/common-user/host/= x86_64/safe-syscall.inc.S index a20927a783..d1a67a303a 100644 --- a/common-user/host/x86_64/safe-syscall.inc.S +++ b/common-user/host/x86_64/safe-syscall.inc.S @@ -99,6 +99,7 @@ safe_syscall_end: 1: pop %rbp .cfi_def_cfa_offset 8 .cfi_restore rbp + mov %eax, %edi jmp safe_syscall_set_errno_tail .cfi_endproc =20 --=20 2.25.1