Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
#ifndef S390_H
#define S390_H
enum s390_opcode_mode_val
{
S390_OPCODE_ESA = 0,
S390_OPCODE_ZARCH
};
enum s390_opcode_cpu_val
{
S390_OPCODE_G5 = 0,
S390_OPCODE_G6,
S390_OPCODE_Z900,
S390_OPCODE_Z990,
S390_OPCODE_Z9_109
};
struct s390_opcode
{
const char * name;
operands are zeroes. */
unsigned char opcode[6];
mask containing ones indicating those bits which must match the
opcode field, and zeroes indicating those bits which need not
match (and are presumably filled in by operands). */
unsigned char mask[6];
int oplen;
operand table. They appear in the order which the operands must
appear in assembly code, and are terminated by a zero. */
unsigned char operands[6];
unsigned int modes;
enum s390_opcode_cpu_val min_cpu;
};
in the order in which the disassembler should consider
instructions. */
extern const struct s390_opcode s390_opcodes[];
extern const int s390_num_opcodes;
extern const struct s390_opcode s390_opformats[];
extern const int s390_num_opformats;
struct s390_operand
{
int bits;
int shift;
unsigned long flags;
};
the operands field of the powerpc_opcodes table. */
extern const struct s390_operand s390_operands[];
register names with a leading 'r'. */
#define S390_OPERAND_GPR 0x1
prints these with a leading 'f'. */
#define S390_OPERAND_FPR 0x2
prints these with a leading 'a'. */
#define S390_OPERAND_AR 0x4
prints these with a leading 'c'. */
#define S390_OPERAND_CR 0x8
#define S390_OPERAND_DISP 0x10
#define S390_OPERAND_BASE 0x20
#define S390_OPERAND_INDEX 0x40
prints these symbolically if possible. */
#define S390_OPERAND_PCREL 0x80
#define S390_OPERAND_SIGNED 0x100
#define S390_OPERAND_LENGTH 0x200
the instruction may be optional. */
#define S390_OPERAND_OPTIONAL 0x400
#endif