sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
njn | 9c53325 | 2009-04-24 04:57:07 +0000 | [diff] [blame] | 3 | /*--- Header imported directly by every tool asm file. ---*/ |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 4 | /*--- pub_tool_basics_asm.h ---*/ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 5 | /*--------------------------------------------------------------------*/ |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 6 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 7 | /* |
njn | b9c427c | 2004-12-01 14:14:42 +0000 | [diff] [blame] | 8 | This file is part of Valgrind, a dynamic binary instrumentation |
| 9 | framework. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 10 | |
sewardj | 9eecbbb | 2010-05-03 21:37:12 +0000 | [diff] [blame] | 11 | Copyright (C) 2000-2010 Julian Seward |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 12 | jseward@acm.org |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 13 | |
| 14 | This program is free software; you can redistribute it and/or |
| 15 | modify it under the terms of the GNU General Public License as |
| 16 | published by the Free Software Foundation; either version 2 of the |
| 17 | License, or (at your option) any later version. |
| 18 | |
| 19 | This program is distributed in the hope that it will be useful, but |
| 20 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | General Public License for more details. |
| 23 | |
| 24 | You should have received a copy of the GNU General Public License |
| 25 | along with this program; if not, write to the Free Software |
| 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 27 | 02111-1307, USA. |
| 28 | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 29 | The GNU General Public License is contained in the file COPYING. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 30 | */ |
| 31 | |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 32 | #ifndef __PUB_TOOL_BASICS_ASM_H |
| 33 | #define __PUB_TOOL_BASICS_ASM_H |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 34 | |
njn | 9c53325 | 2009-04-24 04:57:07 +0000 | [diff] [blame] | 35 | // See pub_tool_basics.h for the purpose of these macros. |
| 36 | // |
| 37 | // Note that although the macros here (which are used in asm files) have the |
| 38 | // same name as those in pub_tool_basics.h (which are used in C files), they |
| 39 | // have different definitions. Actually, on Linux the definitions are the |
| 40 | // same, but on Darwin they are different. The reason is that C names on |
| 41 | // Darwin always get a '_' prepended to them by the compiler. But in order to |
| 42 | // refer to them from asm code, we have to add the '_' ourselves. Having two |
| 43 | // versions of these macros makes that difference transparent, so we can use |
| 44 | // VG_/ML_ in both asm and C files. |
| 45 | // |
| 46 | // Note also that the exact prefixes used have to match those used in |
| 47 | // pub_tool_basics.h. |
njn | 767eb42 | 2005-06-10 23:09:45 +0000 | [diff] [blame] | 48 | |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 49 | #define VGAPPEND(str1,str2) str1##str2 |
njn | 9c53325 | 2009-04-24 04:57:07 +0000 | [diff] [blame] | 50 | |
sewardj | 6e9de46 | 2011-06-28 07:25:29 +0000 | [diff] [blame] | 51 | #if defined(VGO_linux) |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 52 | # define VG_(str) VGAPPEND( vgPlain_, str) |
| 53 | # define ML_(str) VGAPPEND( vgModuleLocal_, str) |
| 54 | #elif defined(VGO_darwin) |
| 55 | # define VG_(str) VGAPPEND(_vgPlain_, str) |
| 56 | # define ML_(str) VGAPPEND(_vgModuleLocal_, str) |
| 57 | #else |
| 58 | # error Unknown OS |
| 59 | #endif |
sewardj | 7eb7c58 | 2005-06-23 01:02:53 +0000 | [diff] [blame] | 60 | |
njn | c7561b9 | 2005-06-19 01:24:32 +0000 | [diff] [blame] | 61 | #endif /* __PUB_TOOL_BASICS_ASM_H */ |
nethercote | c06e213 | 2004-09-03 13:45:29 +0000 | [diff] [blame] | 62 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 63 | /*--------------------------------------------------------------------*/ |
nethercote | 109d0df | 2004-09-02 08:10:13 +0000 | [diff] [blame] | 64 | /*--- end ---*/ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 65 | /*--------------------------------------------------------------------*/ |