Messages in this thread | | | Subject | Re: [PATCH] 2.1.131: i386 tweak to switch_to() | Date | Tue, 15 Dec 1998 13:47:48 -0300 | From | Horst von Brand <> |
| |
Andrea Arcangeli <andrea@e-mind.com> said: > On Sat, 12 Dec 1998, Jamie Lokier wrote: > >+ :"ebx", "ecx", "esi", "edi", "cc", "memory"); \ > ^^^^^^^^^^^^^^ > > What is "cc" and why we need to declare "memory" clobbered after using > __switch_to()?
"cc" is condition flags; "memory" is clobbered each time you write to something that is not in the arguments. Clobbering "memory" is used to singal gcc that it can't assume that memory is unchanged (i.e., reuse a value in memory that just happens to be in a register), and also has the side effect that it acts as a barrier: No reordering of instructions will move stuff over the asm() because of the above. -- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |