Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
i370-opc.c File Reference
#include <stdio.h>
#include "sysdep.h"
#include "opcode/i370.h"

Go to the source code of this file.

Defines

#define UNUSED   0
#define RR_R1   (UNUSED + 1)
#define RR_R1_MASK   (0xf << 4)
#define RR_R2   (RR_R1 + 1)
#define RR_R2_MASK   (0xf)
#define RR_I   (RR_R2 + 1)
#define RR_I_MASK   (0xff)
#define RRE_R1   (RR_I + 1)
#define RRE_R1_MASK   (0xf << 4)
#define RRE_R2   (RRE_R1 + 1)
#define RRE_R2_MASK   (0xf)
#define RRF_R1   (RRE_R2 + 1)
#define RRF_R1_MASK   (0xf << 4)
#define RRF_R2   (RRF_R1 + 1)
#define RRF_R2_MASK   (0xf)
#define RRF_R3   (RRF_R2 + 1)
#define RRF_R3_MASK   (0xf << 12)
#define RX_R1   (RRF_R3 + 1)
#define RX_R1_MASK   (0xf << 20)
#define RX_X2   (RX_R1 + 1)
#define RX_X2_MASK   (0xf << 16)
#define RX_B2   (RX_X2 + 1)
#define RX_B2_MASK   (0xf << 12)
#define RX_D2   (RX_B2 + 1)
#define RX_D2_MASK   (0xfff)
#define RXF_R3   (RX_D2 + 1)
#define RXF_R3_MASK   (0xf << 12)
#define RS_D2   (RXF_R3 + 1)
#define RS_D2_MASK   (0xfff)
#define RS_R3   (RS_D2 + 1)
#define RS_R3_MASK   (0xf << 16)
#define RS_B2   (RS_R3 + 1)
#define RS_B2_MASK   (0xf << 12)
#define RS_B2_OPT   (RS_B2 + 1)
#define RS_B2_OPT_MASK   (0xf << 12)
#define RSI_R1   (RS_B2_OPT + 1)
#define RSI_R1_MASK   (0xf << 20)
#define RSI_R3   (RSI_R1 + 1)
#define RSI_R3_MASK   (0xf << 16)
#define RSI_I2   (RSI_R3 + 1)
#define RSI_I2_MASK   (0xffff)
#define RI_R1   (RSI_I2 + 1)
#define RI_R1_MASK   (0xf << 20)
#define RI_I2   (RI_R1 + 1)
#define RI_I2_MASK   (0xffff)
#define SI_I2   (RI_I2 + 1)
#define SI_I2_MASK   (0xff << 16)
#define SI_B1   (SI_I2 + 1)
#define SI_B1_MASK   (0xf << 12)
#define SI_D1   (SI_B1 + 1)
#define SI_D1_MASK   (0xfff)
#define S_B2   (SI_D1 + 1)
#define S_B2_MASK   (0xf << 12)
#define S_D2   (S_B2 + 1)
#define S_D2_MASK   (0xfff)
#define SS_L   (S_D2 + 1)
#define SS_L_MASK   (0xffff<<16)
#define SS_B1   (SS_L + 1)
#define SS_B1_MASK   (0xf << 12)
#define SS_D1   (SS_B1 + 1)
#define SS_D1_MASK   (0xfff)
#define SS_B2   (SS_D1 + 1)
#define SS_B2_MASK   (0xf << 12)
#define SS_D2   (SS_B2 + 1)
#define SS_D2_MASK   (0xfff)
#define OPS(x)   ((((unsigned short) (x)) & 0xff) << 8)
#define OPS_MASK   OPS (0xff)
#define XOPS(x)   ((((unsigned short) (x)) & 0xff) << 24)
#define XOPS_MASK   XOPS (0xff)
#define SOPS(x)   ((((unsigned short) (x)) & 0xffff) << 16)
#define SOPS_MASK   SOPS (0xffff)
#define EOPS(x)   (((unsigned short) (x)) & 0xffff)
#define EOPS_MASK   EOPS (0xffff)
#define ROPS(x)
#define ROPS_MASK   ROPS (0xfff)
#define E(op)   (EOPS (op))
#define E_MASK   E (0xffff)
#define RR(op, r1, r2)
#define RR_MASK   RR (0xff, 0x0, 0x0)
#define SVC(op, i)   (OPS (op) | (((unsigned short) (i)) & 0xff))
#define SVC_MASK   SVC (0xff, 0x0)
#define RRE(op, r1, r2)
#define RRE_MASK   RRE (0xffff, 0x0, 0x0)
#define RRF(op, r3, r1, r2)
#define RRF_MASK   RRF (0xffff, 0x0, 0x0, 0x0)
#define RX(op, r1, x2, b2, d2)
#define RX_MASK   RX (0xff, 0x0, 0x0, 0x0, 0x0)
#define RXEH(op, r1, x2, b2, d2)
#define RXEH_MASK   RXEH (0xff, 0, 0, 0, 0)
#define RXEL(op)   ((((unsigned short) (op)) & 0xff) << 16 )
#define RXEL_MASK   RXEL (0xff)
#define RXFH(op, r1, x2, b2, d2)
#define RXFH_MASK   RXFH (0xff, 0, 0, 0, 0)
#define RXFL(op, r3)
#define RXFL_MASK   RXFL (0xff, 0)
#define RS(op, r1, b3, b2, d2)
#define RS_MASK   RS (0xff, 0x0, 0x0, 0x0, 0x0)
#define RSI(op, r1, r3, i2)
#define RSI_MASK   RSI (0xff, 0x0, 0x0, 0x0)
#define RI(op, r1, i2)
#define RI_MASK   RI (0xfff, 0x0, 0x0)
#define SI(op, i2, b1, d1)
#define SI_MASK   SI (0xff, 0x0, 0x0, 0x0)
#define S(op, b2, d2)
#define S_MASK   S (0xffff, 0x0, 0x0)
#define SSH(op, l, b1, d1)
#define SSL(b2, d2)
#define SS_MASK   SSH (0xff, 0x0, 0x0, 0x0)
#define SSEH(op, b1, d1)
#define SSEL(b2, d2)
#define SSE_MASK   SSEH (0xffff, 0x0, 0x0)
#define IBF   I370_OPCODE_ESA390_BF
#define IBS   I370_OPCODE_ESA390_BS
#define ICK   I370_OPCODE_ESA390_CK
#define ICM   I370_OPCODE_ESA390_CM
#define IFX   I370_OPCODE_ESA390_FX
#define IHX   I370_OPCODE_ESA390_HX
#define IIR   I370_OPCODE_ESA390_IR
#define IMI   I370_OPCODE_ESA390_MI
#define IPC   I370_OPCODE_ESA390_PC
#define IPL   I370_OPCODE_ESA390_PL
#define IQR   I370_OPCODE_ESA390_QR
#define IRP   I370_OPCODE_ESA390_RP
#define ISA   I370_OPCODE_ESA390_SA
#define ISG   I370_OPCODE_ESA390_SG
#define ISR   I370_OPCODE_ESA390_SR
#define ITR   I370_OPCODE_ESA390_SR
#define I390   IBF | IBS | ICK | ICM | IIR | IFX | IHX | IMI | IPC | IPL | IQR | IRP | ISA | ISG | ISR | ITR | I370_OPCODE_ESA390
#define IESA   I390 | I370_OPCODE_ESA370
#define IXA   IESA | I370_OPCODE_370_XA
#define I370   IXA | I370_OPCODE_370
#define I360   I370 | I370_OPCODE_360

Functions

static i370_insn_t insert_ss_b2 (i370_insn_t insn, long value, const char **errmsg ATTRIBUTE_UNUSED)
static i370_insn_t insert_ss_d2 (i370_insn_t insn, long value, const char **errmsg ATTRIBUTE_UNUSED)
static i370_insn_t insert_rxf_r3 (i370_insn_t insn, long value, const char **errmsg ATTRIBUTE_UNUSED)
static long extract_ss_b2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)
static long extract_ss_d2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)
static long extract_rxf_r3 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)

Variables

const int i370_num_opcodes
const int i370_num_macros

Define Documentation

#define E (   op)    (EOPS (op))

Definition at line 289 of file i370-opc.c.

#define E_MASK   E (0xffff)

Definition at line 290 of file i370-opc.c.

#define EOPS (   x)    (((unsigned short) (x)) & 0xffff)

Definition at line 279 of file i370-opc.c.

#define EOPS_MASK   EOPS (0xffff)

Definition at line 280 of file i370-opc.c.

#define I360   I370 | I370_OPCODE_360

Definition at line 449 of file i370-opc.c.

#define I370   IXA | I370_OPCODE_370

Definition at line 448 of file i370-opc.c.

#define I390   IBF | IBS | ICK | ICM | IIR | IFX | IHX | IMI | IPC | IPL | IQR | IRP | ISA | ISG | ISR | ITR | I370_OPCODE_ESA390

Definition at line 445 of file i370-opc.c.

#define IBF   I370_OPCODE_ESA390_BF

Definition at line 429 of file i370-opc.c.

#define IBS   I370_OPCODE_ESA390_BS

Definition at line 430 of file i370-opc.c.

#define ICK   I370_OPCODE_ESA390_CK

Definition at line 431 of file i370-opc.c.

#define ICM   I370_OPCODE_ESA390_CM

Definition at line 432 of file i370-opc.c.

#define IESA   I390 | I370_OPCODE_ESA370

Definition at line 446 of file i370-opc.c.

#define IFX   I370_OPCODE_ESA390_FX

Definition at line 433 of file i370-opc.c.

#define IHX   I370_OPCODE_ESA390_HX

Definition at line 434 of file i370-opc.c.

Definition at line 435 of file i370-opc.c.

#define IMI   I370_OPCODE_ESA390_MI

Definition at line 436 of file i370-opc.c.

#define IPC   I370_OPCODE_ESA390_PC

Definition at line 437 of file i370-opc.c.

#define IPL   I370_OPCODE_ESA390_PL

Definition at line 438 of file i370-opc.c.

#define IQR   I370_OPCODE_ESA390_QR

Definition at line 439 of file i370-opc.c.

#define IRP   I370_OPCODE_ESA390_RP

Definition at line 440 of file i370-opc.c.

#define ISA   I370_OPCODE_ESA390_SA

Definition at line 441 of file i370-opc.c.

#define ISG   I370_OPCODE_ESA390_SG

Definition at line 442 of file i370-opc.c.

#define ISR   I370_OPCODE_ESA390_SR

Definition at line 443 of file i370-opc.c.

#define ITR   I370_OPCODE_ESA390_SR

Definition at line 444 of file i370-opc.c.

#define IXA   IESA | I370_OPCODE_370_XA

Definition at line 447 of file i370-opc.c.

#define OPS (   x)    ((((unsigned short) (x)) & 0xff) << 8)

Definition at line 267 of file i370-opc.c.

#define OPS_MASK   OPS (0xff)

Definition at line 268 of file i370-opc.c.

#define RI (   op,
  r1,
  i2 
)
Value:
(ROPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (i2)) & 0xffff)))

Definition at line 378 of file i370-opc.c.

#define RI_I2   (RI_R1 + 1)
#define RI_I2_MASK   (0xffff)
#define RI_MASK   RI (0xfff, 0x0, 0x0)

Definition at line 382 of file i370-opc.c.

#define RI_R1   (RSI_I2 + 1)
#define RI_R1_MASK   (0xf << 20)
#define ROPS (   x)
Value:
(((((unsigned short) (x)) & 0xff0) << 20) | \
                 ((((unsigned short) (x)) & 0x00f) << 16))

Definition at line 283 of file i370-opc.c.

#define ROPS_MASK   ROPS (0xfff)

Definition at line 285 of file i370-opc.c.

#define RR (   op,
  r1,
  r2 
)
Value:
(OPS (op) | ((((unsigned short) (r1)) & 0xf) << 4) |   \
              ((((unsigned short) (r2)) & 0xf) ))

Definition at line 293 of file i370-opc.c.

#define RR_I   (RR_R2 + 1)
#define RR_I_MASK   (0xff)
#define RR_MASK   RR (0xff, 0x0, 0x0)

Definition at line 297 of file i370-opc.c.

#define RR_R1   (UNUSED + 1)
#define RR_R1_MASK   (0xf << 4)
#define RR_R2   (RR_R1 + 1)
#define RR_R2_MASK   (0xf)
#define RRE (   op,
  r1,
  r2 
)
Value:
(SOPS (op) | ((((unsigned short) (r1)) & 0xf) << 4) |   \
               ((((unsigned short) (r2)) & 0xf) ))

Definition at line 306 of file i370-opc.c.

#define RRE_MASK   RRE (0xffff, 0x0, 0x0)

Definition at line 310 of file i370-opc.c.

#define RRE_R1   (RR_I + 1)
#define RRE_R1_MASK   (0xf << 4)
#define RRE_R2   (RRE_R1 + 1)
#define RRE_R2_MASK   (0xf)
#define RRF (   op,
  r3,
  r1,
  r2 
)
Value:
(SOPS (op) | ((((unsigned short) (r3)) & 0xf) << 12) |   \
               ((((unsigned short) (r1)) & 0xf) << 4)  |   \
               ((((unsigned short) (r2)) & 0xf) ))

Definition at line 313 of file i370-opc.c.

#define RRF_MASK   RRF (0xffff, 0x0, 0x0, 0x0)

Definition at line 318 of file i370-opc.c.

#define RRF_R1   (RRE_R2 + 1)
#define RRF_R1_MASK   (0xf << 4)
#define RRF_R2   (RRF_R1 + 1)
#define RRF_R2_MASK   (0xf)
#define RRF_R3   (RRF_R2 + 1)
#define RRF_R3_MASK   (0xf << 12)
#define RS (   op,
  r1,
  b3,
  b2,
  d2 
)
Value:
(XOPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (b3)) & 0xf) << 16) |  \
              ((((unsigned short) (b2)) & 0xf) << 12) |  \
              ((((unsigned short) (d2)) & 0xfff)))

Definition at line 361 of file i370-opc.c.

#define RS_B2   (RS_R3 + 1)
#define RS_B2_MASK   (0xf << 12)
#define RS_B2_OPT   (RS_B2 + 1)
#define RS_B2_OPT_MASK   (0xf << 12)
#define RS_D2   (RXF_R3 + 1)
#define RS_D2_MASK   (0xfff)
#define RS_MASK   RS (0xff, 0x0, 0x0, 0x0, 0x0)

Definition at line 367 of file i370-opc.c.

#define RS_R3   (RS_D2 + 1)
#define RS_R3_MASK   (0xf << 16)
#define RSI (   op,
  r1,
  r3,
  i2 
)
Value:
(XOPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (r3)) & 0xf) << 16) |  \
              ((((unsigned short) (i2)) & 0xffff)))

Definition at line 370 of file i370-opc.c.

#define RSI_I2   (RSI_R3 + 1)
#define RSI_I2_MASK   (0xffff)
#define RSI_MASK   RSI (0xff, 0x0, 0x0, 0x0)

Definition at line 375 of file i370-opc.c.

#define RSI_R1   (RS_B2_OPT + 1)
#define RSI_R1_MASK   (0xf << 20)
#define RSI_R3   (RSI_R1 + 1)
#define RSI_R3_MASK   (0xf << 16)
#define RX (   op,
  r1,
  x2,
  b2,
  d2 
)
Value:
(XOPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (x2)) & 0xf) << 16) |  \
              ((((unsigned short) (b2)) & 0xf) << 12) |  \
              ((((unsigned short) (d2)) & 0xfff)))

Definition at line 321 of file i370-opc.c.

#define RX_B2   (RX_X2 + 1)
#define RX_B2_MASK   (0xf << 12)
#define RX_D2   (RX_B2 + 1)
#define RX_D2_MASK   (0xfff)
#define RX_MASK   RX (0xff, 0x0, 0x0, 0x0, 0x0)

Definition at line 327 of file i370-opc.c.

#define RX_R1   (RRF_R3 + 1)
#define RX_R1_MASK   (0xf << 20)
#define RX_X2   (RX_R1 + 1)
#define RX_X2_MASK   (0xf << 16)
#define RXEH (   op,
  r1,
  x2,
  b2,
  d2 
)
Value:
(XOPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (x2)) & 0xf) << 16) |  \
              ((((unsigned short) (b2)) & 0xf) << 12) |  \
              ((((unsigned short) (d2)) & 0xfff)))

Definition at line 330 of file i370-opc.c.

#define RXEH_MASK   RXEH (0xff, 0, 0, 0, 0)

Definition at line 336 of file i370-opc.c.

#define RXEL (   op)    ((((unsigned short) (op)) & 0xff) << 16 )

Definition at line 339 of file i370-opc.c.

#define RXEL_MASK   RXEL (0xff)

Definition at line 342 of file i370-opc.c.

#define RXF_R3   (RX_D2 + 1)
#define RXF_R3_MASK   (0xf << 12)
#define RXFH (   op,
  r1,
  x2,
  b2,
  d2 
)
Value:
(XOPS(op) | ((((unsigned short) (r1)) & 0xf) << 20) |  \
              ((((unsigned short) (x2)) & 0xf) << 16) |  \
              ((((unsigned short) (b2)) & 0xf) << 12) |  \
              ((((unsigned short) (d2)) & 0xfff)))

Definition at line 345 of file i370-opc.c.

#define RXFH_MASK   RXFH (0xff, 0, 0, 0, 0)

Definition at line 351 of file i370-opc.c.

#define RXFL (   op,
  r3 
)
Value:
(((((unsigned short) (r3)) & 0xf)  << 28 ) | \
               ((((unsigned short) (op)) & 0xff) << 16 ))

Definition at line 354 of file i370-opc.c.

#define RXFL_MASK   RXFL (0xff, 0)

Definition at line 358 of file i370-opc.c.

#define S (   op,
  b2,
  d2 
)
Value:
(SOPS(op) | ((((unsigned short)(b2)) & 0xf) << 12) |  \
              ((((unsigned short)(d2)) & 0xfff)))

Definition at line 393 of file i370-opc.c.

#define S_B2   (SI_D1 + 1)
#define S_B2_MASK   (0xf << 12)
#define S_D2   (S_B2 + 1)
#define S_D2_MASK   (0xfff)
#define S_MASK   S (0xffff, 0x0, 0x0)

Definition at line 397 of file i370-opc.c.

#define SI (   op,
  i2,
  b1,
  d1 
)
Value:
(XOPS(op) | ((((unsigned short) (i2)) & 0xff) << 16) |  \
              ((((unsigned short) (b1)) & 0xf)  << 12) |  \
              ((((unsigned short) (d1)) & 0xfff)))

Definition at line 385 of file i370-opc.c.

#define SI_B1   (SI_I2 + 1)
#define SI_B1_MASK   (0xf << 12)
#define SI_D1   (SI_B1 + 1)
#define SI_D1_MASK   (0xfff)
#define SI_I2   (RI_I2 + 1)
#define SI_I2_MASK   (0xff << 16)
#define SI_MASK   SI (0xff, 0x0, 0x0, 0x0)

Definition at line 390 of file i370-opc.c.

#define SOPS (   x)    ((((unsigned short) (x)) & 0xffff) << 16)

Definition at line 275 of file i370-opc.c.

#define SOPS_MASK   SOPS (0xffff)

Definition at line 276 of file i370-opc.c.

#define SS_B1   (SS_L + 1)
#define SS_B1_MASK   (0xf << 12)
#define SS_B2   (SS_D1 + 1)
#define SS_B2_MASK   (0xf << 12)
#define SS_D1   (SS_B1 + 1)
#define SS_D1_MASK   (0xfff)
#define SS_D2   (SS_B2 + 1)
#define SS_D2_MASK   (0xfff)
#define SS_L   (S_D2 + 1)
#define SS_L_MASK   (0xffff<<16)
#define SS_MASK   SSH (0xff, 0x0, 0x0, 0x0)

Definition at line 410 of file i370-opc.c.

#define SSE_MASK   SSEH (0xffff, 0x0, 0x0)

Definition at line 422 of file i370-opc.c.

#define SSEH (   op,
  b1,
  d1 
)
Value:
(SOPS(op) | ((((unsigned short) (b1)) & 0xf)  << 12) |  \
              ((((unsigned short) (d1)) & 0xfff)))

Definition at line 413 of file i370-opc.c.

#define SSEL (   b2,
  d2 
)
Value:
( ((((unsigned short) (b1)) & 0xf)   << 28) |  \
              ((((unsigned short) (d1)) & 0xfff) << 16 ))

Definition at line 418 of file i370-opc.c.

#define SSH (   op,
  l,
  b1,
  d1 
)
Value:
(XOPS(op) | ((((unsigned short) (l)) & 0xff) << 16) |  \
              ((((unsigned short) (b1)) & 0xf)  << 12) |  \
              ((((unsigned short) (d1)) & 0xfff)))

Definition at line 400 of file i370-opc.c.

#define SSL (   b2,
  d2 
)
Value:
( ((((unsigned short) (b1)) & 0xf)   << 28) |  \
              ((((unsigned short) (d1)) & 0xfff) << 16 ))

Definition at line 406 of file i370-opc.c.

#define SVC (   op,
  i 
)    (OPS (op) | (((unsigned short) (i)) & 0xff))

Definition at line 300 of file i370-opc.c.

#define SVC_MASK   SVC (0xff, 0x0)

Definition at line 303 of file i370-opc.c.

#define UNUSED   0
#define XOPS (   x)    ((((unsigned short) (x)) & 0xff) << 24)

Definition at line 271 of file i370-opc.c.

#define XOPS_MASK   XOPS (0xff)

Definition at line 272 of file i370-opc.c.


Function Documentation

static long extract_rxf_r3 ( i370_insn_t  insn,
int *invalid  ATTRIBUTE_UNUSED 
) [static]

Definition at line 77 of file i370-opc.c.

{
  return (insn.i[1] >>28) & 0xf;
}
static long extract_ss_b2 ( i370_insn_t  insn,
int *invalid  ATTRIBUTE_UNUSED 
) [static]

Definition at line 65 of file i370-opc.c.

{
  return (insn.i[1] >>28) & 0xf;
}
static long extract_ss_d2 ( i370_insn_t  insn,
int *invalid  ATTRIBUTE_UNUSED 
) [static]

Definition at line 71 of file i370-opc.c.

{
  return (insn.i[1] >>16) & 0xfff;
}
static i370_insn_t insert_rxf_r3 ( i370_insn_t  insn,
long  value,
const char **errmsg  ATTRIBUTE_UNUSED 
) [static]

Definition at line 57 of file i370-opc.c.

{
  insn.i[1] |= (value & 0xf) << 28;
  return insn;
}
static i370_insn_t insert_ss_b2 ( i370_insn_t  insn,
long  value,
const char **errmsg  ATTRIBUTE_UNUSED 
) [static]

Definition at line 41 of file i370-opc.c.

{
  insn.i[1] |= (value & 0xf) << 28;
  return insn;
}
static i370_insn_t insert_ss_d2 ( i370_insn_t  insn,
long  value,
const char **errmsg  ATTRIBUTE_UNUSED 
) [static]

Definition at line 49 of file i370-opc.c.

{
  insn.i[1] |= (value & 0xfff) << 16;
  return insn;
}

Variable Documentation

Initial value:
  sizeof (i370_macros) / sizeof (i370_macros[0])

Definition at line 934 of file i370-opc.c.

Initial value:
  sizeof (i370_opcodes) / sizeof (i370_opcodes[0])

Definition at line 885 of file i370-opc.c.