Clear a few more AMD64 start-up hurdles:
- implemented VG_(clone)()
- implemented PLATFORM_DO_MMAP()
- implemented VG_(init_thread1state)()  [will need to be updated as the
  Vex AMD64 guest state is updated]
- implemented OYNK, because it's useful

Also a couple of general cleaning up things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3165 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 04005ab..ad8247c 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -319,6 +319,12 @@
    return STACK_PTR( VG_(threads)[tid].arch );
 }
 
+/* Debugging thing .. can be called from assembly with OYNK macro. */
+void VG_(oynk) ( Int n )
+{
+   OINK(n);
+}
+
 /* Initialize the PID and PGRP of scheduler LWP; this is also called
    in any new children after fork. */
 static void newpid(ThreadId unused)
@@ -2605,6 +2611,12 @@
    //      setup_scheduler()      [for the rest of state 1 stuff]
    //--------------------------------------------------------------
    VGA_(init_thread1state)(client_eip, sp_at_startup, &VG_(threads)[1].arch );
+
+   // Tell the tool that we just wrote to the registers.
+   VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
+             sizeof(VexGuestArchState));
+
+   // Record the instr ptr offset, for use by asm code.
    VG_(instr_ptr_offset) = offsetof(VexGuestArchState, ARCH_INSTR_PTR);
 
    //--------------------------------------------------------------