x86: add memory clobber in switch_to()

Segment registers are reloaded, so we should add a memory clobber. The
generated assembly code is identical in my tests, but this doesn't mean
it is necessarily true for all configurations/compilers.

x86_64 already has the memory clobber.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Vegard Nossum 2008-09-14 19:03:53 +02:00 committed by Ingo Molnar
parent 3e6de5a393
commit 33f8c40a30

View File

@ -64,7 +64,10 @@ do { \
\
/* regparm parameters for __switch_to(): */ \
[prev] "a" (prev), \
[next] "d" (next)); \
[next] "d" (next) \
\
: /* reloaded segment registers */ \
"memory"); \
} while (0)
/*