x86: Clean up the loadsegment() macro
Make it readable in the source too, not just in the assembly output. No change in functionality. Cc: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1259176706-5908-1-git-send-email-brgerst@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Родитель
79b0379cee
Коммит
64b028b226
|
@ -157,16 +157,18 @@ extern void native_load_gs_index(unsigned);
|
|||
*/
|
||||
#define loadsegment(seg, value) \
|
||||
do { \
|
||||
unsigned short __val = value; \
|
||||
asm volatile("\n" \
|
||||
"1:\t" \
|
||||
"movl %k0,%%" #seg "\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"2:\t" \
|
||||
"xorl %k0,%k0\n\t" \
|
||||
"jmp 1b\n" \
|
||||
".previous\n" \
|
||||
unsigned short __val = (value); \
|
||||
\
|
||||
asm volatile(" \n" \
|
||||
"1: movl %k0,%%" #seg " \n" \
|
||||
\
|
||||
".section .fixup,\"ax\" \n" \
|
||||
"2: xorl %k0,%k0 \n" \
|
||||
" jmp 1b \n" \
|
||||
".previous \n" \
|
||||
\
|
||||
_ASM_EXTABLE(1b, 2b) \
|
||||
\
|
||||
: "+r" (__val) : : "memory"); \
|
||||
} while (0)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче