aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/bug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86_64/bug.h')
-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 @@
9 */ 9 */
10struct bug_frame { 10struct bug_frame {
11 unsigned char ud2[2]; 11 unsigned char ud2[2];
12 unsigned char mov; 12 unsigned char push;
13 /* should use 32bit offset instead, but the assembler doesn't 13 signed int filename;
14 like it */
15 char *filename;
16 unsigned char ret; 14 unsigned char ret;
17 unsigned short line; 15 unsigned short line;
18} __attribute__((packed)); 16} __attribute__((packed));
@@ -25,8 +23,8 @@ struct bug_frame {
25 The magic numbers generate mov $64bitimm,%eax ; ret $offset. */ 23 The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
26#define BUG() \ 24#define BUG() \
27 asm volatile( \ 25 asm volatile( \
28 "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \ 26 "ud2 ; pushq $%c1 ; ret $%c0" :: \
29 "i"(__LINE__), "i" (__stringify(__FILE__))) 27 "i"(__LINE__), "i" (__FILE__))
30void out_of_line_bug(void); 28void out_of_line_bug(void);
31#else 29#else
32static inline void out_of_line_bug(void) { } 30static inline void out_of_line_bug(void) { }