Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / bcd-2.c
blobcb66da9e5cb04519250ef6d312dcd42cb04386f9
1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */
4 /* { dg-require-effective-target powerpc_vsx } */
5 /* { dg-final { scan-assembler-times "bcdadd\[.\] " 2 } } */
6 /* { dg-final { scan-assembler-times "bcdsub\[.\] " 2 } } */
7 /* { dg-final { scan-assembler-not "bl __builtin" } } */
8 /* { dg-final { scan-assembler-not "mtvsr" } } */
9 /* { dg-final { scan-assembler-not "mfvsr" } } */
10 /* { dg-final { scan-assembler-not "lvx" } } */
11 /* { dg-final { scan-assembler-not "lxvw4x" } } */
12 /* { dg-final { scan-assembler-not "lxvd2x" } } */
13 /* { dg-final { scan-assembler-not "stvx" } } */
14 /* { dg-final { scan-assembler-not "stxvw4x" } } */
15 /* { dg-final { scan-assembler-not "stxvd2x" } } */
17 #include <altivec.h>
19 typedef __int128_t __attribute__((__vector_size__(16))) vector_128_t;
20 typedef __int128_t scalar_128_t;
21 typedef unsigned long long scalar_64_t;
23 vector_128_t
24 do_add_0 (vector_128_t a, vector_128_t b)
26 return __builtin_bcdadd (a, b, 0);
29 vector_128_t
30 do_add_1 (vector_128_t a, vector_128_t b)
32 return __builtin_bcdadd (a, b, 1);
35 vector_128_t
36 do_sub_0 (vector_128_t a, vector_128_t b)
38 return __builtin_bcdsub (a, b, 0);
41 vector_128_t
42 do_sub_1 (vector_128_t a, vector_128_t b)
44 return __builtin_bcdsub (a, b, 1);