Skip to content

Commit cea951d

Browse files
committed
Avoid exporting 80-bit fp functions for architectures other than Intel.
This patch is a partial fix for [[ llvm#56349 | issue ]], due to functions affected by D117473. Implementation details: The patch essentially creates a new macro if the architecture is either intel32 or intel64, since the generate-def.pl cannot process boolean algebra on macros. Reviewed By: jlpeyton Differential Revision: https://reviews.llvm.org/D135795
1 parent 6194229 commit cea951d

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

openmp/runtime/cmake/LibompHandleFlags.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ function(libomp_get_gdflags gdflags)
163163
set(gdflags_local)
164164
if(${IA32})
165165
set(libomp_gdflag_arch arch_32)
166+
libomp_append(gdflags_local "-D IS_IA_ARCH")
166167
elseif(${INTEL64})
167168
set(libomp_gdflag_arch arch_32e)
169+
libomp_append(gdflags_local "-D IS_IA_ARCH")
168170
else()
169171
set(libomp_gdflag_arch arch_${LIBOMP_ARCH})
170172
endif()

openmp/runtime/src/dllexports

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,12 @@ kmp_set_disp_num_buffers 890
688688
__kmpc_atomic_fixed2_eqv 2078
689689
__kmpc_atomic_fixed4_eqv 2079
690690
__kmpc_atomic_fixed8_eqv 2080
691-
691+
%ifdef IS_IA_ARCH
692692
__kmpc_atomic_float10_add 2081
693693
__kmpc_atomic_float10_sub 2082
694694
__kmpc_atomic_float10_mul 2083
695695
__kmpc_atomic_float10_div 2084
696+
%endif
696697

697698
__kmpc_atomic_cmplx4_add 2085
698699
__kmpc_atomic_cmplx4_sub 2086
@@ -702,10 +703,12 @@ kmp_set_disp_num_buffers 890
702703
__kmpc_atomic_cmplx8_sub 2090
703704
__kmpc_atomic_cmplx8_mul 2091
704705
__kmpc_atomic_cmplx8_div 2092
706+
%ifdef IS_IA_ARCH
705707
__kmpc_atomic_cmplx10_add 2093
706708
__kmpc_atomic_cmplx10_sub 2094
707709
__kmpc_atomic_cmplx10_mul 2095
708710
__kmpc_atomic_cmplx10_div 2096
711+
%endif
709712
%ifdef HAVE_QUAD
710713
__kmpc_atomic_cmplx16_add 2097
711714
__kmpc_atomic_cmplx16_sub 2098
@@ -753,11 +756,13 @@ kmp_set_disp_num_buffers 890
753756
__kmpc_atomic_float8_mul_fp 2133
754757
__kmpc_atomic_float8_div_fp 2134
755758

759+
%ifdef IS_IA_ARCH
756760
__kmpc_atomic_float10_add_fp 2135
757761
__kmpc_atomic_float10_sub_fp 2136
758762
__kmpc_atomic_float10_mul_fp 2137
759763
__kmpc_atomic_float10_div_fp 2138
760764
%endif
765+
%endif
761766

762767
__kmpc_atomic_fixed1_mul_float8 2169
763768
__kmpc_atomic_fixed1_div_float8 2170
@@ -785,9 +790,13 @@ kmp_set_disp_num_buffers 890
785790
__kmpc_atomic_2 2248
786791
#__kmpc_atomic_4 # declared above #100
787792
#__kmpc_atomic_8 # declared above #101
793+
%ifdef IS_IA_ARCH
788794
__kmpc_atomic_10 2251
795+
%endif
789796
__kmpc_atomic_16 2252
797+
%ifdef IS_IA_ARCH
790798
__kmpc_atomic_20 2253
799+
%endif
791800
__kmpc_atomic_32 2254
792801

793802
%ifdef arch_32
@@ -809,8 +818,7 @@ kmp_set_disp_num_buffers 890
809818
%endif
810819

811820
# These are specific to x86 and x64
812-
%ifndef arch_64
813-
%ifndef arch_aarch64
821+
%ifdef IS_IA_ARCH
814822

815823
# ATOMIC extensions for OpenMP 3.1 spec (x86 and x64 only)
816824

@@ -1214,8 +1222,7 @@ kmp_set_disp_num_buffers 890
12141222
__kmpc_atomic_float10_div_cpt_rev_fp
12151223
%endif
12161224

1217-
%endif # arch_aarch64
1218-
%endif # arch_64
1225+
%endif # IS_IA_ARCH
12191226

12201227
%ifdef HAVE_QUAD
12211228
__kmpc_atomic_fixed1u_add_fp
@@ -1233,8 +1240,10 @@ kmp_set_disp_num_buffers 890
12331240
%endif
12341241

12351242
# OpenMP 5.1 atomics
1243+
%ifdef IS_IA_ARCH
12361244
__kmpc_atomic_float10_max 2139
12371245
__kmpc_atomic_float10_min 2140
1246+
%endif
12381247
__kmpc_atomic_float10_max_cpt 2141
12391248
__kmpc_atomic_float10_min_cpt 2142
12401249

0 commit comments

Comments
 (0)