|
From: Nicholas N. <nj...@ca...> - 2004-10-26 12:57:01
|
CVS commit by nethercote:
Comment cleanups only.
M +10 -18 valgrind.h.in 1.3
--- valgrind/include/valgrind.h.in #1.2:1.3
@@ -81,6 +81,6 @@
#ifndef NVALGRIND
-/* The following defines the magic code sequence which the JITter spots and
- handles magically. Don't look too closely at this; it will rot
+/* The following defines the magic code sequences which the JITter spots and
+ handles magically. Don't look too closely at them; they will rot
your brain. We must ensure that the default value gets put in the return
slot, so that everything works when this is executed not under Valgrind.
@@ -88,4 +88,10 @@
the number that could be passed, but it's currently four.
+ The macro args are:
+ _zzq_rlval result lvalue
+ _zzq_default default value (result returned when running on real CPU)
+ _zzq_request request code
+ _zzq_arg1..4 request params
+
Nb: we put the assembly code sequences for all architectures in this one
file. This is because this file must be stand-alone, so we can't rely on
@@ -94,21 +100,7 @@
#ifdef __x86__
-/* This defines the magic code sequence which the JITter spots and
- handles magically. Don't look too closely at this; it will rot
- your brain. Valgrind dumps the result value in %EDX, so we first
- copy the default value there, so that it is returned when not
- running on Valgrind. Since %EAX points to a block of mem
- containing the args, you can pass as many args as you want like
- this. Currently this is set up to deal with 4 args since that's
- the max that we appear to need (pthread_create).
-*/
#define VALGRIND_MAGIC_SEQUENCE( \
- _zzq_rlval, /* result lvalue */ \
- _zzq_default, /* result returned when running on real CPU */ \
- _zzq_request, /* request code */ \
- _zzq_arg1, /* request first param */ \
- _zzq_arg2, /* request second param */ \
- _zzq_arg3, /* request third param */ \
- _zzq_arg4 /* request fourth param */ ) \
+ _zzq_rlval, _zzq_default, _zzq_request, \
+ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4) \
\
{ volatile unsigned int _zzq_args[5]; \
|