From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id 7E8003857697 for ; Mon, 31 Oct 2022 16:55:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E8003857697 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x22b.google.com with SMTP id c25so3884823ljr.8 for ; Mon, 31 Oct 2022 09:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=347FRVRjq+UfemDCwIxsFtOnSupL0821K9F3MPtFNVo=; b=B+8AxUFGh+9PZJQy8QDHrA4y9njDbXE5e8b6921ZJUbB7hMArNf3V2wTLNIu+9tGd/ /kH7Rdm3XI2WWyY6SJrvVfMqnzrEx+svJ1BjIj3ztwOm1yk4ZQ263K02iqDWSYsEFrKo 0ccW0oatogauMMEMhmXHBSpLwMEoEY3l5ieexk1GGgR6MJXMWNd81jW3GH6Y/VJlCBni T6KHRpKjkIGQNuBcj2FCkvtgQrLI0OOPvubOidAWdjjXW9PP6qbpLvclV+8R7S2yAns9 Rr6SODna5tiNs2NR46CB3CAdJDT3EBUfq8EGeQl0Zl7RTFEEkV2ILCGp7Y3OtLgmCRWF UARg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=347FRVRjq+UfemDCwIxsFtOnSupL0821K9F3MPtFNVo=; b=XbBgqKOyKEbcr1us6QJ7CLrJMjY8E9yrCx0OHisSvlNTkQk+8+s1FzzGCcGdw7Jpik EKtTCYPjxdt/N5B7hR4QIMhugdqbtdRcxsZGQZ7iY2jJthmEfBTyAzum1MSwN3dVXMXX IpjAhWUTTpByqbKo3FL4aRp0d01p1FWcF9PnU+9YBYHbBh0nOyLEuW54Rbn0guEzQAM7 t2zyrzZKlW1/saRcpO6wWJBGznfOXC9l1iiB6E6b20NSn3J0unLrHLgdDCF3KtUlkOE6 qswJa1KuUHCsFpBuk3UtX0vrraz4zw8ezV7GlaSBKCDmRgy/8FN2LR1FnLE8miU6ey3a D+QA== X-Gm-Message-State: ACrzQf3R0aybFyi3tPeK38VGNwBFeah6GN4m8erncPVR8ccjk1RehSMv 31kGNiZb6b+JaQQOnxzbZWFpEDpfzMbtyIB1PPw= X-Google-Smtp-Source: AMsMyM6hRLytTa2+Pw3PDlipKxVlTF+tp6kGugJc3s7gQtWvDsUpCIEsjDewuYnlVZw+RpO/TV1WF+X4birByz9d7qo= X-Received: by 2002:a2e:874e:0:b0:277:38b:212a with SMTP id q14-20020a2e874e000000b00277038b212amr6143183ljj.363.1667235335919; Mon, 31 Oct 2022 09:55:35 -0700 (PDT) MIME-Version: 1.0 References: <20221031030507.35588-1-haochen.jiang@intel.com> <20221031030507.35588-5-haochen.jiang@intel.com> In-Reply-To: <20221031030507.35588-5-haochen.jiang@intel.com> From: "H.J. Lu" Date: Mon, 31 Oct 2022 09:54:59 -0700 Message-ID: Subject: Re: [PATCH 4/6] Add handler for more i386_cpu_flags To: Haochen Jiang Cc: binutils@sourceware.org, jbeulich@suse.com, Kong Lingling Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3022.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, Oct 30, 2022 at 8:07 PM Haochen Jiang wrote: > > From: Kong Lingling > > gas/ChangeLog: > > * config/tc-i386.c (cpu_flags_all_zero): Add new ARRAY_SIZE handle. > (cpu_flags_equal): Ditto. > (cpu_flags_and): Ditto. > (cpu_flags_or): Ditto. > (cpu_flags_and_not): Ditto. > --- > gas/config/tc-i386.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c > index 9c0f86ac3d..99d1a4cfec 100644 > --- a/gas/config/tc-i386.c > +++ b/gas/config/tc-i386.c > @@ -1619,6 +1619,10 @@ cpu_flags_all_zero (const union i386_cpu_flags *x) > { > switch (ARRAY_SIZE(x->array)) > { > + case 5: > + if (x->array[4]) > + return 0; > + /* Fall through. */ > case 4: > if (x->array[3]) > return 0; > @@ -1644,6 +1648,10 @@ cpu_flags_equal (const union i386_cpu_flags *x, > { > switch (ARRAY_SIZE(x->array)) > { > + case 5: > + if (x->array[4] != y->array[4]) > + return 0; > + /* Fall through. */ > case 4: > if (x->array[3] != y->array[3]) > return 0; > @@ -1676,6 +1684,9 @@ cpu_flags_and (i386_cpu_flags x, i386_cpu_flags y) > { > switch (ARRAY_SIZE (x.array)) > { > + case 5: > + x.array [4] &= y.array [4]; > + /* Fall through. */ > case 4: > x.array [3] &= y.array [3]; > /* Fall through. */ > @@ -1699,6 +1710,9 @@ cpu_flags_or (i386_cpu_flags x, i386_cpu_flags y) > { > switch (ARRAY_SIZE (x.array)) > { > + case 5: > + x.array [4] |= y.array [4]; > + /* Fall through. */ > case 4: > x.array [3] |= y.array [3]; > /* Fall through. */ > @@ -1722,6 +1736,9 @@ cpu_flags_and_not (i386_cpu_flags x, i386_cpu_flags y) > { > switch (ARRAY_SIZE (x.array)) > { > + case 5: > + x.array [4] &= ~y.array [4]; > + /* Fall through. */ > case 4: > x.array [3] &= ~y.array [3]; > /* Fall through. */ > -- > 2.18.1 > OK. Thanks. -- H.J.