gcc/testsuite/gcc.target/tic6x/builtins/smpy.c
raw| 1 | #include <c6x_intrinsics.h> |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | int a1 = 0x5000; |
| 6 | int b1 = 0xc000; |
| 7 | int a2 = 0xd000; |
| 8 | int b2 = 0x2000; |
| 9 | int c = 0x8000; |
| 10 | int main () |
| 11 | { |
| 12 | if (_smpy (a1, b1) != 0xd8000000) |
| 13 | abort (); |
| 14 | if (_smpy (a2, b2) != 0xf4000000) |
| 15 | abort (); |
| 16 | if (_smpy (c, c) != 0x7fffffff) |
| 17 | abort (); |
| 18 | |
| 19 | return 0; |
| 20 | } |