~ubuntu-branches/ubuntu/karmic/valgrind/karmic

« back to all changes in this revision

Viewing changes to include/pub_tool_machine.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-01-06 11:28:10 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080106112810-segj25s87z9zd7i5
Tags: 1:3.3.0-1ubuntu1
* Merge with Debian, remaining changes:
 - Add 91_build_with_fno_stack_protector.dpatch
 - Add lpia to Architecture

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#ifndef __PUB_TOOL_MACHINE_H
32
32
#define __PUB_TOOL_MACHINE_H
33
33
 
34
 
#if defined(VGA_x86)
 
34
#if defined(VGP_x86_linux)
35
35
#  define VG_MIN_INSTR_SZB          1  // min length of native instruction
36
36
#  define VG_MAX_INSTR_SZB         16  // max length of native instruction
37
37
#  define VG_CLREQ_SZB             14  // length of a client request, may
38
38
                                       //   be larger than VG_MAX_INSTR_SZB
39
39
#  define VG_STACK_REDZONE_SZB      0  // number of addressable bytes below %RSP
40
 
#elif defined(VGA_amd64)
 
40
#elif defined(VGP_amd64_linux)
41
41
#  define VG_MIN_INSTR_SZB          1
42
42
#  define VG_MAX_INSTR_SZB         16
43
43
#  define VG_CLREQ_SZB             19
44
44
#  define VG_STACK_REDZONE_SZB    128
45
 
#elif defined(VGA_ppc32)
 
45
#elif defined(VGP_ppc32_linux)
46
46
#  define VG_MIN_INSTR_SZB          4
47
47
#  define VG_MAX_INSTR_SZB          4 
48
48
#  define VG_CLREQ_SZB             20
49
49
#  define VG_STACK_REDZONE_SZB      0
50
 
#elif defined(VGA_ppc64)
 
50
#elif defined(VGP_ppc64_linux)
51
51
#  define VG_MIN_INSTR_SZB          4
52
52
#  define VG_MAX_INSTR_SZB          4 
53
53
#  define VG_CLREQ_SZB             20
54
54
#  define VG_STACK_REDZONE_SZB    288  // number of addressable bytes below R1
55
55
                                       // from 64-bit PowerPC ELF ABI Supplement 1.7
 
56
#elif defined(VGP_ppc32_aix5)
 
57
#  define VG_MIN_INSTR_SZB          4
 
58
#  define VG_MAX_INSTR_SZB          4 
 
59
#  define VG_CLREQ_SZB             20
 
60
   /* The PowerOpen ABI actually says 220 bytes, but that is not an
 
61
      8-aligned number, and frequently forces Memcheck's
 
62
      mc_{new,die}_mem_stack_N routines into slow cases by losing
 
63
      8-alignment of the area to be messed with.  So let's just say
 
64
      224 instead.  Gdb has a similar kludge. */
 
65
#  define VG_STACK_REDZONE_SZB    224
 
66
#elif defined(VGP_ppc64_aix5)
 
67
#  define VG_MIN_INSTR_SZB          4
 
68
#  define VG_MAX_INSTR_SZB          4 
 
69
#  define VG_CLREQ_SZB             20
 
70
#  define VG_STACK_REDZONE_SZB    288 // is this right?
56
71
#else
57
 
#  error Unknown arch
 
72
#  error Unknown platform
58
73
#endif
59
74
 
60
75
// Guest state accessors
85
100
extern Bool VG_(thread_stack_next)       ( ThreadId* tid, Addr* stack_min,
86
101
                                                          Addr* stack_max );
87
102
 
 
103
// Returns .client_stack_highest_word for the given thread
 
104
extern Addr VG_(thread_get_stack_max) ( ThreadId tid );
 
105
 
88
106
// Given a pointer to a function as obtained by "& functionname" in C,
89
107
// produce a pointer to the actual entry point for the function.  For
90
108
// most platforms it's the identity function.  Unfortunately, on