Do not call umoven to fetch parameters if we have zero params

* syscall.c [I386] (syscall_enter): Do not call umoven
to fetch zero bytes. This is just an optimization.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
Denys Vlasenko 2011-06-09 01:32:23 +02:00
parent eccc48c63e
commit 4660fe610c

View File

@ -2352,8 +2352,9 @@ syscall_enter(struct tcb *tcp)
tcp->u_nargs = sysent[tcp->scno].nargs;
else
tcp->u_nargs = 5;
umoven(tcp, tcp->status.PR_REG[UESP] + 4,
tcp->u_nargs*sizeof(tcp->u_arg[0]), (char *) tcp->u_arg);
if (tcp->u_nargs > 0)
umoven(tcp, tcp->status.PR_REG[UESP] + 4,
tcp->u_nargs*sizeof(tcp->u_arg[0]), (char *) tcp->u_arg);
#else
I DONT KNOW WHAT TO DO
#endif /* !HAVE_PR_SYSCALL */