The rv32 doesn't support __uint128, and then we will have
error like below during test.
error: '__int128' is not supported on this target.
Thus, we disable the uint128_t related test when rv32.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat/sat_arith.h: Add xlen check for
uint128_t.
* gcc.target/riscv/sat/sat_u_mul-run-1-u16-from-u128.c: Enable
run test for rv64 only.
* gcc.target/riscv/sat/sat_u_mul-run-1-u32-from-u128.c: Ditto.
* gcc.target/riscv/sat/sat_u_mul-run-1-u64-from-u128.c: Ditto.
* gcc.target/riscv/sat/sat_u_mul-run-1-u8-from-u128.c: Ditto.
Signed-off-by: Pan Li <pan2.li@intel.com>
#include <stdint-gcc.h>
#include <stdbool.h>
-typedef __uint128_t uint128_t;
+#if __riscv_xlen == 64
+typedef unsigned __int128 uint128_t;
+#endif
/******************************************************************************/
/* Saturation Add (unsigned and signed) */
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do run { target { rv64 } } } */
/* { dg-additional-options "-std=c99" } */
#include "sat_arith.h"
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do run { target { rv64 } } } */
/* { dg-additional-options "-std=c99" } */
#include "sat_arith.h"
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do run { target { rv64 } } } */
/* { dg-additional-options "-std=c99" } */
#include "sat_arith.h"
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do run { target { rv64 } } } */
/* { dg-additional-options "-std=c99" } */
#include "sat_arith.h"