aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/bug.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-09 11:51:35 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-09 11:51:35 -0400
commitc973b112c76c9d8fd042991128f218a738cc8d0a (patch)
treee813b0da5d0a0e19e06de6462d145a29ad683026 /include/asm-x86_64/bug.h
parentc5fbc3966f48279dbebfde10248c977014aa9988 (diff)
parent00dd1e433967872f3997a45d5adf35056fdf2f56 (diff)
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'include/asm-x86_64/bug.h')
-rw-r--r--include/asm-x86_64/bug.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h
index 3d2a666a5dd..eed78566728 100644
--- a/include/asm-x86_64/bug.h
+++ b/include/asm-x86_64/bug.h
@@ -8,17 +8,24 @@
8 * this frame. 8 * this frame.
9 */ 9 */
10struct bug_frame { 10struct bug_frame {
11 unsigned char ud2[2]; 11 unsigned char ud2[2];
12 unsigned char mov;
12 /* should use 32bit offset instead, but the assembler doesn't 13 /* should use 32bit offset instead, but the assembler doesn't
13 like it */ 14 like it */
14 char *filename; 15 char *filename;
16 unsigned char ret;
15 unsigned short line; 17 unsigned short line;
16} __attribute__((packed)); 18} __attribute__((packed));
17 19
18#ifdef CONFIG_BUG 20#ifdef CONFIG_BUG
19#define HAVE_ARCH_BUG 21#define HAVE_ARCH_BUG
20#define BUG() \ 22/* We turn the bug frame into valid instructions to not confuse
21 asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ 23 the disassembler. Thanks to Jan Beulich & Suresh Siddha
24 for nice instruction selection.
25 The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
26#define BUG() \
27 asm volatile( \
28 "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \
22 "i"(__LINE__), "i" (__stringify(__FILE__))) 29 "i"(__LINE__), "i" (__stringify(__FILE__)))
23void out_of_line_bug(void); 30void out_of_line_bug(void);
24#else 31#else