| 1 |
/* { dg-do run { target { riscv_v } } } */ |
| 2 |
/* { dg-additional-options "-std=c99" } */ |
| 3 |
|
| 4 |
#include "sat_arith.h" |
| 5 |
|
| 6 |
#define T uint16_t |
| 7 |
#define RUN_SAT_BINARY RUN_SAT_U_SUB_FMT_6 |
| 8 |
|
| 9 |
DEF_SAT_U_SUB_FMT_6(T) |
| 10 |
|
| 11 |
T test_data[][3] = { |
| 12 |
/* arg_0, arg_1, expect */ |
| 13 |
{ 0, 0, 0, }, |
| 14 |
{ 0, 1, 0, }, |
| 15 |
{ 1, 1, 0, }, |
| 16 |
{ 65535, 65534, 1, }, |
| 17 |
{ 65535, 65535, 0, }, |
| 18 |
{ 65534, 65535, 0, }, |
| 19 |
{ 65533, 65534, 0, }, |
| 20 |
{ 0, 65535, 0, }, |
| 21 |
{ 1, 65535, 0, }, |
| 22 |
{ 35, 5, 30, }, |
| 23 |
}; |
| 24 |
|
| 25 |
#include "scalar_sat_binary.h" |