aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/or1k/call-1.c
blob: 593e402d21c6df46c3cebf647b3ffe5db9ae7408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -mcmodel=large" } */

/* Generate local and global function calls. */

extern int geti (void);

__attribute__ ((noinline)) int
calc (int a, int b)
{
  return a * b + 255;
}

int
main (void)
{
  return geti () + calc (3, 4);
}

/* Ensure the 2 calls use register not immediate jumps.  */
/* { dg-final { scan-assembler-times "l.movhi\\s+" 2 } } */
/* { dg-final { scan-assembler-times "l.jalr\\s+" 2 } } */