blob: b105a199f1a90932d9dc43001687bb4b22fecaf8 [file] [log] [blame]
Galina Kistanova0ccb31c2011-06-03 22:24:54 +00001// REQUIRES: x86-registered-target
2
Sebastian Pop9ec60df2012-01-20 22:01:23 +00003// RUN: %clang -target i386-apple-darwin -S -o - %s | \
Nick Lewycky5b5828b2011-02-02 07:17:02 +00004// 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
Sebastian Pop9ec60df2012-01-20 22:01:23 +000012// RUN: %clang -target i386-pc-linux-gnu -S -o - %s | \
Nick Lewycky5b5828b2011-02-02 07:17:02 +000013// 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
Sebastian Pop9ec60df2012-01-20 22:01:23 +000021// RUN: %clang -target 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
Sebastian Pop9ec60df2012-01-20 22:01:23 +000030// RUN: %clang -target 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(); }