gdb-3.1
[deliverable/binutils-gdb.git] / gdb / sparc-opcode.h
1 /* Sparc opcde list for GDB, the GNU debugger.
2 Copyright (C) 1986, 1987 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@mcc.com)
4
5 GDB is distributed in the hope that it will be useful, but WITHOUT ANY
6 WARRANTY. No author or distributor accepts responsibility to anyone
7 for the consequences of using it or for whether it serves any
8 particular purpose or works at all, unless he says so in writing.
9 Refer to the GDB General Public License for full details.
10
11 Everyone is granted permission to copy, modify and redistribute GDB,
12 but only under the conditions described in the GDB General Public
13 License. A copy of this license is supposed to have been given to you
14 along with GDB so you can know your rights and responsibilities. It
15 should be in a file named COPYING. Among other things, the copyright
16 notice and this notice must be preserved on all copies.
17
18 In other words, go ahead and share GDB, but don't try to stop
19 anyone else from sharing it farther. Help stamp out software hoarding!
20 */
21
22 struct op1_fmt
23 {
24 unsigned op1 : 2;
25 unsigned dummy : 30;
26 };
27
28 struct op2_fmt
29 {
30 unsigned dummy1 : 7;
31 unsigned op2 : 3;
32 unsigned dummy2 : 22;
33 };
34
35 struct op3_fmt
36 {
37 unsigned dummy1 : 7;
38 unsigned op3 : 6;
39 unsigned dummy2 : 19;
40 };
41
42 struct call_fmt
43 {
44 unsigned op : 2;
45 unsigned disp : 30;
46 };
47
48 struct sethi_fmt
49 {
50 unsigned op : 2;
51 unsigned rd : 5;
52 unsigned op2 : 3;
53 unsigned imm : 22;
54 };
55
56 struct branch_fmt
57 {
58 unsigned op : 2;
59 unsigned a : 1;
60 unsigned cond : 4;
61 unsigned op2 : 3;
62 unsigned disp : 22; /* this should really be signed. */
63 };
64
65 struct ldst_fmt
66 {
67 unsigned op : 2;
68 unsigned rd : 5;
69 unsigned op3 : 6;
70 unsigned rs1 : 5;
71 unsigned i : 1;
72 unsigned asi : 8;
73 unsigned rs2 : 5;
74 };
75
76 struct arith_imm_fmt
77 {
78 unsigned op : 2;
79 unsigned rd : 5;
80 unsigned op3 : 6;
81 unsigned rs1 : 5;
82 unsigned i : 1;
83 int simm : 13; /* Hopefully signed, but . . . */
84 };
85
86 struct arith_fmt
87 {
88 unsigned op : 2;
89 unsigned rd : 5;
90 unsigned op3 : 6;
91 unsigned rs1 : 5;
92 unsigned i : 1;
93 unsigned opf : 8;
94 unsigned rs2 : 5;
95 };
96
97 union insn_fmt
98 {
99 struct op1_fmt op1;
100 struct op2_fmt op2;
101 struct op3_fmt op3;
102 struct call_fmt call;
103 struct sethi_fmt sethi;
104 struct branch_fmt branch;
105 struct ldst_fmt ldst;
106 struct arith_imm_fmt arith_imm;
107 struct arith_fmt arith;
108 int intval;
109 float floatval; /* ?? */
110 };
111
112 typedef enum
113 {
114 Error, not_branch, bicc, bicca, ba, baa, ticc, ta,
115 } branch_type;
116
This page took 0.032549 seconds and 5 git commands to generate.