Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions | Variables
sparc.h File Reference
#include "ansidecl.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sparc_opcode_arch
struct  sparc_opcode

Defines

#define SPARC_OPCODE_ARCH_MAX   (SPARC_OPCODE_ARCH_BAD - 1)
#define SPARC_OPCODE_ARCH_MASK(arch)   (1 << (arch))
#define SPARC_OPCODE_ARCH_V9_P(arch)   ((arch) >= SPARC_OPCODE_ARCH_V9)
#define SPARC_OPCODE_SUPPORTED(ARCH)   (sparc_opcode_archs[ARCH].supported)
#define SPARC_OPCODE_CONFLICT_P(ARCH1, ARCH2)
#define F_DELAYED   1 /* Delayed branch. */
#define F_ALIAS   2 /* Alias for a "real" instruction. */
#define F_UNBR   4 /* Unconditional branch. */
#define F_CONDBR   8 /* Conditional branch. */
#define F_JSR   16 /* Subroutine call. */
#define F_FLOAT   32 /* Floating point instruction (not a branch). */
#define F_FBR   64 /* Floating point branch. */
#define OP2(x)   (((x) & 0x7) << 22) /* Op2 field of format2 insns. */
#define OP3(x)   (((x) & 0x3f) << 19) /* Op3 field of format3 insns. */
#define OP(x)   ((unsigned) ((x) & 0x3) << 30) /* Op field of all insns. */
#define OPF(x)   (((x) & 0x1ff) << 5) /* Opf field of float insns. */
#define OPF_LOW5(x)   OPF ((x) & 0x1f) /* V9. */
#define F3F(x, y, z)   (OP (x) | OP3 (y) | OPF (z)) /* Format3 float insns. */
#define F3I(x)   (((x) & 0x1) << 13) /* Immediate field of format 3 insns. */
#define F2(x, y)   (OP (x) | OP2(y)) /* Format 2 insns. */
#define F3(x, y, z)   (OP (x) | OP3(y) | F3I(z)) /* Format3 insns. */
#define F1(x)   (OP (x))
#define DISP30(x)   ((x) & 0x3fffffff)
#define ASI(x)   (((x) & 0xff) << 5) /* Asi field of format3 insns. */
#define RS2(x)   ((x) & 0x1f) /* Rs2 field. */
#define SIMM13(x)   ((x) & 0x1fff) /* Simm13 field. */
#define RD(x)   (((x) & 0x1f) << 25) /* Destination register field. */
#define RS1(x)   (((x) & 0x1f) << 14) /* Rs1 field. */
#define ASI_RS2(x)   (SIMM13 (x))
#define MEMBAR(x)   ((x) & 0x7f)
#define SLCPOP(x)   (((x) & 0x7f) << 6) /* Sparclet cpop. */
#define ANNUL   (1 << 29)
#define BPRED   (1 << 19) /* V9. */
#define IMMED   F3I (1)
#define RD_G0   RD (~0)
#define RS1_G0   RS1 (~0)
#define RS2_G0   RS2 (~0)

Typedefs

typedef struct sparc_opcode_arch sparc_opcode_arch
typedef struct sparc_opcode sparc_opcode

Enumerations

enum  sparc_opcode_arch_val {
  SPARC_OPCODE_ARCH_V6 = 0, SPARC_OPCODE_ARCH_V7, SPARC_OPCODE_ARCH_V8, SPARC_OPCODE_ARCH_SPARCLET,
  SPARC_OPCODE_ARCH_SPARCLITE, SPARC_OPCODE_ARCH_V9, SPARC_OPCODE_ARCH_V9A, SPARC_OPCODE_ARCH_V9B,
  SPARC_OPCODE_ARCH_BAD
}

Functions

enum sparc_opcode_arch_val sparc_opcode_lookup_arch (const char *)
int sparc_encode_asi (const char *)
const char * sparc_decode_asi (int)
int sparc_encode_membar (const char *)
const char * sparc_decode_membar (int)
int sparc_encode_prefetch (const char *)
const char * sparc_decode_prefetch (int)
int sparc_encode_sparclet_cpreg (const char *)
const char * sparc_decode_sparclet_cpreg (int)

Variables

const int sparc_num_opcodes

Class Documentation

struct sparc_opcode_arch

Definition at line 66 of file sparc.h.

Class Members
const char * name
short supported
struct sparc_opcode

Definition at line 94 of file sparc.h.

Class Members
short architecture
const char * args
char flags
unsigned long lose
unsigned long match
const char * name

Define Documentation

#define ANNUL   (1 << 29)

Definition at line 214 of file sparc.h.

#define ASI (   x)    (((x) & 0xff) << 5) /* Asi field of format3 insns. */

Definition at line 205 of file sparc.h.

#define ASI_RS2 (   x)    (SIMM13 (x))

Definition at line 210 of file sparc.h.

#define BPRED   (1 << 19) /* V9. */

Definition at line 215 of file sparc.h.

#define DISP30 (   x)    ((x) & 0x3fffffff)

Definition at line 204 of file sparc.h.

#define F1 (   x)    (OP (x))

Definition at line 203 of file sparc.h.

#define F2 (   x,
  y 
)    (OP (x) | OP2(y)) /* Format 2 insns. */

Definition at line 201 of file sparc.h.

#define F3 (   x,
  y,
 
)    (OP (x) | OP3(y) | F3I(z)) /* Format3 insns. */

Definition at line 202 of file sparc.h.

#define F3F (   x,
  y,
 
)    (OP (x) | OP3 (y) | OPF (z)) /* Format3 float insns. */

Definition at line 199 of file sparc.h.

#define F3I (   x)    (((x) & 0x1) << 13) /* Immediate field of format 3 insns. */

Definition at line 200 of file sparc.h.

#define F_ALIAS   2 /* Alias for a "real" instruction. */

Definition at line 106 of file sparc.h.

#define F_CONDBR   8 /* Conditional branch. */

Definition at line 108 of file sparc.h.

#define F_DELAYED   1 /* Delayed branch. */

Definition at line 105 of file sparc.h.

#define F_FBR   64 /* Floating point branch. */

Definition at line 111 of file sparc.h.

#define F_FLOAT   32 /* Floating point instruction (not a branch). */

Definition at line 110 of file sparc.h.

#define F_JSR   16 /* Subroutine call. */

Definition at line 109 of file sparc.h.

#define F_UNBR   4 /* Unconditional branch. */

Definition at line 107 of file sparc.h.

#define IMMED   F3I (1)

Definition at line 216 of file sparc.h.

#define MEMBAR (   x)    ((x) & 0x7f)

Definition at line 211 of file sparc.h.

#define OP (   x)    ((unsigned) ((x) & 0x3) << 30) /* Op field of all insns. */

Definition at line 196 of file sparc.h.

#define OP2 (   x)    (((x) & 0x7) << 22) /* Op2 field of format2 insns. */

Definition at line 194 of file sparc.h.

#define OP3 (   x)    (((x) & 0x3f) << 19) /* Op3 field of format3 insns. */

Definition at line 195 of file sparc.h.

#define OPF (   x)    (((x) & 0x1ff) << 5) /* Opf field of float insns. */

Definition at line 197 of file sparc.h.

#define OPF_LOW5 (   x)    OPF ((x) & 0x1f) /* V9. */

Definition at line 198 of file sparc.h.

#define RD (   x)    (((x) & 0x1f) << 25) /* Destination register field. */

Definition at line 208 of file sparc.h.

#define RD_G0   RD (~0)

Definition at line 217 of file sparc.h.

#define RS1 (   x)    (((x) & 0x1f) << 14) /* Rs1 field. */

Definition at line 209 of file sparc.h.

#define RS1_G0   RS1 (~0)

Definition at line 218 of file sparc.h.

#define RS2 (   x)    ((x) & 0x1f) /* Rs2 field. */

Definition at line 206 of file sparc.h.

#define RS2_G0   RS2 (~0)

Definition at line 219 of file sparc.h.

#define SIMM13 (   x)    ((x) & 0x1fff) /* Simm13 field. */

Definition at line 207 of file sparc.h.

#define SLCPOP (   x)    (((x) & 0x7f) << 6) /* Sparclet cpop. */

Definition at line 212 of file sparc.h.

#define SPARC_OPCODE_ARCH_MASK (   arch)    (1 << (arch))

Definition at line 59 of file sparc.h.

Definition at line 55 of file sparc.h.

#define SPARC_OPCODE_ARCH_V9_P (   arch)    ((arch) >= SPARC_OPCODE_ARCH_V9)

Definition at line 62 of file sparc.h.

#define SPARC_OPCODE_CONFLICT_P (   ARCH1,
  ARCH2 
)
Value:

Definition at line 86 of file sparc.h.

#define SPARC_OPCODE_SUPPORTED (   ARCH)    (sparc_opcode_archs[ARCH].supported)

Definition at line 82 of file sparc.h.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
SPARC_OPCODE_ARCH_V6 
SPARC_OPCODE_ARCH_V7 
SPARC_OPCODE_ARCH_V8 
SPARC_OPCODE_ARCH_SPARCLET 
SPARC_OPCODE_ARCH_SPARCLITE 
SPARC_OPCODE_ARCH_V9 
SPARC_OPCODE_ARCH_V9A 
SPARC_OPCODE_ARCH_V9B 
SPARC_OPCODE_ARCH_BAD 

Definition at line 40 of file sparc.h.

{
  SPARC_OPCODE_ARCH_V6 = 0,
  SPARC_OPCODE_ARCH_V7,
  SPARC_OPCODE_ARCH_V8,
  SPARC_OPCODE_ARCH_SPARCLET,
  SPARC_OPCODE_ARCH_SPARCLITE,
  /* V9 variants must appear last.  */
  SPARC_OPCODE_ARCH_V9,
  SPARC_OPCODE_ARCH_V9A, /* V9 with ultrasparc additions.  */
  SPARC_OPCODE_ARCH_V9B, /* V9 with ultrasparc and cheetah additions.  */
  SPARC_OPCODE_ARCH_BAD  /* Error return from sparc_opcode_lookup_arch.  */
};

Function Documentation

const char* sparc_decode_asi ( int  )

Definition at line 1918 of file sparc-opc.c.

{
  return lookup_value (asi_table, value);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1948 of file sparc-opc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1977 of file sparc-opc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2007 of file sparc-opc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int sparc_encode_asi ( const char *  )

Definition at line 1910 of file sparc-opc.c.

{
  return lookup_name (asi_table, name);
}

Here is the call graph for this function:

Definition at line 1940 of file sparc-opc.c.

{
  return lookup_name (membar_table, name);
}

Here is the call graph for this function:

Definition at line 1969 of file sparc-opc.c.

Here is the call graph for this function:

Definition at line 1999 of file sparc-opc.c.

Here is the call graph for this function:

Definition at line 92 of file sparc-opc.c.

{
  const struct sparc_opcode_arch *p;

  for (p = &sparc_opcode_archs[0]; p->name; ++p)
    if (strcmp (name, p->name) == 0)
      return (enum sparc_opcode_arch_val) (p - &sparc_opcode_archs[0]);

  return SPARC_OPCODE_ARCH_BAD;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 1827 of file sparc-opc.c.