| 1 |
/* { dg-do run { target { riscv_v } } } */ |
| 2 |
/* { dg-additional-options "-std=c99" } */ |
| 3 |
|
| 4 |
#include "sat_arith.h" |
| 5 |
|
| 6 |
#define T uint32_t |
| 7 |
#define RUN_SAT_BINARY RUN_SAT_U_SUB_FMT_8 |
| 8 |
|
| 9 |
DEF_SAT_U_SUB_FMT_8(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 |
{ 4294967295, 4294967294, 1, }, |
| 17 |
{ 4294967295, 4294967295, 0, }, |
| 18 |
{ 4294967294, 4294967295, 0, }, |
| 19 |
{ 4294967293, 4294967294, 0, }, |
| 20 |
{ 1, 4294967295, 0, }, |
| 21 |
{ 2, 4294967295, 0, }, |
| 22 |
{ 5, 1, 4, }, |
| 23 |
}; |
| 24 |
|
| 25 |
#include "scalar_sat_binary.h" |