aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorCarl Love <cel@linux.ibm.com>2024-07-09 13:17:28 -0400
committerCarl Love <cel@linux.ibm.com>2024-07-09 13:34:39 -0400
commit6031e34af130d114a7a3de0108fdb39360e8b1b3 (patch)
treeab57d3eb9ac48ce753ceb437a812c43666478501 /gcc/doc
parent224cc560a6ac19c9454038efe6230096b46f4806 (diff)
downloadgcc-6031e34af130d114a7a3de0108fdb39360e8b1b3.zip
gcc-6031e34af130d114a7a3de0108fdb39360e8b1b3.tar.gz
gcc-6031e34af130d114a7a3de0108fdb39360e8b1b3.tar.bz2
rs6000, fix error in unsigned vector float to unsigned int built-in definitions
The built-in __builtin_vsx_vunsigned_v2df is supposed to take a vector of doubles and return a vector of unsigned long long ints. Similarly __builtin_vsx_vunsigned_v4sf takes a vector of floats an is supposed to return a vector of unsinged ints. The definitions are using the signed version of the instructions not the unsigned version of the instruction. The results should also be unsigned. The built-ins are used by the overloaded vec_unsigned built-in which has an unsigned result. Similarly the built-ins __builtin_vsx_vunsignede_v2df and __builtin_vsx_vunsignedo_v2df are supposed to return an unsigned result. If the floating point argument is negative, the unsigned result is zero. The built-ins are used in the overloaded built-in vec_unsignede and vec_unsignedo respectively. Add a test cases for a negative floating point arguments for each of the above built-ins. gcc/ChangeLog: * config/rs6000/rs6000-builtins.def (__builtin_vsx_vunsigned_v2df, __builtin_vsx_vunsigned_v4sf, __builtin_vsx_vunsignede_v2df, __builtin_vsx_vunsignedo_v2df): Change the result type to unsigned. gcc/testsuite/ChangeLog: * gcc.target/powerpc/builtins-3-runnable.c: Add tests for vec_unsignede and vec_unsignedo with negative arguments.
Diffstat (limited to 'gcc/doc')
0 files changed, 0 insertions, 0 deletions