|
From: <sv...@va...> - 2009-05-21 23:27:29
|
Author: njn
Date: 2009-05-22 00:27:17 +0100 (Fri, 22 May 2009)
New Revision: 10079
Log:
Remove dead code relating to the old way syscall return values were tracked.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/docs/internals/Darwin-notes.txt
Modified: branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-21 22:06:09 UTC (rev 10078)
+++ branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-21 23:27:17 UTC (rev 10079)
@@ -97,7 +97,6 @@
Int o_arg6;
Int uu_arg7;
Int uu_arg8;
- Int o_retval;
# elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
Int o_arg1;
Int o_arg2;
@@ -107,7 +106,6 @@
Int o_arg6;
Int o_arg7;
Int o_arg8;
- Int o_retval;
# elif defined(VGP_x86_darwin)
Int s_arg1;
Int s_arg2;
@@ -117,8 +115,6 @@
Int s_arg6;
Int s_arg7;
Int s_arg8;
- Int o_retval_lo;
- Int o_retval_hi;
# elif defined(VGP_amd64_darwin)
Int o_arg1;
Int o_arg2;
@@ -128,8 +124,6 @@
Int o_arg6;
Int s_arg7;
Int s_arg8;
- Int o_retval_lo;
- Int o_retval_hi;
# else
# error "Unknown platform"
# endif
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-05-21 22:06:09 UTC (rev 10078)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-05-21 23:27:17 UTC (rev 10079)
@@ -995,7 +995,6 @@
layout->o_arg6 = OFFSET_x86_EBP;
layout->uu_arg7 = -1; /* impossible value */
layout->uu_arg8 = -1; /* impossible value */
- layout->o_retval = OFFSET_x86_EAX;
#elif defined(VGP_amd64_linux)
layout->o_sysno = OFFSET_amd64_RAX;
@@ -1007,7 +1006,6 @@
layout->o_arg6 = OFFSET_amd64_R9;
layout->uu_arg7 = -1; /* impossible value */
layout->uu_arg8 = -1; /* impossible value */
- layout->o_retval = OFFSET_amd64_RAX;
#elif defined(VGP_ppc32_linux)
layout->o_sysno = OFFSET_ppc32_GPR0;
@@ -1019,7 +1017,6 @@
layout->o_arg6 = OFFSET_ppc32_GPR8;
layout->uu_arg7 = -1; /* impossible value */
layout->uu_arg8 = -1; /* impossible value */
- layout->o_retval = OFFSET_ppc32_GPR3;
#elif defined(VGP_ppc64_linux)
layout->o_sysno = OFFSET_ppc64_GPR0;
@@ -1031,7 +1028,6 @@
layout->o_arg6 = OFFSET_ppc64_GPR8;
layout->uu_arg7 = -1; /* impossible value */
layout->uu_arg8 = -1; /* impossible value */
- layout->o_retval = OFFSET_ppc64_GPR3;
#elif defined(VGP_ppc32_aix5)
layout->o_sysno = OFFSET_ppc32_GPR2;
@@ -1043,7 +1039,6 @@
layout->o_arg6 = OFFSET_ppc32_GPR8;
layout->o_arg7 = OFFSET_ppc32_GPR9;
layout->o_arg8 = OFFSET_ppc32_GPR10;
- layout->o_retval = OFFSET_ppc32_GPR3;
#elif defined(VGP_ppc64_aix5)
layout->o_sysno = OFFSET_ppc64_GPR2;
@@ -1055,12 +1050,9 @@
layout->o_arg6 = OFFSET_ppc64_GPR8;
layout->o_arg7 = OFFSET_ppc64_GPR9;
layout->o_arg8 = OFFSET_ppc64_GPR10;
- layout->o_retval = OFFSET_ppc64_GPR3;
#elif defined(VGP_x86_darwin)
layout->o_sysno = OFFSET_x86_EAX;
- layout->o_retval_lo = OFFSET_x86_EAX;
- layout->o_retval_hi = OFFSET_x86_EDX;
// syscall parameters are on stack in C convention
layout->s_arg1 = sizeof(UWord) * 1;
layout->s_arg2 = sizeof(UWord) * 2;
@@ -1081,8 +1073,6 @@
layout->o_arg6 = OFFSET_amd64_R9;
layout->s_arg7 = sizeof(UWord) * 1;
layout->s_arg8 = sizeof(UWord) * 2;
- layout->o_retval_lo = OFFSET_amd64_RAX;
- layout->o_retval_hi = OFFSET_amd64_RDX;
#else
# error "getSyscallLayout: unknown arch"
@@ -1622,7 +1612,6 @@
*/
void VG_(post_syscall) (ThreadId tid)
{
- //SyscallArgLayout layout; DDD (see below)
SyscallInfo* sci;
const SyscallTableEntry* ent;
SyscallStatus test_status;
@@ -1671,17 +1660,6 @@
sysno = sci->args.sysno;
ent = get_syscall_entry(sysno);
- // DDD: the trunk has the following code...
-#if 0
- /* We need the arg layout .. sigh */
- getSyscallArgLayout( &layout );
-
- /* Tell the tool that the assignment has occurred, so it can update
- shadow regs as necessary. */
- VG_TRACK( post_reg_write, Vg_CoreSysCall, tid, layout.o_retval,
- sizeof(UWord) );
-#endif
-
/* pre: status == Complete (asserted above) */
/* Consider either success or failure. Now run the post handler if:
- it exists, and
Modified: branches/DARWIN/docs/internals/Darwin-notes.txt
===================================================================
--- branches/DARWIN/docs/internals/Darwin-notes.txt 2009-05-21 22:06:09 UTC (rev 10078)
+++ branches/DARWIN/docs/internals/Darwin-notes.txt 2009-05-21 23:27:17 UTC (rev 10079)
@@ -105,13 +105,6 @@
Also, startup is not done on the interim startup stack -- why not?
-VG_(post_syscall): contains important-looking code that is #if 0'd
-out. Said code does VG_TRACK( post_reg_write). Needs looking into.
-[The 'post_reg_write' call has been moved into
-putSyscallStatusIntoGuestState(). This might be an improvement, as on some
-platforms more than one register is written with a result.]
-
-
VG_(di_notify_mmap): Linux version is also used for Darwin, and
contains some ifdeffery. Clean up.
|