lkml.org 
[lkml]   [1998]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: BUILD_SMP_TIMER_INTERRUPT not needed movl

    On Tue, 11 Aug 1998, Richard B. Johnson wrote:

    > On Tue, 11 Aug 1998, Andrea Arcangeli wrote:
    >
    > > >From arch/i386/kernel/irq.h
    > >
    > > #define BUILD_SMP_TIMER_INTERRUPT(x) \
    > > asmlinkage void x(struct pt_regs * regs); \
    > > __asm__( \
    > > "\n"__ALIGN_STR"\n" \
    > > SYMBOL_NAME_STR(x) ":\n\t" \
    > > "pushl $-1\n\t" \
    > > SAVE_ALL \
    > > "movl %esp,%eax\n\t" \
    > > ^^^^^^^^^^^^^^^^^^^^^^
    > > "pushl %eax\n\t" \
    > > "call "SYMBOL_NAME_STR(smp_##x)"\n\t" \
    > > "addl $4,%esp\n\t" \
    > > "jmp ret_from_intr\n");
    > >
    > > I don' t think that the underlined line is needed. Why not to push %esp
    > > directly?
    > >
    >
    > Is the stack-pointer value pushed, the value before the push or
    > the value after? The '386 pushes the value of SP after it is
    > decremented by the PUSH operation, the '486 and higher pushes the
    > value that existed before. If you want to maintain '386 operation,
    > you need to capture the SP as the code does.

    Yeah, tere are differences between x86 processors, but checking that the
    value pushed is the decremented or the original sp is a way to distinguish
    between 8086 and 80286 (I can't remember which way the 186 worked). All
    386+ push the unmodified %esp value, so I think Andrea is basically right.

    Gabriel.


    -
    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.altern.org/andrebalsa/doc/lkml-faq.html

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