diff options
author | Pan Li <pan2.li@intel.com> | 2024-09-25 09:42:31 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-09-30 07:24:36 +0800 |
commit | a2a78c0639dbebdab19d71f54edca99e7f9094fd (patch) | |
tree | d9de69728fedc5a655efd5692fc73041a584059d /include/gdb/gdb-index.h | |
parent | b6ea98bcaf1dad506fa643df8df50187feeb7e35 (diff) | |
download | gcc-a2a78c0639dbebdab19d71f54edca99e7f9094fd.zip gcc-a2a78c0639dbebdab19d71f54edca99e7f9094fd.tar.gz gcc-a2a78c0639dbebdab19d71f54edca99e7f9094fd.tar.bz2 |
RISC-V: Add testcases for form 1 of scalar signed SAT_SUB
Form 1:
#define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \
T __attribute__((noinline)) \
sat_s_sub_##T##_fmt_1 (T x, T y) \
{ \
T minus = (UT)x - (UT)y; \
return (x ^ y) >= 0 \
? minus \
: (minus ^ x) >= 0 \
? minus \
: x < 0 ? MIN : MAX; \
}
DEF_SAT_S_SUB_FMT_1(int8_t, uint8_t, INT8_MIN, INT8_MAX)
The below test are passed for this patch.
* The rv64gcv fully regression test.
It is test only patch and obvious up to a point, will commit it
directly if no comments in next 48H.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat_arith.h: Add test helper macros.
* gcc.target/riscv/sat_arith_data.h: Add test data for SAT_SUB.
* gcc.target/riscv/sat_s_sub-1-i16.c: New test.
* gcc.target/riscv/sat_s_sub-1-i32.c: New test.
* gcc.target/riscv/sat_s_sub-1-i64.c: New test.
* gcc.target/riscv/sat_s_sub-1-i8.c: New test.
* gcc.target/riscv/sat_s_sub-run-1-i16.c: New test.
* gcc.target/riscv/sat_s_sub-run-1-i32.c: New test.
* gcc.target/riscv/sat_s_sub-run-1-i64.c: New test.
* gcc.target/riscv/sat_s_sub-run-1-i8.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'include/gdb/gdb-index.h')
0 files changed, 0 insertions, 0 deletions