Back to index

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

Go to the source code of this file.

Classes

struct  arg

Defines

#define MASK_V6   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V6)
#define MASK_V7   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V7)
#define MASK_V8   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8)
#define MASK_SPARCLET   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET)
#define MASK_SPARCLITE   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLITE)
#define MASK_V9   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9)
#define MASK_V9A   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A)
#define MASK_V9B   SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9B)
#define v6
#define v6notlet
#define v7
#define v8
#define sparclet   (MASK_SPARCLET)
#define sparclite   (MASK_SPARCLITE)
#define v9   (MASK_V9 | MASK_V9A | MASK_V9B)
#define v9a   (MASK_V9A | MASK_V9B)
#define v9b   (MASK_V9B)
#define v6notv9
#define v9notv9a   (MASK_V9)
#define COND(x)   (((x) & 0xf) << 25)
#define MCOND(x, i_or_f)   ((((i_or_f) & 1) << 18) | (((x) >> 11) & (0xf << 14))) /* v9 */
#define RCOND(x)   (((x) & 0x7) << 10) /* v9 */
#define CONDA   (COND (0x8))
#define CONDCC   (COND (0xd))
#define CONDCS   (COND (0x5))
#define CONDE   (COND (0x1))
#define CONDG   (COND (0xa))
#define CONDGE   (COND (0xb))
#define CONDGU   (COND (0xc))
#define CONDL   (COND (0x3))
#define CONDLE   (COND (0x2))
#define CONDLEU   (COND (0x4))
#define CONDN   (COND (0x0))
#define CONDNE   (COND (0x9))
#define CONDNEG   (COND (0x6))
#define CONDPOS   (COND (0xe))
#define CONDVC   (COND (0xf))
#define CONDVS   (COND (0x7))
#define CONDNZ   CONDNE
#define CONDZ   CONDE
#define CONDGEU   CONDCC
#define CONDLU   CONDCS
#define FCONDA   (COND (0x8))
#define FCONDE   (COND (0x9))
#define FCONDG   (COND (0x6))
#define FCONDGE   (COND (0xb))
#define FCONDL   (COND (0x4))
#define FCONDLE   (COND (0xd))
#define FCONDLG   (COND (0x2))
#define FCONDN   (COND (0x0))
#define FCONDNE   (COND (0x1))
#define FCONDO   (COND (0xf))
#define FCONDU   (COND (0x7))
#define FCONDUE   (COND (0xa))
#define FCONDUG   (COND (0x5))
#define FCONDUGE   (COND (0xc))
#define FCONDUL   (COND (0x3))
#define FCONDULE   (COND (0xe))
#define FCONDNZ   FCONDNE
#define FCONDZ   FCONDE
#define ICC   (0) /* v9 */
#define XCC   (1 << 12) /* v9 */
#define FCC(x)   (((x) & 0x3) << 11) /* v9 */
#define FBFCC(x)   (((x) & 0x3) << 20) /* v9 */
#define COMMUTEOP(opcode, op3, arch_mask)
#define br(opcode, mask, lose, flags)
#define brx(opcode, mask, lose, flags)
#define tr(opcode, mask, lose, flags)
#define cond(bop, top, mask, flags)
#define brr(opcode, mask, lose, flags)
#define condr(bop, mask, flags)
#define movr(opcode, mask, flags)
#define fmrrs(opcode, mask, lose, flags)
#define fmrrd(opcode, mask, lose, flags)
#define fmrrq(opcode, mask, lose, flags)
#define fmovrs(mop, mask, flags)
#define fmovrd(mop, mask, flags)
#define fmovrq(mop, mask, flags)
#define movicc(opcode, cond, flags)
#define movfcc(opcode, fcond, flags)
#define movcc(opcode, cond, fcond, flags)
#define FM_SF   1 /* v9 - values for fpsize */
#define FM_DF   2 /* v9 */
#define FM_QF   3 /* v9 */
#define fmoviccx(opcode, fpsize, args, cond, flags)
#define fmovfccx(opcode, fpsize, args, fcond, flags)
#define fmovccx(opcode, fpsize, args, cond, fcond, flags)
#define fmovicc(suffix, cond, flags)
#define fmovfcc(suffix, fcond, flags)
#define fmovcc(suffix, cond, fcond, flags)
#define CBR(opcode, mask, lose, flags, arch)
#define FBR(opcode, mask, lose, flags)
#define FBRX(opcode, mask, lose, flags)
#define CONDFC(fop, cop, mask, flags)
#define CONDFCL(fop, cop, mask, flags)
#define CONDF(fop, mask, flags)
#define CMPFCC(x)   (((x)&0x3)<<25)
#define EFPOP1_2(name, op, args)   { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op)|RS1_G0, args, 0, sparclite }
#define EFPOP1_3(name, op, args)   { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op), args, 0, sparclite }
#define EFPOP2_2(name, op, args)   { name, F3F(2, 0x37, op), F3F(~2, ~0x37, ~op)|RD_G0, args, 0, sparclite }
#define BIT5   (1<<5)
#define SLCBCC2(opcode, mask, lose)
#define SLCBCC(opcode, mask)   SLCBCC2(opcode, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)))
#define IMPDEP(name, code)

Functions

enum sparc_opcode_arch_val sparc_opcode_lookup_arch (const char *name)
static int lookup_name (const arg *table, const char *name)
static const char * lookup_value (const arg *table, int value)
int sparc_encode_asi (const char *name)
const char * sparc_decode_asi (int value)
int sparc_encode_membar (const char *name)
const char * sparc_decode_membar (int value)
int sparc_encode_prefetch (const char *name)
const char * sparc_decode_prefetch (int value)
int sparc_encode_sparclet_cpreg (const char *name)
const char * sparc_decode_sparclet_cpreg (int value)

Variables

const int sparc_num_opcodes = ((sizeof sparc_opcodes)/(sizeof sparc_opcodes[0]))
static arg asi_table []
static arg membar_table []
static arg prefetch_table []
static arg sparclet_cpreg_table []

Class Documentation

struct arg

Definition at line 247 of file h8300.h.

Collaboration diagram for arg:
Class Members
int len
const char * name
op_type nib
const char * start
int value

Define Documentation

#define BIT5   (1<<5)
#define br (   opcode,
  mask,
  lose,
  flags 
)
Value:
{ opcode, (mask)|ANNUL, (lose),       ",a l",   (flags), v6 }, \
 { opcode, (mask)      , (lose)|ANNUL, "l",     (flags), v6 }
#define brr (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, (mask)|BPRED, ANNUL|(lose), "1,k",      F_DELAYED|(flags), v9 }, \
 { opcode, (mask)|BPRED, ANNUL|(lose), ",T 1,k",   F_DELAYED|(flags), v9 }, \
 { opcode, (mask)|BPRED|ANNUL, (lose), ",a 1,k",   F_DELAYED|(flags), v9 }, \
 { opcode, (mask)|BPRED|ANNUL, (lose), ",a,T 1,k", F_DELAYED|(flags), v9 }, \
 { opcode, (mask), ANNUL|BPRED|(lose), ",N 1,k",   F_DELAYED|(flags), v9 }, \
 { opcode, (mask)|ANNUL, BPRED|(lose), ",a,N 1,k", F_DELAYED|(flags), v9 }
#define brx (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, (mask)|(2<<20)|BPRED, ANNUL|(lose), "Z,G",      (flags), v9 }, \
 { opcode, (mask)|(2<<20)|BPRED, ANNUL|(lose), ",T Z,G",   (flags), v9 }, \
 { opcode, (mask)|(2<<20)|BPRED|ANNUL, (lose), ",a Z,G",   (flags), v9 }, \
 { opcode, (mask)|(2<<20)|BPRED|ANNUL, (lose), ",a,T Z,G", (flags), v9 }, \
 { opcode, (mask)|(2<<20), ANNUL|BPRED|(lose), ",N Z,G",   (flags), v9 }, \
 { opcode, (mask)|(2<<20)|ANNUL, BPRED|(lose), ",a,N Z,G", (flags), v9 }, \
 { opcode, (mask)|BPRED, ANNUL|(lose)|(2<<20), "z,G",      (flags), v9 }, \
 { opcode, (mask)|BPRED, ANNUL|(lose)|(2<<20), ",T z,G",   (flags), v9 }, \
 { opcode, (mask)|BPRED|ANNUL, (lose)|(2<<20), ",a z,G",   (flags), v9 }, \
 { opcode, (mask)|BPRED|ANNUL, (lose)|(2<<20), ",a,T z,G", (flags), v9 }, \
 { opcode, (mask), ANNUL|BPRED|(lose)|(2<<20), ",N z,G",   (flags), v9 }, \
 { opcode, (mask)|ANNUL, BPRED|(lose)|(2<<20), ",a,N z,G", (flags), v9 }
#define CBR (   opcode,
  mask,
  lose,
  flags,
  arch 
)
Value:
{ opcode, (mask), ANNUL | (lose), "l",    flags | F_DELAYED, arch }, \
 { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED, arch }
#define CMPFCC (   x)    (((x)&0x3)<<25)
#define COMMUTEOP (   opcode,
  op3,
  arch_mask 
)
Value:
{ opcode,     F3(2, op3, 0), F3(~2, ~op3, ~0)|ASI(~0),  "1,2,d", 0, arch_mask }, \
{ opcode,     F3(2, op3, 1), F3(~2, ~op3, ~1),          "1,i,d", 0, arch_mask }, \
{ opcode,     F3(2, op3, 1), F3(~2, ~op3, ~1),          "i,1,d", 0, arch_mask }

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

#define COND (   x)    (((x) & 0xf) << 25)

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

#define cond (   bop,
  top,
  mask,
  flags 
)
Value:
brx(bop, F2(0, 1)|(mask), F2(~0, ~1)|((~mask)&COND(~0)), F_DELAYED|(flags)), /* v9 */ \
  br(bop,  F2(0, 2)|(mask), F2(~0, ~2)|((~mask)&COND(~0)), F_DELAYED|(flags)), \
  tr(top,  F3(2, 0x3a, 0)|(mask), F3(~2, ~0x3a, 0)|((~mask)&COND(~0)), ((flags) & ~(F_UNBR|F_CONDBR)))
#define CONDA   (COND (0x8))

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

#define CONDCC   (COND (0xd))

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

#define CONDCS   (COND (0x5))

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

#define CONDE   (COND (0x1))

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

#define CONDF (   fop,
  mask,
  flags 
)
Value:
FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
  FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags)
#define CONDFC (   fop,
  cop,
  mask,
  flags 
)
Value:
FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
  FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags), \
  CBR(cop, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)), flags, v6notlet)
#define CONDFCL (   fop,
  cop,
  mask,
  flags 
)
Value:
FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
  FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags), \
  CBR(cop, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)), flags, v6)
#define CONDG   (COND (0xa))

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

#define CONDGE   (COND (0xb))

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

#define CONDGEU   CONDCC

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

#define CONDGU   (COND (0xc))

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

#define CONDL   (COND (0x3))

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

#define CONDLE   (COND (0x2))

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

#define CONDLEU   (COND (0x4))

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

#define CONDLU   CONDCS

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

#define CONDN   (COND (0x0))

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

#define CONDNE   (COND (0x9))

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

#define CONDNEG   (COND (0x6))

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

#define CONDNZ   CONDNE

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

#define CONDPOS   (COND (0xe))

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

#define condr (   bop,
  mask,
  flags 
)
Value:
/* v9 */ \
  brr(bop, F2(0, 3)|COND(mask), F2(~0, ~3)|COND(~(mask)), (flags)) /* v9 */
#define CONDVC   (COND (0xf))

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

#define CONDVS   (COND (0x7))

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

#define CONDZ   CONDE

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

#define EFPOP1_2 (   name,
  op,
  args 
)    { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op)|RS1_G0, args, 0, sparclite }
#define EFPOP1_3 (   name,
  op,
  args 
)    { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op), args, 0, sparclite }
#define EFPOP2_2 (   name,
  op,
  args 
)    { name, F3F(2, 0x37, op), F3F(~2, ~0x37, ~op)|RD_G0, args, 0, sparclite }
#define FBFCC (   x)    (((x) & 0x3) << 20) /* v9 */

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

#define FBR (   opcode,
  mask,
  lose,
  flags 
)
Value:
{ opcode, (mask), ANNUL | (lose), "l",    flags | F_DELAYED | F_FBR, v6 }, \
 { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED | F_FBR, v6 }
#define FBRX (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, FBFCC(0)|(mask)|BPRED, ANNUL|FBFCC(~0)|(lose), "6,G",      flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(0)|(mask)|BPRED, ANNUL|FBFCC(~0)|(lose), ",T 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(0)|(mask)|BPRED|ANNUL, FBFCC(~0)|(lose), ",a 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(0)|(mask)|BPRED|ANNUL, FBFCC(~0)|(lose), ",a,T 6,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(0)|(mask), ANNUL|BPRED|FBFCC(~0)|(lose), ",N 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(0)|(mask)|ANNUL, BPRED|FBFCC(~0)|(lose), ",a,N 6,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask)|BPRED, ANNUL|FBFCC(~1)|(lose), "7,G",      flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask)|BPRED, ANNUL|FBFCC(~1)|(lose), ",T 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask)|BPRED|ANNUL, FBFCC(~1)|(lose), ",a 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask)|BPRED|ANNUL, FBFCC(~1)|(lose), ",a,T 7,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask), ANNUL|BPRED|FBFCC(~1)|(lose), ",N 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(1)|(mask)|ANNUL, BPRED|FBFCC(~1)|(lose), ",a,N 7,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask)|BPRED, ANNUL|FBFCC(~2)|(lose), "8,G",      flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask)|BPRED, ANNUL|FBFCC(~2)|(lose), ",T 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask)|BPRED|ANNUL, FBFCC(~2)|(lose), ",a 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask)|BPRED|ANNUL, FBFCC(~2)|(lose), ",a,T 8,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask), ANNUL|BPRED|FBFCC(~2)|(lose), ",N 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(2)|(mask)|ANNUL, BPRED|FBFCC(~2)|(lose), ",a,N 8,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask)|BPRED, ANNUL|FBFCC(~3)|(lose), "9,G",      flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask)|BPRED, ANNUL|FBFCC(~3)|(lose), ",T 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask)|BPRED|ANNUL, FBFCC(~3)|(lose), ",a 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask)|BPRED|ANNUL, FBFCC(~3)|(lose), ",a,T 9,G", flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask), ANNUL|BPRED|FBFCC(~3)|(lose), ",N 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
 { opcode, FBFCC(3)|(mask)|ANNUL, BPRED|FBFCC(~3)|(lose), ",a,N 9,G", flags|F_DELAYED|F_FBR, v9 }
#define FCC (   x)    (((x) & 0x3) << 11) /* v9 */

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

#define FCONDA   (COND (0x8))

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

#define FCONDE   (COND (0x9))

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

#define FCONDG   (COND (0x6))

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

#define FCONDGE   (COND (0xb))

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

#define FCONDL   (COND (0x4))

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

#define FCONDLE   (COND (0xd))

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

#define FCONDLG   (COND (0x2))

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

#define FCONDN   (COND (0x0))

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

#define FCONDNE   (COND (0x1))

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

#define FCONDNZ   FCONDNE

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

#define FCONDO   (COND (0xf))

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

#define FCONDU   (COND (0x7))

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

#define FCONDUE   (COND (0xa))

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

#define FCONDUG   (COND (0x5))

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

#define FCONDUGE   (COND (0xc))

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

#define FCONDUL   (COND (0x3))

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

#define FCONDULE   (COND (0xe))

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

#define FCONDZ   FCONDE

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

#define FM_DF   2 /* v9 */
#define FM_QF   3 /* v9 */
#define FM_SF   1 /* v9 - values for fpsize */
#define fmovcc (   suffix,
  cond,
  fcond,
  flags 
)
Value:
/* v9 */ \
fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags),     \
fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags),     \
fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
#define fmovccx (   opcode,
  fpsize,
  args,
  cond,
  fcond,
  flags 
)
Value:
/* v9 */ \
{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags | F_FLOAT, v9 }, \
{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags | F_FLOAT, v9 }, \
{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
#define fmovfcc (   suffix,
  fcond,
  flags 
)
Value:
/* v9 */ \
fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags),          \
fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags),          \
fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
#define fmovfccx (   opcode,
  fpsize,
  args,
  fcond,
  flags 
)
Value:
/* v9 */ \
{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
#define fmovicc (   suffix,
  cond,
  flags 
)
Value:
/* v9 */ \
fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags),           \
fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags),           \
fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
#define fmoviccx (   opcode,
  fpsize,
  args,
  cond,
  flags 
)
Value:
/* v9 */ \
{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags, v9 }, \
{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags, v9 }
#define fmovrd (   mop,
  mask,
  flags 
)
Value:
/* v9 */ \
  fmrrd(mop, F3(2, 0x35, 0)|OPF_LOW5(6)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~6)|RCOND(~(mask)), (flags)) /* v9 */
#define fmovrq (   mop,
  mask,
  flags 
)
Value:
/* v9 */ \
  fmrrq(mop, F3(2, 0x35, 0)|OPF_LOW5(7)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~7)|RCOND(~(mask)), (flags)) /* v9 */
#define fmovrs (   mop,
  mask,
  flags 
)
Value:
/* v9 */ \
  fmrrs(mop, F3(2, 0x35, 0)|OPF_LOW5(5)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~5)|RCOND(~(mask)), (flags)) /* v9 */
#define fmrrd (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, (mask), (lose), "1,B,H", (flags) | F_FLOAT, v9 }
#define fmrrq (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, (mask), (lose), "1,R,J", (flags) | F_FLOAT, v9 }
#define fmrrs (   opcode,
  mask,
  lose,
  flags 
)
Value:
/* v9 */ \
 { opcode, (mask), (lose), "1,f,g", (flags) | F_FLOAT, v9 }
#define ICC   (0) /* v9 */

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

#define IMPDEP (   name,
  code 
)
Value:
{ name,       F3(2, code, 0), F3(~2, ~code, ~0)|ASI(~0), "1,2,d", 0, v9notv9a }, \
{ name,       F3(2, code, 1), F3(~2, ~code, ~1),    "1,i,d", 0, v9notv9a }, \
{ name, F3(2, code, 0), F3(~2, ~code, ~0),         "x,1,2,d", 0, v9notv9a }, \
{ name, F3(2, code, 0), F3(~2, ~code, ~0),         "x,e,f,g", 0, v9notv9a }

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

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

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

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

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

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

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

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

#define MCOND (   x,
  i_or_f 
)    ((((i_or_f) & 1) << 18) | (((x) >> 11) & (0xf << 14))) /* v9 */

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

#define movcc (   opcode,
  cond,
  fcond,
  flags 
)
Value:
/* v9 */ \
  movfcc (opcode, fcond, flags), /* v9 */ \
  movicc (opcode, cond, flags) /* v9 */
#define movfcc (   opcode,
  fcond,
  flags 
)
Value:
/* v9 */ \
  { opcode, F3(2, 0x2c, 0)|FCC(0)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~0)|F3(~2, ~0x2c, ~0), "6,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|FCC(0)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~0)|F3(~2, ~0x2c, ~1), "6,I,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 0)|FCC(1)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~1)|F3(~2, ~0x2c, ~0), "7,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|FCC(1)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~1)|F3(~2, ~0x2c, ~1), "7,I,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 0)|FCC(2)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~2)|F3(~2, ~0x2c, ~0), "8,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|FCC(2)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~2)|F3(~2, ~0x2c, ~1), "8,I,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 0)|FCC(3)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~3)|F3(~2, ~0x2c, ~0), "9,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|FCC(3)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~3)|F3(~2, ~0x2c, ~1), "9,I,d", flags, v9 }
#define movicc (   opcode,
  cond,
  flags 
)
Value:
/* v9 */ \
  { opcode, F3(2, 0x2c, 0)|MCOND(cond,1)|ICC, F3(~2, ~0x2c, ~0)|MCOND(~cond,~1)|XCC|(1<<11), "z,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|MCOND(cond,1)|ICC, F3(~2, ~0x2c, ~1)|MCOND(~cond,~1)|XCC|(1<<11), "z,I,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 0)|MCOND(cond,1)|XCC, F3(~2, ~0x2c, ~0)|MCOND(~cond,~1)|(1<<11),     "Z,2,d", flags, v9 }, \
  { opcode, F3(2, 0x2c, 1)|MCOND(cond,1)|XCC, F3(~2, ~0x2c, ~1)|MCOND(~cond,~1)|(1<<11),     "Z,I,d", flags, v9 }
#define movr (   opcode,
  mask,
  flags 
)
Value:
/* v9 */ \
 { opcode, F3(2, 0x2f, 0)|RCOND(mask), F3(~2, ~0x2f, ~0)|RCOND(~(mask)), "1,2,d", (flags), v9 }, \
 { opcode, F3(2, 0x2f, 1)|RCOND(mask), F3(~2, ~0x2f, ~1)|RCOND(~(mask)), "1,j,d", (flags), v9 }
#define RCOND (   x)    (((x) & 0x7) << 10) /* v9 */

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

#define SLCBCC (   opcode,
  mask 
)    SLCBCC2(opcode, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)))
#define SLCBCC2 (   opcode,
  mask,
  lose 
)
Value:
{ opcode, (mask), ANNUL|(lose), "l",    F_DELAYED|F_CONDBR, sparclet }, \
 { opcode, (mask)|ANNUL, (lose), ",a l", F_DELAYED|F_CONDBR, sparclet }
#define sparclet   (MASK_SPARCLET)

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

#define sparclite   (MASK_SPARCLITE)

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

#define tr (   opcode,
  mask,
  lose,
  flags 
)
Value:
{ opcode, (mask)|(2<<11)|IMMED, (lose)|RS1_G0,   "Z,i",   (flags), v9 }, /* %g0 + imm */ \
 { opcode, (mask)|(2<<11)|IMMED, (lose),  "Z,1+i", (flags), v9 }, /* rs1 + imm */ \
 { opcode, (mask)|(2<<11), IMMED|(lose),  "Z,1+2", (flags), v9 }, /* rs1 + rs2 */ \
 { opcode, (mask)|(2<<11), IMMED|(lose)|RS2_G0,  "Z,1",   (flags), v9 }, /* rs1 + %g0 */ \
 { opcode, (mask)|IMMED, (lose)|RS1_G0,   "z,i",   (flags)|F_ALIAS, v9 }, /* %g0 + imm */ \
 { opcode, (mask)|IMMED, (lose),   "z,1+i", (flags)|F_ALIAS, v9 }, /* rs1 + imm */ \
 { opcode, (mask), IMMED|(lose),   "z,1+2", (flags)|F_ALIAS, v9 }, /* rs1 + rs2 */ \
 { opcode, (mask), IMMED|(lose)|RS2_G0,   "z,1",   (flags)|F_ALIAS, v9 }, /* rs1 + %g0 */ \
 { opcode, (mask)|IMMED, (lose)|RS1_G0,          "i",     (flags), v6 }, /* %g0 + imm */ \
 { opcode, (mask)|IMMED, (lose),          "1+i",   (flags), v6 }, /* rs1 + imm */ \
 { opcode, (mask), IMMED|(lose),          "1+2",   (flags), v6 }, /* rs1 + rs2 */ \
 { opcode, (mask), IMMED|(lose)|RS2_G0,          "1",     (flags), v6 } /* rs1 + %g0 */
#define v6
Value:

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

#define v6notlet
Value:

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

#define v6notv9
Value:

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

#define v7
Value:

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

#define v8
Value:

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

#define v9   (MASK_V9 | MASK_V9A | MASK_V9B)

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

#define v9a   (MASK_V9A | MASK_V9B)

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

#define v9b   (MASK_V9B)

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

#define v9notv9a   (MASK_V9)

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

#define XCC   (1 << 12) /* v9 */

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


Function Documentation

static int lookup_name ( const arg table,
const char *  name 
) [static]

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

{
  const arg *p;

  for (p = table; p->name; ++p)
    if (strcmp (name, p->name) == 0)
      return p->value;

  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static const char* lookup_value ( const arg table,
int  value 
) [static]

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

{
  const arg *p;

  for (p = table; p->name; ++p)
    if (value == p->value)
      return p->name;

  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* sparc_decode_asi ( int  value)

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:

const char* sparc_decode_membar ( int  value)

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:

const char* sparc_decode_prefetch ( int  value)

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 *  name)

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

{
  return lookup_name (asi_table, name);
}

Here is the call graph for this function:

int sparc_encode_membar ( const char *  name)

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

{
  return lookup_name (membar_table, name);
}

Here is the call graph for this function:

int sparc_encode_prefetch ( const char *  name)

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

arg asi_table[] [static]

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

arg membar_table[] [static]
Initial value:
{
  { 0x40, "#Sync" },
  { 0x20, "#MemIssue" },
  { 0x10, "#Lookaside" },
  { 0x08, "#StoreStore" },
  { 0x04, "#LoadStore" },
  { 0x02, "#StoreLoad" },
  { 0x01, "#LoadLoad" },
  { 0, 0 }
}

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

arg prefetch_table[] [static]
Initial value:
{
  { 0, "#n_reads" },
  { 1, "#one_read" },
  { 2, "#n_writes" },
  { 3, "#one_write" },
  { 4, "#page" },
  { 16, "#invalidate" },
  { 0, 0 }
}

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

const int sparc_num_opcodes = ((sizeof sparc_opcodes)/(sizeof sparc_opcodes[0]))

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

Initial value:
{
  { 0, "%ccsr" },
  { 1, "%ccfr" },
  { 2, "%cccrcr" },
  { 3, "%ccpr" },
  { 4, "%ccsr2" },
  { 5, "%cccrr" },
  { 6, "%ccrstr" },
  { 0, 0 }
}

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