diff options
author | Kelvin Nilsen <kelvin@gcc.gnu.org> | 2016-12-17 00:18:32 +0000 |
---|---|---|
committer | Kelvin Nilsen <kelvin@gcc.gnu.org> | 2016-12-17 00:18:32 +0000 |
commit | 6040f6d49773e67d9a847e920bbbb3b1d62f2560 (patch) | |
tree | ea9851d8e7e5138b16ac4e64d27516b89184c168 /gcc/doc | |
parent | 68dde2bfdd3fe5e400a0155c421066902a634b8d (diff) | |
download | gcc-6040f6d49773e67d9a847e920bbbb3b1d62f2560.zip gcc-6040f6d49773e67d9a847e920bbbb3b1d62f2560.tar.gz gcc-6040f6d49773e67d9a847e920bbbb3b1d62f2560.tar.bz2 |
byte-in-either-range-0.c: New test.
gcc/testsuite/ChangeLog:
2016-12-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/byte-in-either-range-0.c: New test.
* gcc.target/powerpc/byte-in-either-range-1.c: New test.
* gcc.target/powerpc/byte-in-range-0.c: New test.
* gcc.target/powerpc/byte-in-range-1.c: New test.
* gcc.target/powerpc/byte-in-set-0.c: New test.
* gcc.target/powerpc/byte-in-set-1.c: New test.
* gcc.target/powerpc/byte-in-set-2.c: New test.
gcc/ChangeLog:
2016-12-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/altivec.md (UNSPEC_CMPRB): New unspec value.
(UNSPEC_CMPRB2): New unspec value.
(UNSPEC_CMPEQB): New unspec value.
(cmprb): New expansion.
(*cmprb_internal): New insn.
(*setb_internal): New insn.
(cmprb2): New expansion.
(*cmprb2_internal): New insn.
(cmpeqb): New expansion.
(*cmpeqb_internal): New insn.
* config/rs6000/rs6000-builtin.def (BU_P9_2): New macro.
(BU_P9_64BIT_2): Likewise.
(BU_P9_OVERLOAD_2): Likewise.
(CMPRB): Add byte-in-range built-in function.
(CMBRB2): Add byte-in-either-range built-in function.
(CMPEQB): Add byte-in-set built-in function.
(CMPRB): Add overload support for byte-in-range function.
(CMPRB2): Add overload support for byte-in-either-range function.
(CMPEQB): Add overload support for byte-in-set built-in function.
* config/rs6000/rs6000-c.c (P9_BUILTIN_CMPRB): Macro expansion to
define argument types for new builtin.
(P9_BUILTIN_CMPRB2): Likewise.
(P9_BUILTIN_CMPEQB): Likewise.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Rearrange
the order of presentation for certain built-in functions
(scalar_extract_exp, scalar_extract_sig, scalar_insert_exp)
(scalar_cmp_exp_gt, scalar_cmp_exp_lt, scalar_cmp_exp_eq)
(scalar_cmp_exp_unordered, scalar_test_data_class)
(scalar_test_neg) to improve locality and flow. Document
the new __builtin_scalar_byte_in_set,
__builtin_scalar_byte_in_range, and
__builtin_scalar_byte_in_either_range functions.
From-SVN: r243770
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 56 |
1 files changed, 39 insertions, 17 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 4a05e50..1f303bc 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -15117,6 +15117,27 @@ long long __builtin_darn (void); long long __builtin_darn_raw (void); int __builtin_darn_32 (void); +unsigned int scalar_extract_exp (double source); +unsigned long long int scalar_extract_sig (double source); + +double +scalar_insert_exp (unsigned long long int significand, unsigned long long int exponent); + +int scalar_cmp_exp_gt (double arg1, double arg2); +int scalar_cmp_exp_lt (double arg1, double arg2); +int scalar_cmp_exp_eq (double arg1, double arg2); +int scalar_cmp_exp_unordered (double arg1, double arg2); + +int scalar_test_data_class (float source, unsigned int condition); +int scalar_test_data_class (double source, unsigned int condition); + +int scalar_test_neg (float source); +int scalar_test_neg (double source); + +int __builtin_byte_in_set (unsigned char u, unsigned long long set); +int __builtin_byte_in_range (unsigned char u, unsigned int range); +int __builtin_byte_in_either_range (unsigned char u, unsigned int ranges); + int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal64 value); int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal128 value); int __builtin_dfp_dtstsfi_lt_dd (unsigned int comparison, _Decimal64 value); @@ -15136,23 +15157,6 @@ int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal64 value); int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal128 value); int __builtin_dfp_dtstsfi_ov_dd (unsigned int comparison, _Decimal64 value); int __builtin_dfp_dtstsfi_ov_td (unsigned int comparison, _Decimal128 value); - -unsigned int scalar_extract_exp (double source); -unsigned long long int scalar_extract_sig (double source); - -double -scalar_insert_exp (unsigned long long int significand, unsigned long long int exponent); - -int scalar_cmp_exp_gt (double arg1, double arg2); -int scalar_cmp_exp_lt (double arg1, double arg2); -int scalar_cmp_exp_eq (double arg1, double arg2); -int scalar_cmp_exp_unordered (double arg1, double arg2); - -int scalar_test_data_class (float source, unsigned int condition); -int scalar_test_data_class (double source, unsigned int condition); - -int scalar_test_neg (float source); -int scalar_test_neg (double source); @end smallexample The @code{__builtin_darn} and @code{__builtin_darn_raw} @@ -15207,6 +15211,24 @@ If all of the enabled test conditions are false, the return value is 0. The @code{scalar_test_neg} built-in functions return a non-zero value if their @code{source} argument holds a negative value. +The @code{__builtin_byte_in_set} function requires a +64-bit environment supporting ISA 3.0 or later. This function returns +a non-zero value if and only if its @code{u} argument exactly equals one of +the eight bytes contained within its 64-bit @code{set} argument. + +The @code{__builtin_byte_in_range} and +@code{__builtin_byte_in_either_range} require an environment +supporting ISA 3.0 or later. For these two functions, the +@code{range} argument is encoded as 4 bytes, organized as +@code{hi_1:lo_1:hi_2:lo_2}. +The @code{__builtin_byte_in_range} function returns a +non-zero value if and only if its @code{u} argument is within the +range bounded between @code{lo_2} and @code{hi_2} inclusive. +The @code{__builtin_byte_in_either_range} function returns non-zero if +and only if its @code{u} argument is within either the range bounded +between @code{lo_1} and @code{hi_1} inclusive or the range bounded +between @code{lo_2} and @code{hi_2} inclusive. + The @code{__builtin_dfp_dtstsfi_lt} function returns a non-zero value if and only if the number of signficant digits of its @code{value} argument is less than its @code{comparison} argument. The |