| 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 |
|
|---|
| 5 | This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
|
|---|
| 6 | the GNU Binutils.
|
|---|
| 7 |
|
|---|
| 8 | GAS/GDB is free software; you can redistribute it and/or modify
|
|---|
| 9 | it under the terms of the GNU General Public License as published by
|
|---|
| 10 | the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 11 | any later version.
|
|---|
| 12 |
|
|---|
| 13 | GAS/GDB is distributed in the hope that it will be useful,
|
|---|
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 16 | GNU General Public License for more details.
|
|---|
| 17 |
|
|---|
| 18 | You should have received a copy of the GNU General Public License
|
|---|
| 19 | along with GAS or GDB; see the file COPYING. If not, write to
|
|---|
| 20 | the Free Software Foundation, 59 Temple Place - Suite 330,
|
|---|
| 21 | Boston, 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 |
|
|---|
| 40 | enum 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 |
|
|---|
| 65 | struct sparc_opcode_arch {
|
|---|
| 66 | const char *name;
|
|---|
| 67 | /* Mask of sparc_opcode_arch_val's supported.
|
|---|
|
|---|