On Sun, 15 Jul 2001 22:37:03 -0400 (EDT),
Ben LaHaise <bcrl@xxxxxxxxxx> wrote:
>Below is a patch that moves the skb_{over,under}_panic function calls in
>skb_put and skb_push out of line on i386 and hopefully improves register
>allocation.
>+#define __arch_skb_check(insn, left, right, skb, why, len) \
>+ __asm__ __volatile__( \
>+ " cmpl %1,%0\n" \
>+ "1: " insn " 2f\n" \
>+ ".section .text.lock,\"ax\"\n" \
>+ "2: pushl 1b\n" \
>+ " pushl %3\n" \
>+ " pushl %2\n" \
>+ " call skb_" why "_panic\n" \
>+ " ud2a\n" \
>+ ".previous\n" \
>+ : : "r" (left), "rm" (right), "rmi" (skb), "rmi" (len) \
>+ : "cc" )
'call skb_" why "_panic' will break using module symbol versions,
skb_*_panic symbols are exported so all references to those symbols
need to be visible to cpp, not inside string quotes. This should work
(untested).
" call %c4\n" \
....
: : "r" (left), "rm" (right), "rmi" (skb), "rmi" (len) \
"i" (skb_ ## why ## _panic) \
|