OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [devirt2.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2" }
3
/* Using -mshort-calls avoids loading the function addresses in
4
   registers and thus getting the counts wrong.  */
5
// { dg-additional-options "-mshort-calls" {target epiphany-*-*} }
6
// Using -mno-abicalls avoids a R_MIPS_JALR .reloc.
7
// { dg-additional-options "-mno-abicalls" { target mips*-*-* } }
8
// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* *-*-mingw* } } } } }
9
// For *-*-mingw* there is additionally one .def match
10
// { dg-final { scan-assembler-times "xyzzy" 3 { target *-*-mingw* } } }
11
// The IA64 and HPPA compilers generate external declarations in addition
12
// to the call so those scans need to be more specific.
13
// { dg-final { scan-assembler-times "br\[^\n\]*xyzzy" 2 { target ia64*-*-hpux* } } }
14
// { dg-final { scan-assembler-times "xyzzy\[^\n\]*,%r" 2 { target hppa*-*-* } } }
15
// If assembler supports explicit relocation directives, the alpha compiler generates
16
// literal/lituse_jsr pairs, so the scans need to be more specific.
17
// { dg-final { scan-assembler-times "jsr\[^\n\]*xyzzy" 2 { target alpha*-*-* } } }
18
// Unless the assembler supports -relax, the 32-bit SPARC compiler generates
19
// sethi/jmp instead of just call, so the scans need to be more specific.
20
// With subexpressions, Tcl regexp -inline -all returns both the complete
21
// match and the subexpressions, so double the count.
22
// { dg-final { scan-assembler-times "\(jmp|call\)\[^\n\]*xyzzy" 4 { target sparc*-*-* } } }
23
 
24
struct S { S(); virtual void xyzzy(); };
25
struct R { int a; S s; R(); };
26
S s;
27
R r;
28
inline void foo(S *p) { p->xyzzy(); }
29
void bar() {foo(&s);}
30
void bah() {foo(&r.s);}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.