Initial revision
[deliverable/binutils-gdb.git] / gas / config / vax-inst.h
CommitLineData
fecd2382
RP
1/* vax-inst.h - GNU - Part of vax.c
2 Copyright (C) 1987 Free Software Foundation, Inc.
3
4This file is part of GAS, the GNU Assembler.
5
6GAS is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GAS is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GAS; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20/*
21 * This is part of vax-ins-parse.c & friends.
22 * We want to parse a vax instruction text into a tree defined here.
23 */
24
25#define VIT_MAX_OPERANDS (6) /* maximum number of operands in one */
26 /* single vax instruction */
27
28struct vop /* vax instruction operand */
29{
30 short int vop_ndx; /* -1, or index register. eg 7=[R7] */
31 short int vop_reg; /* -1, or register number. eg @I^#=0xF */
32 /* Helps distinguish "abs" from "abs(PC)". */
33 short int vop_mode; /* addressing mode 4 bits. eg I^#=0x9 */
34 char vop_short; /* operand displacement length as written */
35 /* ' '=none, "bilsw"=B^I^L^S^W^. */
36 char vop_access; /* 'b'branch ' 'no-instruction 'amrvw'norm */
37 char vop_width; /* Operand width, one of "bdfghloqw" */
38 char * vop_warn; /* warning message of this operand, if any */
39 char * vop_error; /* say if operand is inappropriate */
40 char * vop_expr_begin; /* Unparsed expression, 1st char ... */
41 char * vop_expr_end; /* ... last char. */
42 unsigned char vop_nbytes; /* number of bytes in datum */
43};
44
45
46typedef long vax_opcodeT; /* For initialising array of opcodes */
47 /* Some synthetic opcodes > 16 bits! */
48
49#define VIT_OPCODE_SYNTHETIC 0x80000000 /* Not real hardware instruction. */
50#define VIT_OPCODE_SPECIAL 0x40000000 /* Not normal branch optimising. */
51 /* Never set without ..._SYNTHETIC */
52
53#define VAX_WIDTH_UNCONDITIONAL_JUMP '-' /* These are encoded into */
54#define VAX_WIDTH_CONDITIONAL_JUMP '?' /* vop_width when vop_access=='b' */
55#define VAX_WIDTH_WORD_JUMP '!' /* and VIT_OPCODE_SYNTHETIC set. */
56#define VAX_WIDTH_BYTE_JUMP ':' /* */
57
58#define VAX_JMP (0x17) /* Useful for branch optimising. Jump instr*/
59#define VAX_PC_RELATIVE_MODE (0xef) /* Use it after VAX_JMP */
60#define VAX_ABSOLUTE_MODE (0x9F) /* Use as @#... */
61#define VAX_BRB (0x11) /* Canonical branch. */
62#define VAX_BRW (0x31) /* Another canonical branch */
63#define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */
64#define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/
65 /* Needs VAX_PC_RELATIVE_MODE byte after it*/
66
67struct vit /* vax instruction tree */
68{
69 /* vit_opcode is char[] for portability. */
70 char vit_opcode [ sizeof (vax_opcodeT) ];
71 unsigned char vit_opcode_nbytes; /* How long is _opcode? (chars) */
72 unsigned char vit_operands;/* */
73 struct vop vit_operand[VIT_MAX_OPERANDS]; /* operands */
74 char * vit_error; /* "" or error text */
75};
76
77/* end: vax-inst.h */
This page took 0.025711 seconds and 4 git commands to generate.