| 1 |
/* Functional tests for the function hotpatching feature. */ |
| 2 |
|
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-mzarch" } */ |
| 5 |
|
| 6 |
/* Without optimization extra NOPs will be added just to attach |
| 7 |
location info to it. Don't run the test in that case. The torture |
| 8 |
framework always appears to run the testcase without -O option |
| 9 |
first. */ |
| 10 |
|
| 11 |
/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */ |
| 12 |
|
| 13 |
#include <stdio.h> |
| 14 |
|
| 15 |
void hp1(void) |
| 16 |
{ |
| 17 |
printf("hello, world!\n"); |
| 18 |
} |
| 19 |
|
| 20 |
/* Check number of occurences of certain instructions. */ |
| 21 |
/* { dg-final { scan-assembler-not "pre-label NOPs" } } */ |
| 22 |
/* { dg-final { scan-assembler-not "post-label NOPs" } } */ |
| 23 |
/* { dg-final { scan-assembler-not "nopr\t%r0" } } */ |
| 24 |
/* { dg-final { scan-assembler-not "nop\t0" } } */ |
| 25 |
/* { dg-final { scan-assembler-not "brcl\t0, 0" } } */ |
| 26 |
/* { dg-final { scan-assembler-not "alignment for hotpatch" } } */ |