lkml.org 
[lkml]   [1998]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] 2.1.131: i386 tweak to switch_to()
    Date
    From
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:46    [W:0.021 / U:31.368 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site