I use %ebp, it seemed to work last time I played with it:
static inline
int st_mmap (void *addr, size_t len, int protection, int flags, int fd,
off_t offset)
{
int result;
asm volatile (
"pushl %%ebp \n"
"movl %6, %%ebp \n"
"movl %7, %%eax \n"
"int $0x80 \n"
"popl %%ebp \n"
: "=a" (result)
: "b" (addr), "c" (len), "d" (protection),
"S" (flags), "D" (fd), "m" ((offset >> PAGE_SHIFT)),
"i" (__NR_mmap2)
: "memory");
return result;
}
I thing I got it from an straight disassemble dump of glibc's
mmap().
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/