From nobody Tue Nov 18 02:53:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) client-ip=209.85.218.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1607381030; cv=none; d=zohomail.com; s=zohoarc; b=BCVdzE+XtFAF+0Sb6mQCXymnHSwLWM8MuwatJ3Nprus1zZhdRGKgeqWLGwzok/DPWWQ7FQ3vvjZIIFLbAlOmIRs1bghFBxtmFdVM+w9k2pu1CPgewFI26jN2g/RcFBLAaGGybMaihrOAE/f2pM4qhv1AU7t8QhlN5THkoISa+eY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607381030; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uPRexVPkDjCG4AyHRPKefAxhlHzd9mlDS2Ak1Dn5wzA=; b=ZgzVH1hFxvuIi67cAgr1MVpcKNcN4L7QwnW7k2we7jtCamIP3UutYVTY2R/3lGzq43at1iWbl9P1jUFy9Qy3kQO0hHfE+U2Mjaar4zXtdxFrczdpXkh7+0nw2za/u64VRqTOM5el2Q+AM+I6JtawILd5clZu2lik/4C5WiqV0hk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by mx.zohomail.com with SMTPS id 1607381030715206.14703372639121; Mon, 7 Dec 2020 14:43:50 -0800 (PST) Received: by mail-ej1-f65.google.com with SMTP id d17so21851630ejy.9 for ; Mon, 07 Dec 2020 14:43:50 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (101.red-88-21-206.staticip.rima-tde.net. [88.21.206.101]) by smtp.gmail.com with ESMTPSA id q26sm13974954ejt.73.2020.12.07.14.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 14:43:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uPRexVPkDjCG4AyHRPKefAxhlHzd9mlDS2Ak1Dn5wzA=; b=d+ZXHw46JlTEA4ZCC/GBW0kDvusDyWvC0qftMX6AI7oL2uEAbQBqzwZkMtJyE3cIdE itK22waRtH4usMHqSpemvlvBljKHrM9ITALC7DZTXzg+gipCy+hWwAa4S67Rcbskaktm LNZk1HQL543DZKTDyio9O1c49FKSiezAlkY1vGNHoYvzQgQtM2OYAsJk3jllS3TgCb7h vI4lVqW+b4GPL9xL2OEdKkoGMEW8pgfA3NBx7LW6fvUbso+Z50Zczs38URkO71FGDkBq oJKJL9aSH/4ifFe2ESby2db6WVbyN6qDKJO6yBwbWdi7FaBJitbQzzPiDWoD7YtWxRq+ BMMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uPRexVPkDjCG4AyHRPKefAxhlHzd9mlDS2Ak1Dn5wzA=; b=WYPEX9MEV3KgiGGTwbkIPjZDQEJsdqOa8RY+BvpDqjxXCxnPziBuXNgFJ1ctZKxRe9 Fr3q9bAfOUmHzuGvUZLuOnNG/7LwdNWHB6UMTB2JoELdhJMi0cE7v4AETff2lnczH90O bzK0iLCWsjkt5KDyv3JxJvWfJrcohpVBETCm7Os5YjDWDRAHiWRJj2iz4ZEI0UM+rl08 M71JoDHFHOr6RgjJ7xsf6lJEZUHp4r2fHw025uxOt2Kpbz1P3tmnfSLDV47zufh3Vh3/ hl06K+xqa8u0nsBjNlG8uxzgnjRf9EcMDbWG2foWpBB9nldyGIm3lmGYmdwhVAGxyS+9 Ui9A== X-Gm-Message-State: AOAM5336HxsNxO5aI5/3h8X0Mxwr9T97wNru/AFjiTN2j6hcV7nxgLPr ZjJHQBFCRUsx/p+6L19bBpk= X-Google-Smtp-Source: ABdhPJzBex17XWkFZiyL70bBdPoH2yGs6L6SMZL6F69z2At/PaaImT0i8xTT3qABDAPupWhsGafWJw== X-Received: by 2002:a17:906:55d0:: with SMTP id z16mr20620124ejp.466.1607381028892; Mon, 07 Dec 2020 14:43:48 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Aurelien Jarno , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Huacai Chen , Richard Henderson Subject: [PATCH v4 2/6] linux-user/elfload: Rename MIPS GET_FEATURE() as GET_FEATURE_INSN() Date: Mon, 7 Dec 2020 23:43:31 +0100 Message-Id: <20201207224335.4030582-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201207224335.4030582-1-f4bug@amsat.org> References: <20201207224335.4030582-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) We want to add macros similar to GET_FEATURE(). As this one use the 'insn_flags' field, rename it GET_FEATURE_INSN(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/elfload.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index aae28fd929d..0e1d7e7677c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -989,7 +989,7 @@ enum { =20 #define ELF_HWCAP get_elf_hwcap() =20 -#define GET_FEATURE(_flag, _hwcap) \ +#define GET_FEATURE_INSN(_flag, _hwcap) \ do { if (cpu->env.insn_flags & (_flag)) { hwcaps |=3D _hwcap; } } whil= e (0) =20 static uint32_t get_elf_hwcap(void) @@ -997,13 +997,13 @@ static uint32_t get_elf_hwcap(void) MIPSCPU *cpu =3D MIPS_CPU(thread_cpu); uint32_t hwcaps =3D 0; =20 - GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6); - GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA); + GET_FEATURE_INSN(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6); + GET_FEATURE_INSN(ASE_MSA, HWCAP_MIPS_MSA); =20 return hwcaps; } =20 -#undef GET_FEATURE +#undef GET_FEATURE_INSN =20 #endif /* TARGET_MIPS */ =20 --=20 2.26.2