Files
valgrind/tests/asm.h
Nicholas Nethercote 07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00

20 lines
539 B
C

// Header to factor out platform differences in asm code.
// On Darwin, all symbols get an underscore prepended when compiled. If we
// use any such symbols in asm code, we need to add that underscore. So in
// general, any symbol named in asm code should be wrapped by VG_SYM.
// This one is for use in inline asm in C files.
#if defined(VGO_darwin)
#define VG_SYM(x) "_"#x
#else
#define VG_SYM(x) #x
#endif
// This one is for use in asm files.
#if defined(VGO_darwin)
#define VG_SYM_ASM(x) _##x
#else
#define VG_SYM_ASM(x) x
#endif