2 /* { dg-do compile } */
3 /* { dg-skip-if "no register windows" { *-*-* } { "-mflat" } { "" } } */
4 /* { dg-require-effective-target ilp32 } */
5 /* { dg-options "-mcpu=ultrasparc -O" } */
7 /* Make sure references to the stack frame do not slip into the delay slot
8 of a return instruction. */
11 unsigned int descsize
;
13 struct crypto_shash
*tfm
;
16 struct crypto_shash
*tfm
;
19 void *__ctx
[] __attribute__((aligned(8)));
22 static inline unsigned int crypto_shash_descsize(struct crypto_shash
*tfm
)
27 static inline void *shash_desc_ctx(struct shash_desc
*desc
)
32 #define SHASH_DESC_ON_STACK(shash, ctx) \
33 char __##shash##_desc[sizeof(struct shash_desc) + \
34 crypto_shash_descsize(ctx)] __attribute__((aligned(8))); \
35 struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
37 extern int crypto_shash_update(struct shash_desc
*, const void *, unsigned int);
39 unsigned int bug(unsigned int crc
, const void *address
, unsigned int length
)
41 SHASH_DESC_ON_STACK(shash
, tfm
);
42 unsigned int *ctx
= (unsigned int *)shash_desc_ctx(shash
);
49 err
= crypto_shash_update(shash
, address
, length
);
53 /* { dg-final { scan-assembler "ld\[ \t\]*\\\[%i5\\+8\\\], %i0\n\[^\n\]*return\[ \t\]*%i7\\+8" } } */