Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200640
b: refs/heads/master
c: 9c69520
h: refs/heads/master
v: v3
  • Loading branch information
Mikael Pettersson authored and Linus Torvalds committed Jun 29, 2010
1 parent d089536 commit ac1cd84
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2952095c6b2eefd068dda0dee6317cf95155a304
refs/heads/master: 9c695203a7ddbe49dba5f22f4c941d24f47475df
10 changes: 9 additions & 1 deletion trunk/include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@
* naked functions because then mcount is called without stack and frame pointer
* being set up and there is no chance to restore the lr register to the value
* before mcount was called.
*
* The asm() bodies of naked functions often depend on standard calling conventions,
* therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
* this, so we must do so ourselves. See GCC PR44290.
*/
#define __naked __attribute__((naked)) notrace
#define __naked __attribute__((naked)) noinline __noclone notrace

#define __noreturn __attribute__((noreturn))

Expand All @@ -85,3 +89,7 @@
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
#define gcc_header(x) _gcc_header(x)
#include gcc_header(__GNUC__)

#if !defined(__noclone)
#define __noclone /* not needed */
#endif
4 changes: 4 additions & 0 deletions trunk/include/linux/compiler-gcc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
* unreleased. Really, we need to have autoconf for the kernel.
*/
#define unreachable() __builtin_unreachable()

/* Mark a function definition as prohibited from being cloned. */
#define __noclone __attribute__((__noclone__))

#endif

#endif
Expand Down

0 comments on commit ac1cd84

Please sign in to comment.