Projects
openEuler:24.03:SP1:Everything:64G
gcc
_service:tar_scm:LoongArch-fix-error-building.p...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:LoongArch-fix-error-building.patch of Package gcc
diff --git a/gcc/config/loongarch/loongarch-builtins.cc b/gcc/config/loongarch/loongarch-builtins.cc index a4a7dbec9..2d9743d86 100644 --- a/gcc/config/loongarch/loongarch-builtins.cc +++ b/gcc/config/loongarch/loongarch-builtins.cc @@ -2440,11 +2440,6 @@ loongarch_init_builtins (void) unsigned int i; tree type; - /* Register the type float128_type_node as a built-in type and - give it an alias "__float128". */ - (*lang_hooks.types.register_builtin_type) (float128_type_node, - "__float128"); - /* Iterate through all of the bdesc arrays, initializing all of the builtin functions. */ for (i = 0; i < ARRAY_SIZE (loongarch_builtins); i++) diff --git a/gcc/config/loongarch/loongarch-c.cc b/gcc/config/loongarch/loongarch-c.cc index c9b11a042..76c8ea8db 100644 --- a/gcc/config/loongarch/loongarch-c.cc +++ b/gcc/config/loongarch/loongarch-c.cc @@ -117,17 +117,6 @@ loongarch_cpu_cpp_builtins (cpp_reader *pfile) builtin_define ("__loongarch_simd_width=256"); } - /* Add support for FLOAT128_TYPE on the LoongArch architecture. */ - builtin_define ("__FLOAT128_TYPE__"); - - /* Map the old _Float128 'q' builtins into the new 'f128' builtins. */ - builtin_define ("__builtin_fabsq=__builtin_fabsf128"); - builtin_define ("__builtin_copysignq=__builtin_copysignf128"); - builtin_define ("__builtin_nanq=__builtin_nanf128"); - builtin_define ("__builtin_nansq=__builtin_nansf128"); - builtin_define ("__builtin_infq=__builtin_inff128"); - builtin_define ("__builtin_huge_valq=__builtin_huge_valf128"); - /* Native Data Sizes. */ builtin_define_with_int_value ("_LOONGARCH_SZINT", INT_TYPE_SIZE); builtin_define_with_int_value ("_LOONGARCH_SZLONG", LONG_TYPE_SIZE); diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index baa9831aa..ae074edbd 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -9712,13 +9712,10 @@ expand_perm_const_2_end: /* Implement TARGET_VECTORIZE_VEC_PERM_CONST. */ static bool -loongarch_vectorize_vec_perm_const (machine_mode vmode, machine_mode op_mode, +loongarch_vectorize_vec_perm_const (machine_mode vmode, rtx target, rtx op0, rtx op1, const vec_perm_indices &sel) { - if (vmode != op_mode) - return false; - struct expand_vec_perm_d d; int i, nelt, which; unsigned char orig_perm[MAX_VECT_LEN]; diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index bb19d0f27..1d1bac255 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -1085,10 +1085,10 @@ types. As an extension, GNU C and GNU C++ support additional floating types, which are not supported by all targets. @itemize @bullet -@item @code{__float128} is available on i386, x86_64, IA-64, LoongArch -and hppa HP-UX, as well as on PowerPC GNU/Linux targets that enable +@item @code{__float128} is available on i386, x86_64, IA-64, and +hppa HP-UX, as well as on PowerPC GNU/Linux targets that enable the vector scalar (VSX) instruction set. @code{__float128} supports -the 128-bit floating type. On i386, x86_64, PowerPC, LoongArch and IA-64, +the 128-bit floating type. On i386, x86_64, PowerPC, and IA-64 other than HP-UX, @code{__float128} is an alias for @code{_Float128}. On hppa and IA-64 HP-UX, @code{__float128} is an alias for @code{long double}. @@ -16257,20 +16257,6 @@ function you need to include @code{larchintrin.h}. void __break (imm0_32767) @end smallexample -Additional built-in functions are available for LoongArch family -processors to efficiently use 128-bit floating-point (__float128) -values. - -The following are the basic built-in functions supported. -@smallexample -__float128 __builtin_fabsq (__float128); -__float128 __builtin_copysignq (__float128, __float128); -__float128 __builtin_infq (void); -__float128 __builtin_huge_valq (void); -__float128 __builtin_nanq (void); -__float128 __builtin_nansq (void); -@end smallexample - @node MIPS DSP Built-in Functions @subsection MIPS DSP Built-in Functions diff --git a/gcc/testsuite/gcc.target/loongarch/math-float-128.c b/gcc/testsuite/gcc.target/loongarch/math-float-128.c deleted file mode 100644 index 387566a57..000000000 --- a/gcc/testsuite/gcc.target/loongarch/math-float-128.c +++ /dev/null @@ -1,81 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options " -march=loongarch64 -O2 " } */ -/* { dg-final { scan-assembler-not "my_fabsq2:.*\\bl\t%plt\\(__builtin_fabsq\\).*my_fabsq2" } } */ -/* { dg-final { scan-assembler-not "my_copysignq2:.*\\bl\t%plt\\(__builtin_copysignq\\).*my_copysignq2" } } */ -/* { dg-final { scan-assembler-not "my_infq2:.*\\bl\t%plt\\(__builtin_infq\\).*my_infq2" } } */ -/* { dg-final { scan-assembler-not "my_huge_valq2:.*\\bl\t%plt\\(__builtin_huge_valq\\).*my_huge_valq2" } } */ -/* { dg-final { scan-assembler-not "my_nanq2:.*\\bl\t%plt\\(__builtin_nanq\\).*my_nanq2" } } */ -/* { dg-final { scan-assembler-not "my_nansq2:.*\\bl\t%plt\\(__builtin_nansq\\).*my_nansq2" } } */ - -__float128 -my_fabsq1 (__float128 a) -{ - return __builtin_fabsq (a); -} - -_Float128 -my_fabsq2 (_Float128 a) -{ - return __builtin_fabsq (a); -} - -__float128 -my_copysignq1 (__float128 a, __float128 b) -{ - return __builtin_copysignq (a, b); -} - -_Float128 -my_copysignq2 (_Float128 a, _Float128 b) -{ - return __builtin_copysignq (a, b); -} - -__float128 -my_infq1 (void) -{ - return __builtin_infq (); -} - -_Float128 -my_infq2 (void) -{ - return __builtin_infq (); -} - -__float128 -my_huge_valq1 (void) -{ - return __builtin_huge_valq (); -} - -_Float128 -my_huge_valq2 (void) -{ - return __builtin_huge_valq (); -} - -__float128 -my_nanq1 (void) -{ - return __builtin_nanq (""); -} - -_Float128 -my_nanq2 (void) -{ - return __builtin_nanq (""); -} - -__float128 -my_nansq1 (void) -{ - return __builtin_nansq (""); -} - -_Float128 -my_nansq2 (void) -{ - return __builtin_nansq (""); -} -
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2