summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-09-12 18:49:25 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 10:50:58 -0700
commit049cdefe19f95b67b06b70915cd8e4ae7173337a (patch)
tree42a0846ec18e3c4f705f8f167890675c5978a814 /include
parentc47a3167d0454c0af5fb0a0322b01a0e3487798e (diff)
[PATCH] x86-64: reduce x86-64 bug frame by 4 bytes
As mentioned before, the size of the bug frame can be further reduced while continuing to use instructions to encode the information. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86_64/bug.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h
index eed785667289..80ac1fe966ac 100644
--- a/include/asm-x86_64/bug.h
+++ b/include/asm-x86_64/bug.h
@@ -9,10 +9,8 @@
*/
struct bug_frame {
unsigned char ud2[2];
- unsigned char mov;
- /* should use 32bit offset instead, but the assembler doesn't
- like it */
- char *filename;
+ unsigned char push;
+ signed int filename;
unsigned char ret;
unsigned short line;
} __attribute__((packed));
@@ -25,8 +23,8 @@ struct bug_frame {
The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
#define BUG() \
asm volatile( \
- "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \
- "i"(__LINE__), "i" (__stringify(__FILE__)))
+ "ud2 ; pushq $%c1 ; ret $%c0" :: \
+ "i"(__LINE__), "i" (__FILE__))
void out_of_line_bug(void);
#else
static inline void out_of_line_bug(void) { }