Renamed tool_asm.h as pub_basics_asm.h.  Removed core_asm.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3931 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NOTES.txt b/NOTES.txt
index 6a374c4..4a26f23 100644
--- a/NOTES.txt
+++ b/NOTES.txt
@@ -10,18 +10,6 @@
   x86-only systems.  However, am not sure where to look for the call
   into memcheck that states the new stack area.
 
-
-9 Apr 05 (starting work on memcheck for 32/64-bit and big/little endian)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* get rid of include/tool_asm.h.  I think 
-  this is left over from single-platform days, when it made
-  sense to have tool-helpers written in assembly.  Looks like we
-  need to retain coregrind/core_asm.h, though.
-
-  [tool_asm.h will need to remain in some form -- there are still assembly
-  files that need to see VG_() and related macros. --njn]
-
-
 23 March 05
 ~~~~~~~~~~~
 Do we still need ARCH_PTHREQ_RET (or *PTHREQ* for that matter) ?
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 2f95110..4106101 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -36,7 +36,6 @@
 
 noinst_HEADERS = \
 	core.h			\
-	core_asm.h		\
 	coregrind.h		\
 	pub_core_aspacemgr.h	\
 	pub_core_debuginfo.h	\
diff --git a/coregrind/amd64/cpuid.S b/coregrind/amd64/cpuid.S
index 7dc5277..7641f5a 100644
--- a/coregrind/amd64/cpuid.S
+++ b/coregrind/amd64/cpuid.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 
 /*
     Bool VG_(has_cpuid)(void)
diff --git a/coregrind/core_asm.h b/coregrind/core_asm.h
deleted file mode 100644
index ac47496..0000000
--- a/coregrind/core_asm.h
+++ /dev/null
@@ -1,2 +0,0 @@
-// XXX: temporary only
-#include "tool_asm.h"
diff --git a/coregrind/m_dispatch/dispatch-amd64.S b/coregrind/m_dispatch/dispatch-amd64.S
index fada6ac..f328352 100644
--- a/coregrind/m_dispatch/dispatch-amd64.S
+++ b/coregrind/m_dispatch/dispatch-amd64.S
@@ -29,7 +29,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "pub_core_dispatch_asm.h"
 #include "pub_core_transtab_asm.h"
 #include "libvex_guest_offsets.h"	/* for OFFSET_amd64_RIP */
diff --git a/coregrind/m_dispatch/dispatch-arm.S b/coregrind/m_dispatch/dispatch-arm.S
index 9d91a51..3372a0e 100644
--- a/coregrind/m_dispatch/dispatch-arm.S
+++ b/coregrind/m_dispatch/dispatch-arm.S
@@ -29,7 +29,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "pub_core_dispatch_asm.h"
 #include "pub_core_transtab_asm.h"
 
diff --git a/coregrind/m_dispatch/dispatch-x86.S b/coregrind/m_dispatch/dispatch-x86.S
index fa08564..d90bb3d 100644
--- a/coregrind/m_dispatch/dispatch-x86.S
+++ b/coregrind/m_dispatch/dispatch-x86.S
@@ -29,7 +29,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "pub_core_dispatch_asm.h"
 #include "pub_core_transtab_asm.h"
 #include "libvex_guest_offsets.h"	/* for OFFSET_x86_EIP */
diff --git a/coregrind/m_syswrap/syscall-amd64-linux.S b/coregrind/m_syswrap/syscall-amd64-linux.S
index d2cb0e4..200c1b8 100644
--- a/coregrind/m_syswrap/syscall-amd64-linux.S
+++ b/coregrind/m_syswrap/syscall-amd64-linux.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "vki_unistd.h"
 #include "libvex_guest_offsets.h"
 
diff --git a/coregrind/m_syswrap/syscall-arm-linux.S b/coregrind/m_syswrap/syscall-arm-linux.S
index e06a117..c1c319a 100644
--- a/coregrind/m_syswrap/syscall-arm-linux.S
+++ b/coregrind/m_syswrap/syscall-arm-linux.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "vki_unistd.h"
 
 # XXX: must reinstate comments also -- see x86-linux/syscall.S
diff --git a/coregrind/m_syswrap/syscall-x86-linux.S b/coregrind/m_syswrap/syscall-x86-linux.S
index bf37f33..14986f1 100644
--- a/coregrind/m_syswrap/syscall-x86-linux.S
+++ b/coregrind/m_syswrap/syscall-x86-linux.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "vki_unistd.h"
 #include "libvex_guest_offsets.h"
 		
diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S
index 7b07660..05b35cc 100644
--- a/coregrind/m_trampoline.S
+++ b/coregrind/m_trampoline.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 #include "vki_unistd.h"
 
 /* ------------------ SIMULATED CPU HELPERS ------------------ */
diff --git a/coregrind/pub_core_debuglog.h b/coregrind/pub_core_debuglog.h
index 02b4d9d..218c355 100644
--- a/coregrind/pub_core_debuglog.h
+++ b/coregrind/pub_core_debuglog.h
@@ -47,7 +47,7 @@
    portable way to avoid using stdarg.h. */
 #include <stdarg.h>
 
-#include "core_asm.h"   /* For definition of VG_ macro */
+#include "pub_basics_asm.h"   /* For definition of VG_ macro */
 
 /* There are no tool-visible exports from m_debuglog, hence no header
    file for it. */
diff --git a/coregrind/x86/cpuid.S b/coregrind/x86/cpuid.S
index 6d6c127..6fea1b5 100644
--- a/coregrind/x86/cpuid.S
+++ b/coregrind/x86/cpuid.S
@@ -28,7 +28,7 @@
   The GNU General Public License is contained in the file COPYING.
 */
 
-#include "core_asm.h"
+#include "pub_basics_asm.h"
 
 /*
     Bool VG_(has_cpuid)(void)
diff --git a/include/Makefile.am b/include/Makefile.am
index c84d7c4..bcd9503 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -4,7 +4,7 @@
 incinc_HEADERS = \
 	basic_types.h 			\
 	tool.h 				\
-	tool_asm.h 			\
+	pub_basics_asm.h 		\
 	pub_tool_aspacemgr.h 		\
 	pub_tool_errormgr.h 		\
 	pub_tool_execontext.h 		\
diff --git a/include/basic_types.h b/include/basic_types.h
index 64dea28..62d5ae1 100644
--- a/include/basic_types.h
+++ b/include/basic_types.h
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------*/
-/*--- Basic types                                    basic_types.h ---*/
+/*--- Header included by every C file.               basic_types.h ---*/
 /*--------------------------------------------------------------------*/
 
 /*
diff --git a/include/pub_basics_asm.h b/include/pub_basics_asm.h
new file mode 100644
index 0000000..ff36c3a
--- /dev/null
+++ b/include/pub_basics_asm.h
@@ -0,0 +1,49 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Header imported directly by every asm file, and indirectly   ---*/
+/*--- (via pub_basics.h) by every C file.         pub_basics_asm.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2000-2005 Julian Seward 
+      jseward@acm.org
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307, USA.
+
+   The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_BASICS_ASM_H
+#define __PUB_BASICS_ASM_H
+
+/* All symbols externally visible from Valgrind are prefixed
+   as specified here to avoid namespace conflict problems.  */
+
+#define VGAPPEND(str1,str2) str1##str2
+
+#define VG_(str)    VGAPPEND(vgPlain_,    str)
+#define VGA_(str)   VGAPPEND(vgArch_,     str)
+#define VGO_(str)   VGAPPEND(vgOS_,       str)
+#define VGP_(str)   VGAPPEND(vgPlatform_, str)
+
+#endif /* __PUB_BASICS_ASM_H */
+
+/*--------------------------------------------------------------------*/
+/*--- end                                                          ---*/
+/*--------------------------------------------------------------------*/
diff --git a/include/tool.h b/include/tool.h
index 38b3857..8c5fbc8 100644
--- a/include/tool.h
+++ b/include/tool.h
@@ -33,7 +33,7 @@
 #include <stdarg.h>       /* ANSI varargs stuff  */
 
 #include "basic_types.h"
-#include "tool_asm.h"           /* asm stuff */
+#include "pub_basics_asm.h"      /* asm stuff */
 
 #if defined(VGO_linux)
 #  include "vki-linux.h"
diff --git a/include/tool_asm.h b/include/tool_asm.h
deleted file mode 100644
index 95f3faf..0000000
--- a/include/tool_asm.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Tool-specific, asm-specific includes.             tool_asm.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
-   This file is part of Valgrind, a dynamic binary instrumentation
-   framework.
-
-   Copyright (C) 2000-2005 Julian Seward 
-      jseward@acm.org
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307, USA.
-
-   The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __TOOL_ASM_H
-#define __TOOL_ASM_H
-
-
-/* All symbols externally visible from valgrind.so are prefixed
-   as specified here.  The prefix can be changed, so as to avoid
-   namespace conflict problems.
-*/
-#define VGAPPEND(str1,str2) str1##str2
-
-/* These macros should add different prefixes so the same base
-   name can safely be used across different macros. */
-#define VG_(str)    VGAPPEND(vgPlain_,str)
-#define VGA_(str)   VGAPPEND(vgArch_,str)
-#define VGO_(str)   VGAPPEND(vgOS_,str)
-#define VGP_(str)   VGAPPEND(vgPlatform_,str)
-
-// Print a constant from asm code.
-// Nb: you'll need to define VG_(oynk)(Int) to use this.
-#if defined(VGA_x86)
-#  define OYNK(nnn) pushal;  pushl $nnn; call VG_(oynk) ; addl $4,%esp; popal
-#elif defined(VGA_amd64)
-#  define OYNK(nnn) push %r8 ; push %r9 ; push %r10; push %r11; \
-                    push %rax; push %rbx; push %rcx; push %rdx; \
-                    push %rsi; push %rdi; \
-                    movl $nnn, %edi; call VG_(oynk); \
-                    pop %rdi; pop %rsi; pop %rdx; pop %rcx; \
-                    pop %rbx; pop %rax; pop %r11; pop %r10; \
-                    pop %r9 ; pop %r8
-#else
-#  error Unknown architecture
-#endif
-
-#endif /* ndef __TOOL_ASM_H */
-
-/*--------------------------------------------------------------------*/
-/*--- end                                                          ---*/
-/*--------------------------------------------------------------------*/