From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 11A10384C007 for ; Tue, 13 Jul 2021 18:59:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11A10384C007 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-308-5V6QF12ENq-VavVsbOghjw-1; Tue, 13 Jul 2021 14:59:22 -0400 X-MC-Unique: 5V6QF12ENq-VavVsbOghjw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62FDA100C609; Tue, 13 Jul 2021 18:59:21 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-143.ams2.redhat.com [10.36.112.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 215595C22A; Tue, 13 Jul 2021 18:59:20 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 16DIxIf93668476 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:59:18 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 16DIxH7d3668475; Tue, 13 Jul 2021 20:59:17 +0200 Date: Tue, 13 Jul 2021 20:59:17 +0200 From: Jakub Jelinek To: "H.J. Lu" Cc: Hongyu Wang , GCC Patches , Uros Bizjak Subject: Re: [PATCH v3] x86: Don't enable UINTR in 32-bit mode Message-ID: <20210713185917.GS2380545@tucnak> Reply-To: Jakub Jelinek References: <20210713015130.6297-1-hjl.tools@gmail.com> <20210713065556.GI2380545@tucnak> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 18:59:28 -0000 On Tue, Jul 13, 2021 at 09:35:18AM -0700, H.J. Lu wrote: > Here is the v3 patch. OK for master? >From my POV LGTM, but please give Uros a chance to chime in. > From ceab81ef97ab102c410830c41ba7fea911170d1a Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date: Fri, 9 Jul 2021 09:16:01 -0700 > Subject: [PATCH v3] x86: Don't enable UINTR in 32-bit mode > > UINTR is available only in 64-bit mode. Since the codegen target is > unknown when the the gcc driver is processing -march=native, to properly > handle UINTR for -march=native: > > 1. Pass "arch [32|64]" and "tune [32|64]" to host_detect_local_cpu to > indicate 32-bit and 64-bit codegen. > 2. Change ix86_option_override_internal to enable UINTR only in 64-bit > mode for -march=CPU when PTA_CPU includes PTA_UINTR. > > gcc/ > > PR target/101395 > * config/i386/driver-i386.c (host_detect_local_cpu): Check > "arch [32|64]" and "tune [32|64]" for 32-bit and 64-bit codegen. > Enable UINTR only for 64-bit codegen. > * config/i386/i386-options.c > (ix86_option_override_internal::DEF_PTA): Skip PTA_UINTR if not > in 64-bit mode. > * config/i386/i386.h (ARCH_ARG): New. > (CC1_CPU_SPEC): Pass "[arch|tune] 32" for 32-bit codegen and > "[arch|tune] 64" for 64-bit codegen. > > gcc/testsuite/ > > PR target/101395 > * gcc.target/i386/pr101395-1.c: New test. > * gcc.target/i386/pr101395-2.c: Likewise. > * gcc.target/i386/pr101395-3.c: Likewise. Jakub