1 |
/* ns32k-opcode.h -- Opcode table for National Semi 32k processor |
/* ns32k-opcode.h -- Opcode table for National Semi 32k processor |
2 |
Copyright 1987, 1991, 1994 Free Software Foundation, Inc. |
Copyright 1987, 1991, 1994, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GAS, the GNU Assembler. |
This file is part of GAS, the GNU Assembler. |
5 |
|
|
37 |
the opcode or the addition of data to the opcode. |
the opcode or the addition of data to the opcode. |
38 |
The operands in the source instruction are checked for inconsistent |
The operands in the source instruction are checked for inconsistent |
39 |
semantics. |
semantics. |
40 |
|
|
41 |
F : 32 bit float general form |
F : 32 bit float general form |
42 |
L : 64 bit float " |
L : 64 bit float " |
43 |
B : byte " |
B : byte " |
80 |
6 size in bytes of immediate |
6 size in bytes of immediate |
81 |
*/ |
*/ |
82 |
struct ns32k_opcode { |
struct ns32k_opcode { |
83 |
char *name; |
const char *name; |
84 |
unsigned char opcode_id_size; /* not used by the assembler */ |
unsigned char opcode_id_size; /* not used by the assembler */ |
85 |
unsigned char opcode_size; |
unsigned char opcode_size; |
86 |
unsigned long opcode_seed; |
unsigned long opcode_seed; |
87 |
char *operands; |
const char *operands; |
88 |
unsigned char im_size; /* not used by dissassembler */ |
unsigned char im_size; /* not used by dissassembler */ |
89 |
char *default_args; /* default to those args when none given */ |
const char *default_args; /* default to those args when none given */ |
90 |
char default_modec; /* default to this addr-mode when ambigous |
char default_modec; /* default to this addr-mode when ambigous |
91 |
ie when the argument of a general addr-mode |
ie when the argument of a general addr-mode |
92 |
is a plain constant */ |
is a plain constant */ |
103 |
struct not_wot /* ns32k opcode table: wot to do with this */ |
struct not_wot /* ns32k opcode table: wot to do with this */ |
104 |
/* particular opcode */ |
/* particular opcode */ |
105 |
{ |
{ |
106 |
int obits; /* number of opcode bits */ |
int obits; /* number of opcode bits */ |
107 |
int ibits; /* number of instruction bits */ |
int ibits; /* number of instruction bits */ |
108 |
ns32k_opcodeT code; /* op-code (may be > 8 bits!) */ |
ns32k_opcodeT code; /* op-code (may be > 8 bits!) */ |
109 |
char *args; /* how to compile said opcode */ |
const char *args; /* how to compile said opcode */ |
110 |
}; |
}; |
111 |
|
|
112 |
struct not /* ns32k opcode text */ |
struct not /* ns32k opcode text */ |
113 |
{ |
{ |
114 |
char * name; /* opcode name: lowercase string [key] */ |
const char *name; /* opcode name: lowercase string [key] */ |
115 |
struct not_wot detail; /* rest of opcode table [datum] */ |
struct not_wot detail; /* rest of opcode table [datum] */ |
116 |
}; |
}; |
117 |
|
|
118 |
/* Instructions look like this: |
/* Instructions look like this: |
119 |
|
|
120 |
basic instruction--1, 2, or 3 bytes |
basic instruction--1, 2, or 3 bytes |
121 |
index byte for operand A, if operand A is indexed--1 byte |
index byte for operand A, if operand A is indexed--1 byte |
122 |
index byte for operand B, if operand B is indexed--1 byte |
index byte for operand B, if operand B is indexed--1 byte |
130 |
The implied operands are associated with operands other than A and B. |
The implied operands are associated with operands other than A and B. |
131 |
|
|
132 |
Each operand has a digit and a letter. |
Each operand has a digit and a letter. |
133 |
|
|
134 |
The digit gives the position in the assembly language. The letter, |
The digit gives the position in the assembly language. The letter, |
135 |
one of the following, tells us what kind of operand it is. */ |
one of the following, tells us what kind of operand it is. */ |
136 |
|
|
482 |
{ "scalbl", 14,24, 0x10fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL }, |
{ "scalbl", 14,24, 0x10fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL }, |
483 |
}; |
}; |
484 |
|
|
|
static const int numopcodes=sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]); |
|
|
|
|
|
static const struct ns32k_opcode *const endop = ns32k_opcodes+sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]); |
|
|
|
|
485 |
#define MAX_ARGS 4 |
#define MAX_ARGS 4 |
486 |
#define ARG_LEN 50 |
#define ARG_LEN 50 |
487 |
|
|