source: trunk/src/binutils/include/opcode/sparc.h@ 2302

Last change on this file since 2302 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.4 KB
Line 
1/* Definitions for opcode table for the sparc.
2 Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002
3 Free Software Foundation, Inc.
4
5This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
6the GNU Binutils.
7
8GAS/GDB is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GAS/GDB is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GAS or GDB; see the file COPYING. If not, write to
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
22
23#include "ansidecl.h"
24
25/* The SPARC opcode table (and other related data) is defined in
26 the opcodes library in sparc-opc.c. If you change anything here, make
27 sure you fix up that file, and vice versa. */
28
29 /* FIXME-someday: perhaps the ,a's and such should be embedded in the
30 instruction's name rather than the args. This would make gas faster, pinsn
31 slower, but would mess up some macros a bit. xoxorich. */
32
33/* List of instruction sets variations.
34 These values are such that each element is either a superset of a
35 preceding each one or they conflict in which case SPARC_OPCODE_CONFLICT_P
36 returns non-zero.
37 The values are indices into `sparc_opcode_archs' defined in sparc-opc.c.
38 Don't change this without updating sparc-opc.c. */
39
40enum sparc_opcode_arch_val {
41 SPARC_OPCODE_ARCH_V6 = 0,
42 SPARC_OPCODE_ARCH_V7,
43 SPARC_OPCODE_ARCH_V8,
44 SPARC_OPCODE_ARCH_SPARCLET,
45 SPARC_OPCODE_ARCH_SPARCLITE,
46 /* v9 variants must appear last */
47 SPARC_OPCODE_ARCH_V9,
48 SPARC_OPCODE_ARCH_V9A, /* v9 with ultrasparc additions */
49 SPARC_OPCODE_ARCH_V9B, /* v9 with ultrasparc and cheetah additions */
50 SPARC_OPCODE_ARCH_BAD /* error return from sparc_opcode_lookup_arch */
51};
52
53/* The highest architecture in the table. */
54#define SPARC_OPCODE_ARCH_MAX (SPARC_OPCODE_ARCH_BAD - 1)
55
56/* Given an enum sparc_opcode_arch_val, return the bitmask to use in
57 insn encoding/decoding. */
58#define SPARC_OPCODE_ARCH_MASK(arch) (1 << (arch))
59
60/* Given a valid sparc_opcode_arch_val, return non-zero if it's v9. */
61#define SPARC_OPCODE_ARCH_V9_P(arch) ((arch) >= SPARC_OPCODE_ARCH_V9)
62
63/* Table of cpu variants. */
64
65struct sparc_opcode_arch {
66 const char *name;
67 /* Mask of sparc_opcode_arch_val's supported.