Initial VEX-end support for Darwin (x86 and amd64).


git-svn-id: svn://svn.valgrind.org/vex/trunk@1874 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/pub/libvex_guest_amd64.h b/pub/libvex_guest_amd64.h
index 41c4ad6..2a49151 100644
--- a/pub/libvex_guest_amd64.h
+++ b/pub/libvex_guest_amd64.h
@@ -152,6 +152,15 @@
          replace-style ones. */
       ULong guest_NRADDR;
 
+      /* Used for Darwin syscall dispatching. */
+      ULong guest_SC_CLASS;
+
+      /* HACK to make tls on darwin work.  %gs only ever seems to
+         hold 0x60, and so guest_GS_0x60 holds the 64-bit offset
+         associated with a %gs value of 0x60.  (A direct analogue
+         of the %fs-zero hack for amd64-linux). */
+      ULong guest_GS_0x60;
+
       /* Padding to make it have an 16-aligned size */
       ULong padding;
    }
@@ -176,6 +185,13 @@
 extern 
 ULong LibVEX_GuestAMD64_get_rflags ( /*IN*/VexGuestAMD64State* vex_state );
 
+/* Set the carry flag in the given state to 'new_carry_flag', which
+   should be zero or one. */
+extern
+void
+LibVEX_GuestAMD64_put_rflag_c ( ULong new_carry_flag,
+                                /*MOD*/VexGuestAMD64State* vex_state );
+
 
 #if 0
 /* Convert a saved x87 FPU image (as created by fsave) and write it