diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/hotpatch-13.c')
-rw-r--r-- | gcc/testsuite/gcc.target/s390/hotpatch-13.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-13.c b/gcc/testsuite/gcc.target/s390/hotpatch-13.c new file mode 100644 index 00000000000..8d4adcadf0e --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/hotpatch-13.c @@ -0,0 +1,17 @@ +/* Functional tests for the function hotpatching feature. */ + +/* { dg-do compile } */ +/* { dg-options "-O3 -mzarch --save-temps" } */ + +#include <stdio.h> + +__attribute__ ((hotpatch(1,0))) +void hp1(void) +{ + printf("hello, world!\n"); +} + +/* Check number of occurences of certain instructions. */ +/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */ +/* { dg-final { scan-assembler-not "nop\t0" } } */ +/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */ |