bfin-longcall-1.c: New file.

* gcc.dg/bfin-longcall-1.c: New file.
	* gcc.dg/bfin-longcall-2.c: New file.

From-SVN: r102277
This commit is contained in:
Bernd Schmidt 2005-07-22 09:46:30 +00:00 committed by Bernd Schmidt
parent 32cafd7366
commit 0fb6f88ac7
3 changed files with 71 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-07-22 Bernd Schmidt <bernd.schmidt@analog.com>
* gcc.dg/bfin-longcall-1.c: New file.
* gcc.dg/bfin-longcall-2.c: New file.
2005-07-21 Janis Johnson <janis187@us.ibm.com>
* gcc.c-torture/compile/20050721-1.c: New test for 3.4 fix.

View File

@ -0,0 +1,33 @@
/* { dg-do compile { target bfin-*-* } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "call\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler-not "jump\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler "call\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler "jump\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler "call\[^\\n\]*bar" } } */
/* { dg-final { scan-assembler "jump\[^\\n\]*bar" } } */
extern void foo () __attribute__((longcall));
extern void bar () __attribute__((shortcall));
extern void baz ();
int t1 ()
{
foo ();
bar ();
baz ();
return 4;
}
void t2 ()
{
foo ();
}
void t3 ()
{
bar ();
}
void t4 ()
{
baz ();
}

View File

@ -0,0 +1,33 @@
/* { dg-do compile { target bfin-*-* } } */
/* { dg-options "-O2 -mlong-calls" } */
/* { dg-final { scan-assembler-not "call\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler-not "jump\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler-not "call\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler-not "jump\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler "call\[^\\n\]*bar" } } */
/* { dg-final { scan-assembler "jump\[^\\n\]*bar" } } */
extern void foo () __attribute__((longcall));
extern void bar () __attribute__((shortcall));
extern void baz ();
int t1 ()
{
foo ();
bar ();
baz ();
return 4;
}
void t2 ()
{
foo ();
}
void t3 ()
{
bar ();
}
void t4 ()
{
baz ();
}