]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - include/opcode/moxie.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / include / opcode / moxie.h
CommitLineData
20135e4c 1/* Definitions for decoding the moxie opcode table.
250d07de 2 Copyright (C) 2009-2021 Free Software Foundation, Inc.
20135e4c
NC
3 Contributed by Anthony Green (green@moxielogic.com).
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
18 02110-1301, USA. */
19
20/* Form 1 instructions come in different flavors:
21
22 Some have no arguments (MOXIE_F1_NARG)
23 Some only use the A operand (MOXIE_F1_A)
24 Some use A and B registers (MOXIE_F1_AB)
25 Some use A and consume a 4 byte immediate value (MOXIE_F1_A4)
26 Some use just a 4 byte immediate value (MOXIE_F1_4)
0e7c7f11 27 Some use just a 4 byte memory address (MOXIE_F1_M)
20135e4c
NC
28 Some use B and an indirect A (MOXIE_F1_AiB)
29 Some use A and an indirect B (MOXIE_F1_ABi)
30 Some consume a 4 byte immediate value and use X (MOXIE_F1_4A)
bffb6004
AG
31 Some use B and an indirect A plus 2 byte offset (MOXIE_F1_AiB2)
32 Some use A and an indirect B plus 2 byte offset (MOXIE_F1_ABi2)
20135e4c
NC
33
34 Form 2 instructions also come in different flavors:
35
36 Some have no arguments (MOXIE_F2_NARG)
37 Some use the A register and an 8-bit value (MOXIE_F2_A8V)
38
39 Form 3 instructions also come in different flavors:
40
f865a31d
AG
41 Some have no arguments (MOXIE_F3_NARG)
42 Some have a 10-bit PC relative operand (MOXIE_F3_PCREL). */
20135e4c
NC
43
44#define MOXIE_F1_NARG 0x100
45#define MOXIE_F1_A 0x101
46#define MOXIE_F1_AB 0x102
47/* #define MOXIE_F1_ABC 0x103 */
48#define MOXIE_F1_A4 0x104
49#define MOXIE_F1_4 0x105
50#define MOXIE_F1_AiB 0x106
51#define MOXIE_F1_ABi 0x107
52#define MOXIE_F1_4A 0x108
bffb6004
AG
53#define MOXIE_F1_AiB2 0x109
54#define MOXIE_F1_ABi2 0x10a
0e7c7f11 55#define MOXIE_F1_M 0x10b
20135e4c
NC
56
57#define MOXIE_F2_NARG 0x200
58#define MOXIE_F2_A8V 0x201
59
f865a31d
AG
60#define MOXIE_F3_NARG 0x300
61#define MOXIE_F3_PCREL 0x301
20135e4c 62
1415a2a7
AG
63#define MOXIE_BAD 0x400
64
20135e4c
NC
65typedef struct moxie_opc_info_t
66{
67 short opcode;
68 unsigned itype;
69 const char * name;
70} moxie_opc_info_t;
71
1415a2a7 72extern const moxie_opc_info_t moxie_form1_opc_info[128];
20135e4c 73extern const moxie_opc_info_t moxie_form2_opc_info[4];
f865a31d 74extern const moxie_opc_info_t moxie_form3_opc_info[16];