File: s12z.h

package info (click to toggle)
binutils 2.45-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 411,028 kB
  • sloc: ansic: 1,465,188; asm: 816,507; cpp: 87,135; exp: 79,331; makefile: 67,950; sh: 20,844; yacc: 14,149; lisp: 13,640; perl: 13,404; lex: 1,714; ada: 1,681; pascal: 1,446; cs: 879; python: 630; java: 478; sed: 191; xml: 95; awk: 25
file content (75 lines) | stat: -rw-r--r-- 1,524 bytes parent folder | download | duplicates (31)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef S12Z_H
#define S12Z_H

/* This byte is used to prefix instructions in "page 2" of the opcode
   space.  */
#define PAGE2_PREBYTE (0x1b)

struct reg
{
  char      *name;   /* The canonical name of the register.  */
  int       bytes;   /* its size, in bytes.  */
};


/* How many registers do we have.  Actually there are only 13,
   because CCL and CCH are the low and high bytes of CCW.  But
   for assemnbly / disassembly purposes they are considered
   distinct registers.  */
#define S12Z_N_REGISTERS 15

extern const struct reg registers[S12Z_N_REGISTERS];

/* Solaris defines REG_Y in sys/regset.h; undef it here to avoid
   breaking compilation when this target is enabled.  */
#undef REG_Y

enum
  {
    REG_D2 = 0,
    REG_D3,
    REG_D4,
    REG_D5,
    REG_D0,
    REG_D1,
    REG_D6,
    REG_D7,
    REG_X,
    REG_Y,
    REG_S,
    REG_P,
    REG_CCH,
    REG_CCL,
    REG_CCW
  };

/* Any of the registers d0, d1, ... d7.  */
#define REG_BIT_Dn \
((0x1U << REG_D2) | \
 (0x1U << REG_D3) | \
 (0x1U << REG_D4) | \
 (0x1U << REG_D5) | \
 (0x1U << REG_D6) | \
 (0x1U << REG_D7) | \
 (0x1U << REG_D0) | \
 (0x1U << REG_D1))

/* Any of the registers x, y or z.  */
#define REG_BIT_XYS \
((0x1U << REG_X) | \
 (0x1U << REG_Y) | \
 (0x1U << REG_S))

/* Any of the registers x, y, z or p.  */
#define REG_BIT_XYSP \
((0x1U << REG_X)  | \
 (0x1U << REG_Y)  | \
 (0x1U << REG_S)  | \
 (0x1U << REG_P))

/* The x register or the y register.  */
#define REG_BIT_XY \
((0x1U << REG_X) | \
 (0x1U << REG_Y))

#endif