Linux-kernel mailing list archive 1999-21,: BUG: incorrect inline assembly in asm-i386/system.h

# BUG: incorrect inline assembly in asm-i386/system.h

Philipp Thomas (kthomas@gwdg.de)
Sun, 23 May 1999 03:01:46 GMT

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Cougar: "Re: access to proc filesystem from chrooted process"
- Previous message: Brian: "Re: linux-2.2.9/traceroute/packet loss"

Egcs (current CVS version) quits compiling 2.3.3 with:

sched.c: In function `schedule':
sched.c:823: Invalid `asm' statement:
sched.c:823: fixed or forbidden register 6 (bp) was spilled for class
GENERAL_REGS.

As it looks the culprit is switch_to from include/asm-1386/system.h.

So could anyone with enough knowledge of gcc inline assembly tell me how the
constraints should/could be changed in order to satisfy egcs ? :

#define switch_to(prev,next,last) do { \
asm volatile("pushl %%esi\n\t" \
"pushl %%edi\n\t" \
"pushl %%ebp\n\t" \
"movl %%esp,%0\n\t" /* save ESP */ \
"movl %3,%%esp\n\t" /* restore ESP */ \
"movl $1f,%1\n\t" /* save EIP */ \
"pushl %4\n\t" /* restore EIP */ \
"jmp __switch_to\n" \
"1:\t" \
"popl %%ebp\n\t" \
"popl %%edi\n\t" \
"popl %%esi\n\t" \
:"=m" (prev->tss.esp),"=m" (prev->tss.eip), \
"=b" (last) \
:"m" (next->tss.esp),"m" (next->tss.eip), \
"a" (prev), "d" (next), \
"b" (prev)); \
} while (0)

Philipp

    --
    You have moved your mouse. Windows must be rebooted for the
    changes to take effect.

    -
    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/

- Next message: Cougar: "Re: access to proc filesystem from chrooted process"
- Previous message: Brian: "Re: linux-2.2.9/traceroute/packet loss"