diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:29 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:29 -0400 |
commit | ecaf45ee5ce60afe7cc46e91d82c1b0cbda09387 (patch) | |
tree | 09ff150151dc6724f250da068c2653dc13b4e3c0 /include/asm-i386/frame.i | |
parent | 07c9819b31eda7954feddc83f2fae035f31c11e1 (diff) |
[PATCH] i386: Redo semaphore and rwlock assembly helpers
- Move them to a pure assembly file. Previously they were in
a C file that only consisted of inline assembly. Doing it in pure
assembler is much nicer.
- Add a frame.i include with FRAME/ENDFRAME macros to easily
add frame pointers to assembly functions
- Add dwarf2 annotation to them so that the new dwarf2 unwinder
doesn't get stuck on them
- Random cleanups
Includes feedback from Jan Beulich and a UML build fix from Andrew
Morton.
Cc: jbeulich@novell.com
Cc: jdike@addtoit.com
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-i386/frame.i')
-rw-r--r-- | include/asm-i386/frame.i | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-i386/frame.i b/include/asm-i386/frame.i new file mode 100644 index 000000000000..4d68ddce18b6 --- /dev/null +++ b/include/asm-i386/frame.i | |||
@@ -0,0 +1,24 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <asm/dwarf2.h> | ||
3 | |||
4 | /* The annotation hides the frame from the unwinder and makes it look | ||
5 | like a ordinary ebp save/restore. This avoids some special cases for | ||
6 | frame pointer later */ | ||
7 | #ifdef CONFIG_FRAME_POINTER | ||
8 | .macro FRAME | ||
9 | pushl %ebp | ||
10 | CFI_ADJUST_CFA_OFFSET 4 | ||
11 | CFI_REL_OFFSET ebp,0 | ||
12 | movl %esp,%ebp | ||
13 | .endm | ||
14 | .macro ENDFRAME | ||
15 | popl %ebp | ||
16 | CFI_ADJUST_CFA_OFFSET -4 | ||
17 | CFI_RESTORE ebp | ||
18 | .endm | ||
19 | #else | ||
20 | .macro FRAME | ||
21 | .endm | ||
22 | .macro ENDFRAME | ||
23 | .endm | ||
24 | #endif | ||