From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id C43E83853D42; Mon, 21 Nov 2022 09:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C43E83853D42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669023309; bh=FJQtZ7mU1E+1O65RbmE7rRYEomTXSPozbakGwCCIC6Q=; h=From:To:Subject:Date:From; b=qOY+BygcsVD+ZZHG0IXmG9lC/Xd1kmrioDboE3K5ft3o9in5zxKWsm6NcHlPAPQgq ZXjo5Q9/1Z0ta9nLpT8IktVftqqLVKlNxKwgKJJXHs8TRGHNrlPBRFOKB87DWz+50M 2glzYNm48L2G8w5CK9ijXSwGmMHxeSSdXD2AmWT8= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-10387] i386: Uglify some local identifiers in *intrin.h [PR107748] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: d92cbc49eac263e32ff5eaabffd3efe2324502d2 X-Git-Newrev: 961f0e1966549b7ce7c1cbce6a4a91f7062816f0 Message-Id: <20221121093509.C43E83853D42@sourceware.org> Date: Mon, 21 Nov 2022 09:35:09 +0000 (GMT) List-Id: https://gcc.gnu.org/g:961f0e1966549b7ce7c1cbce6a4a91f7062816f0 commit r11-10387-g961f0e1966549b7ce7c1cbce6a4a91f7062816f0 Author: Jakub Jelinek Date: Mon Nov 21 10:28:27 2022 +0100 i386: Uglify some local identifiers in *intrin.h [PR107748] While reporting PR107748 (where is a problem with non-uglified names, but I've left it out because it needs fixing anyway), I've noticed various spots where identifiers in *intrin.h headers weren't uglified. The following patch fixed those that are related to unions (I've grepped for [a-zA-Z]\.[a-zA-Z] spots). The reason we need those to be uglified is the same as why the arguments of the inlines are __ prefixed and most of automatic vars in the inlines - say a, v or u aren't part of implementation namespace and so users could #define u whatever->something #include and it should still work, as long as u is not e.g. one of the names of the functions/macros the header provides (_mm* etc.). 2022-11-21 Jakub Jelinek PR target/107748 * config/i386/smmintrin.h (_mm_extract_ps): Uglify names of local variables and union members. (cherry picked from commit ec8ec09f9414be871e322fecf4ebf53e3687bd22) Diff: --- gcc/config/i386/smmintrin.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/smmintrin.h b/gcc/config/i386/smmintrin.h index f8c4c920790..183df7f1833 100644 --- a/gcc/config/i386/smmintrin.h +++ b/gcc/config/i386/smmintrin.h @@ -365,17 +365,18 @@ _mm_insert_ps (__m128 __D, __m128 __S, const int __N) extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_extract_ps (__m128 __X, const int __N) { - union { int i; float f; } __tmp; - __tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)__X, __N); - return __tmp.i; + union { int __i; float __f; } __tmp; + __tmp.__f = __builtin_ia32_vec_ext_v4sf ((__v4sf)__X, __N); + return __tmp.__i; } #else #define _mm_extract_ps(X, N) \ (__extension__ \ ({ \ - union { int i; float f; } __tmp; \ - __tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)(__m128)(X), (int)(N)); \ - __tmp.i; \ + union { int __i; float __f; } __tmp; \ + __tmp.__f = __builtin_ia32_vec_ext_v4sf ((__v4sf)(__m128)(X), \ + (int)(N)); \ + __tmp.__i; \ })) #endif