From owner-p4-projects@FreeBSD.ORG Tue Aug 21 00:41:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8358416A526; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46E3C16A521 for ; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 21FFE13C4B3 for ; Tue, 21 Aug 2007 00:41:44 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7L0fhgG015751 for ; Tue, 21 Aug 2007 00:41:43 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7L0fgcr015747 for perforce@freebsd.org; Tue, 21 Aug 2007 00:41:42 GMT (envelope-from peter@freebsd.org) Date: Tue, 21 Aug 2007 00:41:42 GMT Message-Id: <200708210041.l7L0fgcr015747@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 125473 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 00:41:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125473 Change 125473 by peter@peter_cheese on 2007/08/21 00:41:28 Remove nargs and indir_sysno stuff. We don't need it for reconstructing the args on the stack anymore and it removes one infrastructural difference to the linux version. Affected files ... .. //depot/projects/valgrind/coregrind/Makefile.am#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/makeargsize.sh#2 delete .. //depot/projects/valgrind/coregrind/m_syswrap/makeargsize6.sh#3 delete .. //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/sysargcount.c#3 delete .. //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#4 edit Differences ... ==== //depot/projects/valgrind/coregrind/Makefile.am#3 (text+ko) ==== @@ -209,8 +209,7 @@ m_dispatch/dispatch-x86-freebsd.S \ m_sigframe/sigframe-x86-freebsd.c \ m_syswrap/syscall-x86-freebsd.S \ - m_syswrap/syswrap-x86-freebsd.c \ - m_syswrap/sysargcount.c + m_syswrap/syswrap-x86-freebsd.c libcoregrind_x86_freebsd_a_CPPFLAGS = $(AM_CPPFLAGS_X86_FREEBSD) libcoregrind_x86_freebsd_a_CFLAGS = $(AM_CFLAGS_X86_FREEBSD) ==== //depot/projects/valgrind/coregrind/m_syswrap/priv_types_n_macros.h#3 (text+ko) ==== @@ -60,8 +60,6 @@ #ifdef VGO_freebsd UWord arg7; UWord arg8; - Word indir_sysno; /* -1 if indirect syscall() or __syscall() */ - UWord nargs; #endif } SyscallArgs; ==== //depot/projects/valgrind/coregrind/m_syswrap/syscall-x86-freebsd.S#3 (text+ko) ==== @@ -81,8 +81,6 @@ #ifdef VGO_freebsd UWord arg7; // 28 UWord arg8; // 32 - Word indir_sysno; // 36 (-1 if indirect syscall() or __syscall()) - UWord nargs; // 40 #endif */ ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-main.c#4 (text+ko) ==== @@ -318,11 +318,6 @@ the platform-specific in-guest-state format to the canonical formats, and back. */ -#if defined(VGP_x86_freebsd) -extern int sysargcount[]; /* HACK! HACK! */ -extern int numsysargcount; /* HACK! HACK! */ -#endif - static void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, /*IN*/ VexGuestArchState* gst_vanilla ) @@ -374,25 +369,21 @@ switch (gst->guest_EAX) { default: canonical->sysno = gst->guest_EAX; - canonical->indir_sysno = -1; break; case 198: canonical->sysno = argv[1]; - canonical->indir_sysno = 198; argv += 2; break; case 0: canonical->sysno = argv[1]; - canonical->indir_sysno = 0; argv += 1; break; } - if (canonical->sysno < numsysargcount) - canonical->nargs = sysargcount[canonical->sysno]; - else - canonical->nargs = 0; - memset(&canonical->arg1, 0xfe, (char *)&canonical->indir_sysno - (char *)&canonical->arg1); - memcpy(&canonical->arg1, &argv[1], canonical->nargs * sizeof(UWord)); + /* + * Blindly copy 8 arguments from the stack. Valgrind checks + * for initialized-ness elsewhere. + */ + memcpy(&canonical->arg1, &argv[1], 8 * sizeof(UWord)); #else # error "getSyscallArgsFromGuestState: unknown arch" @@ -445,7 +436,6 @@ #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) /* Nothing. Uses args passed out of band. */ -#endif #else # error "putSyscallArgsIntoGuestState: unknown arch"