summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c
blob: 7e92bb96ad2166fd15eaa4564e549f3dbebb9568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Testcase to check generation of a SH2A specific,
   TBR relative jump instruction - 'JSR @@(disp8,TBR)'.  */
/* { dg-do compile { target { sh2a } } }  */
/* { dg-options "" } */
/* { dg-final { scan-assembler-times "jsr/n\\t@@\\(40,tbr\\)" 1} } */
/* { dg-final { scan-assembler-times "jsr/n\\t@@\\(72,tbr\\)" 1} } */
 
extern void foo1 (void) __attribute__ ((function_vector(10)));
extern void foo2 (void);
extern int bar1 (void) __attribute__ ((function_vector(18)));
extern int bar2 (void);

int
bar()
{
  foo1();
  foo2();

  bar1();
  bar2();
}