Debian Codegraph @

gcc/testsuite/gcc.target/tic6x/builtins/smpylh.c

raw
1 #include <c6x_intrinsics.h>
2
3 extern void abort (void);
4
5 int a1 = 0x5000;
6 int b1 = 0xc0000000;
7 int a2 = 0xd000;
8 int b2 = 0x20000000;
9 int c = 0x8000;
10 int main ()
11 {
12 if (_smpylh (a1, b1) != 0xd8000000)
13 abort ();
14 if (_smpylh (a2, b2) != 0xf4000000)
15 abort ();
16 if (_smpylh (c, 0x80000000) != 0x7fffffff)
17 abort ();
18 if (_smpyhl (b1, a1) != 0xd8000000)
19 abort ();
20 if (_smpyhl (b2, a2) != 0xf4000000)
21 abort ();
22 if (_smpyhl (0x80000000, c) != 0x7fffffff)
23 abort ();
24
25 return 0;
26 }