Skip to content
Snippets Groups Projects
Commit cb0b8b62 authored by Pan Li's avatar Pan Li
Browse files

RISC-V: Add testcases for unsigned scalar .SAT_SUB IMM form 3


This patch would like to add test cases for the unsigned scalar
.SAT_SUB IMM form 3.  Aka:

Form 3:
  #define DEF_SAT_U_SUB_IMM_FMT_3(T, IMM) \
  T __attribute__((noinline))             \
  sat_u_sub_imm##IMM##_##T##_fmt_3 (T y)  \
  {                                       \
    return (T)IMM > y ? (T)IMM - y : 0;   \
  }

DEF_SAT_U_SUB_IMM_FMT_3(uint64_t, 23)

The below test is passed for this patch.
* The rv64gcv regression test.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/sat_arith.h: Add test helper macros.
	* gcc.target/riscv/sat_u_sub_imm-10.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-10_1.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-10_2.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-11.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-11_1.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-11_2.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-12.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-9.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-9_1.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-9_2.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-run-10.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-run-11.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-run-12.c: New test.
	* gcc.target/riscv/sat_u_sub_imm-run-9.c: New test.

Signed-off-by: default avatarPan Li <pan2.li@intel.com>
parent ef84d2fe
No related branches found
No related tags found
Loading
Showing
with 432 additions and 0 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment