blob: 4e8e946210deb6628791f150100d0e58c4af3a6c [file] [log] [blame]
Galina Kistanova0ccb31c2011-06-03 22:24:54 +00001// REQUIRES: x86-registered-target
2
Nick Lewycky5b5828b2011-02-02 07:17:02 +00003// RUN: %clang -ccc-host-triple i386-apple-darwin -S -o - %s | \
4// RUN: FileCheck --check-prefix=DARWIN %s
5// DARWIN: f0:
6// DARWIN: pushl %ebp
7// DARWIN: ret
8// DARWIN: f1:
9// DARWIN: pushl %ebp
10// DARWIN: ret
Daniel Dunbar1ad66482010-07-01 01:31:45 +000011
Nick Lewycky5b5828b2011-02-02 07:17:02 +000012// RUN: %clang -ccc-host-triple i386-pc-linux-gnu -S -o - %s | \
13// RUN: FileCheck --check-prefix=LINUX %s
14// LINUX: f0:
15// LINUX-NOT: pushl %ebp
16// LINUX: ret
17// LINUX: f1:
18// LINUX: pushl %ebp
19// LINUX: ret
20
21// RUN: %clang -ccc-host-triple i386-darwin -S -o - -fomit-frame-pointer %s | \
Daniel Dunbar1ad66482010-07-01 01:31:45 +000022// RUN: FileCheck --check-prefix=OMIT_ALL %s
23// OMIT_ALL: f0:
24// OMIT_ALL-NOT: pushl %ebp
25// OMIT_ALL: ret
26// OMIT_ALL: f1:
27// OMIT_ALL-NOT: pushl %ebp
28// OMIT_ALL: ret
29
Nick Lewycky5b5828b2011-02-02 07:17:02 +000030// RUN: %clang -ccc-host-triple i386-darwin -S -o - -momit-leaf-frame-pointer %s | \
Daniel Dunbar1ad66482010-07-01 01:31:45 +000031// RUN: FileCheck --check-prefix=OMIT_LEAF %s
32// OMIT_LEAF: f0:
33// OMIT_LEAF-NOT: pushl %ebp
34// OMIT_LEAF: ret
35// OMIT_LEAF: f1:
36// OMIT_LEAF: pushl %ebp
37// OMIT_LEAF: ret
38
39void f0() {}
40void f1() { f0(); }