Subversion Repositories Kolibri OS

Rev

Rev 5191 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
Line 1... Line 1...
1
/* xgate.h -- Freescale XGATE opcode list
1
/* xgate.h -- Freescale XGATE opcode list
2
   Copyright 2010, 2011, 2012 Free Software Foundation, Inc.
2
   Copyright (C) 2010-2015 Free Software Foundation, Inc.
3
   Written by Sean Keys (skeys@ipdatasys.com)
3
   Written by Sean Keys (skeys@ipdatasys.com)
Line 4... Line 4...
4
 
4
 
Line 5... Line 5...
5
   This file is part of the GNU opcodes library.
5
   This file is part of the GNU opcodes library.
Line 44... Line 44...
44
#define XGATE_CYCLE_w	0x10
44
#define XGATE_CYCLE_w	0x10
45
#define XGATE_CYCLE_W	0x20
45
#define XGATE_CYCLE_W	0x20
46
#define XGATE_CYCLE_A	0x40
46
#define XGATE_CYCLE_A	0x40
47
#define XGATE_CYCLE_f	0x80
47
#define XGATE_CYCLE_f	0x80
Line 48... Line -...
48
 
-
 
49
/* Opcode format abbreviations.  */
-
 
50
#define XG_INH		0x0001  /* Inherent.  */
-
 
51
#define XG_I		0x0002  /* 3-bit immediate address.  */
-
 
52
#define XG_R_I		0x0004  /* Register followed by 4/8-bit immediate value.  */
-
 
53
#define XG_R_R		0x0008  /* Register followed by a register.  */
-
 
54
#define XG_R_R_R	0x0010  /* Register followed by two registers.  */
-
 
55
#define XG_R		0x0020  /* Single register.  */
-
 
56
#define XG_PC		0x0040  /* PC relative 10 or 11 bit.  */
-
 
57
#define XG_R_C		0x0080  /* General register followed by ccr register.  */
-
 
58
#define XG_C_R		0x0100  /* CCR register followed by a general register.  */
-
 
59
#define XG_R_P		0x0200  /* General register followed by pc register.  */
-
 
60
#define XG_R_R_I	0x0400  /* Two general registers followed by an immediate value.  */
-
 
61
#define XG_PCREL	0x0800  /* Immediate value that is relative to the current pc.  */
-
 
62
 
48
 
63
/* XGATE operand formats as stored in the XGATE_opcode table.
49
/* XGATE operand formats as stored in the XGATE_opcode table.
64
   They are only used by GAS to recognize operands.  */
50
   They are only used by GAS to recognize operands.  */
65
#define XGATE_OP_INH		""
51
#define XGATE_OP_INH                  ""  /* Inherent.  */
66
#define XGATE_OP_TRI		"r,r,r"
52
#define XGATE_OP_TRI		 "r,r,r"  /* Register followed by two registers.                    */
67
#define XGATE_OP_DYA		"r,r"
53
#define XGATE_OP_DYA		   "r,r"  /* Register followed by a register.                       */
68
#define XGATE_OP_IMM16          "r,if"
54
#define XGATE_OP_IMM16            "r,if"  /* Register followed by 16-bit value.                    */
69
#define XGATE_OP_IMM8	        "r,i8"
55
#define XGATE_OP_IMM8	          "r,i8"  /* Register followed by 8-bit value.                      */
70
#define XGATE_OP_IMM4           "r,i4"
56
#define XGATE_OP_IMM4             "r,i4"  /* Register followed by 4-bit value.                     */
71
#define XGATE_OP_IMM3	        "i3"
57
#define XGATE_OP_IMM3	            "i3"  /* Register followed by 3-bit value.                      */
72
#define XGATE_OP_MON		"r"
58
#define XGATE_OP_MON		     "r"  /* Single register.                                       */
73
#define XGATE_OP_MON_R_C	"r,c"
59
#define XGATE_OP_MON_R_C	   "r,c"  /* General register followed by ccr register.             */
74
#define XGATE_OP_MON_C_R	"c,r"
60
#define XGATE_OP_MON_C_R	   "c,r"  /* CCR register followed by a general register.           */
75
#define XGATE_OP_MON_R_P	"r,p"
61
#define XGATE_OP_MON_R_P	   "r,p"  /* General register followed by pc register.              */
76
#define XGATE_OP_IDR		"r,r,+"
62
#define XGATE_OP_IDR		 "r,r,+"  /* Three registers with the third having a -/+ directive. */
77
#define XGATE_OP_IDO5	        "r,r,i5"
63
#define XGATE_OP_IDO5	        "r,r,i5"  /* Two general registers followed by an immediate value.  */
78
#define XGATE_OP_REL9	        "b9"
64
#define XGATE_OP_REL9	            "b9"  /* 9-bit value that is relative to the current pc.        */
79
#define XGATE_OP_REL10	        "ba"
65
#define XGATE_OP_REL10	            "ba"  /* 10-bit value that is relative to the current pc.       */
80
#define XGATE_OP_DYA_MON	"=r"
66
#define XGATE_OP_DYA_MON	    "=r"
81
/* Macro definitions.  */
67
/* Macro definitions.  */
82
#define XGATE_OP_IMM16mADD    "r,if; addl addh"
68
#define XGATE_OP_IMM16mADD    "r,if; addl addh"
83
#define XGATE_OP_IMM16mAND    "r,if; andl andh"
69
#define XGATE_OP_IMM16mAND    "r,if; andl andh"
Line 88... Line 74...
88
/* CPU variant identification.  */
74
/* CPU variant identification.  */
89
#define XGATE_V1 0x1
75
#define XGATE_V1 0x1
90
#define XGATE_V2 0x2
76
#define XGATE_V2 0x2
91
#define XGATE_V3 0x4
77
#define XGATE_V3 0x4
Line 92... Line -...
92
 
-
 
93
/* Max opcodes per opcode handle.  */
-
 
94
#define MAX_OPCODES     0x05
-
 
95
 
-
 
96
#define MAX_DETECT_CHARS 0x10
-
 
97
 
78
 
98
/* The opcode table definitions.  */
79
/* The opcode table definitions.  */
99
struct xgate_opcode
80
struct xgate_opcode
100
{
81
{
101
  char * name;                  /* Op-code name.  */
82
  char * name;                  /* Op-code name.  */
102
  char * constraints;           /* Constraint chars.  */
83
  char * constraints;           /* Constraint chars.  */
103
  char * format;                /* Bit definitions.  */
-
 
104
  unsigned int sh_format;       /* Shorthand format mask.  */
84
  char * format;                /* Bit definitions.  */
105
  unsigned int size;            /* Opcode size in bytes.  */
85
  unsigned int size;            /* Opcode size in bytes.  */
106
  unsigned int bin_opcode;      /* Binary opcode with operands masked off.  */
86
  unsigned int bin_opcode;      /* Binary opcode with operands masked off.  */
107
  unsigned char cycles_min;     /* Minimum cpu cycles needed.  */
87
  unsigned char cycles_min;     /* Minimum cpu cycles needed.  */
108
  unsigned char cycles_max;     /* Maximum cpu cycles needed.  */
88
  unsigned char cycles_max;     /* Maximum cpu cycles needed.  */