[PATCH, GCC/ARM, 6/10] Clear GPRs inline when calling nscall function
[official-gcc.git] / gcc / testsuite / gcc.target / arm / crypto-vsha1mq_u32.c
blob676e64ce779cea34f4744e09a697bcfc64b4e3ba
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_crypto_ok } */
3 /* { dg-add-options arm_crypto } */
4 /* { dg-additional-options "-O3" } */
6 #include "arm_neon.h"
8 uint32_t foo (void)
11 uint32_t hash = 0xdeadbeef;
12 uint32x4_t a = {0, 1, 2, 3};
13 uint32x4_t b = {3, 2, 1, 0};
15 uint32x4_t res = vsha1mq_u32 (a, hash, b);
16 return res[0];
19 #define GET_LANE(lane) \
20 uint32x4_t foo_lane##lane (uint32x4_t val,uint32x4_t a, uint32x4_t b)\
21 { \
22 return vsha1mq_u32 (a, vgetq_lane_u32 (val, lane), b); \
25 #define TEST_SHA1M_VEC_SELECT(FUNC) \
26 FUNC (0) \
27 FUNC (1) \
28 FUNC (2) \
29 FUNC (3) \
31 TEST_SHA1M_VEC_SELECT (GET_LANE)
33 /* { dg-final { scan-assembler-times {sha1m.32\tq[0-9]+, q[0-9]+} 5 } } */
34 /* { dg-final { scan-assembler-times {vdup.32\tq[0-9]+, r[0-9]+} 3 } } */
35 /* { dg-final { scan-assembler-times {vmov.32\tr[0-9]+, d[0-9]+\[[0-9]+\]+} 4 } } */