~ubuntu-branches/ubuntu/precise/ghc/precise

« back to all changes in this revision

Viewing changes to includes/rts/storage/Liveness.h

  • Committer: Bazaar Package Importer
  • Author(s): Joachim Breitner
  • Date: 2011-01-17 12:49:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110117124924-do1pym1jlf5o636m
Tags: upstream-7.0.1
ImportĀ upstreamĀ versionĀ 7.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -----------------------------------------------------------------------------
 
2
 *
 
3
 * (c) The University of Glasgow 2004
 
4
 *
 
5
 * Building liveness masks for RET_DYN stack frames.
 
6
 * A few macros that are used in both .cmm and .c sources.
 
7
 *
 
8
 * A liveness mask is constructed like so:
 
9
 *
 
10
 *    R1_PTR & R2_PTR & R3_PTR
 
11
 *
 
12
 * -------------------------------------------------------------------------- */
 
13
 
 
14
#ifndef RTS_STORAGE_LIVENESS_H
 
15
#define RTS_STORAGE_LIVENESS_H
 
16
 
 
17
#define NO_PTRS   0xff
 
18
#define R1_PTR    (NO_PTRS ^ (1<<0))
 
19
#define R2_PTR    (NO_PTRS ^ (1<<1))
 
20
#define R3_PTR    (NO_PTRS ^ (1<<2))
 
21
#define R4_PTR    (NO_PTRS ^ (1<<3))
 
22
#define R5_PTR    (NO_PTRS ^ (1<<4))
 
23
#define R6_PTR    (NO_PTRS ^ (1<<5))
 
24
#define R7_PTR    (NO_PTRS ^ (1<<6))
 
25
#define R8_PTR    (NO_PTRS ^ (1<<7))
 
26
 
 
27
#define N_NONPTRS(n)  ((n)<<16)
 
28
#define N_PTRS(n)     ((n)<<24)
 
29
 
 
30
#define RET_DYN_NONPTRS(l) ((l)>>16 & 0xff)
 
31
#define RET_DYN_PTRS(l)    ((l)>>24 & 0xff)
 
32
#define RET_DYN_LIVENESS(l) ((l) & 0xffff)
 
33
 
 
34
#endif /* RTS_STORAGE_LIVENESS_H */