Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
spu.h File Reference
#include "spu-insns.h"

Go to the source code of this file.

Data Structures

struct  spu_opcode
 

Macros

#define APUOP(TAG, MACFORMAT, OPCODE, MNEMONIC, ASMFORMAT, DEP, PIPE)   TAG,
 
#define APUOPFB(TAG, MACFORMAT, OPCODE, FB, MNEMONIC, ASMFORMAT, DEP, PIPE)   TAG,
 
#define SIGNED_EXTRACT(insn, size, pos)   (((int)((insn) << (32-size-pos))) >> (32-size))
 
#define UNSIGNED_EXTRACT(insn, size, pos)   (((insn) >> pos) & ((1 << size)-1))
 
#define DECODE_INSN_RT(insn)   (insn & 0x7f)
 
#define DECODE_INSN_RA(insn)   ((insn >> 7) & 0x7f)
 
#define DECODE_INSN_RB(insn)   ((insn >> 14) & 0x7f)
 
#define DECODE_INSN_RC(insn)   ((insn >> 21) & 0x7f)
 
#define DECODE_INSN_I10(insn)   SIGNED_EXTRACT(insn,10,14)
 
#define DECODE_INSN_U10(insn)   UNSIGNED_EXTRACT(insn,10,14)
 
#define DECODE_INSN_I16(insn)   SIGNED_EXTRACT(insn,16,7)
 
#define DECODE_INSN_U16(insn)   UNSIGNED_EXTRACT(insn,16,7)
 
#define DECODE_INSN_U14(insn)   UNSIGNED_EXTRACT(insn,14,0)
 
#define DECODE_INSN_I18(insn)   SIGNED_EXTRACT(insn,18,7)
 
#define DECODE_INSN_U18(insn)   UNSIGNED_EXTRACT(insn,18,7)
 
#define DECODE_INSN_I7(insn)   SIGNED_EXTRACT(insn,7,14)
 
#define DECODE_INSN_U7(insn)   UNSIGNED_EXTRACT(insn,7,14)
 
#define DECODE_INSN_I8(insn)   SIGNED_EXTRACT(insn,8,14)
 
#define DECODE_INSN_U8(insn)   UNSIGNED_EXTRACT(insn,8,14)
 
#define DECODE_INSN_I9a(insn)   ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
 
#define DECODE_INSN_I9b(insn)   ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
 
#define DECODE_INSN_U9a(insn)   ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
 
#define DECODE_INSN_U9b(insn)   ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
 

Enumerations

enum  spu_iformat {
  RRR, RI18, RI16, RI10,
  RI8, RI7, RR, LBT,
  LBTI, IDATA, UNKNOWN_IFORMAT
}
 
enum  spu_aformat {
  A_T, A_A, A_B, A_C,
  A_S, A_H, A_P, A_S3,
  A_S6, A_S7N, A_S7, A_U7A,
  A_U7B, A_S10B, A_S10, A_S11,
  A_S11I, A_S14, A_S16, A_S18,
  A_R18, A_U3, A_U5, A_U6,
  A_U7, A_U14, A_X16, A_U18,
  A_MAX
}
 
enum  spu_insns { APUOP, APUOP }
 

Macro Definition Documentation

#define APUOP (   TAG,
  MACFORMAT,
  OPCODE,
  MNEMONIC,
  ASMFORMAT,
  DEP,
  PIPE 
)    TAG,

Definition at line 73 of file spu.h.

#define APUOPFB (   TAG,
  MACFORMAT,
  OPCODE,
  FB,
  MNEMONIC,
  ASMFORMAT,
  DEP,
  PIPE 
)    TAG,

Definition at line 75 of file spu.h.

#define DECODE_INSN_I10 (   insn)    SIGNED_EXTRACT(insn,10,14)

Definition at line 99 of file spu.h.

#define DECODE_INSN_I16 (   insn)    SIGNED_EXTRACT(insn,16,7)

Definition at line 103 of file spu.h.

#define DECODE_INSN_I18 (   insn)    SIGNED_EXTRACT(insn,18,7)

Definition at line 110 of file spu.h.

#define DECODE_INSN_I7 (   insn)    SIGNED_EXTRACT(insn,7,14)

Definition at line 114 of file spu.h.

#define DECODE_INSN_I8 (   insn)    SIGNED_EXTRACT(insn,8,14)

Definition at line 118 of file spu.h.

#define DECODE_INSN_I9a (   insn)    ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))

Definition at line 122 of file spu.h.

#define DECODE_INSN_I9b (   insn)    ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))

Definition at line 123 of file spu.h.

#define DECODE_INSN_RA (   insn)    ((insn >> 7) & 0x7f)

Definition at line 95 of file spu.h.

#define DECODE_INSN_RB (   insn)    ((insn >> 14) & 0x7f)

Definition at line 96 of file spu.h.

#define DECODE_INSN_RC (   insn)    ((insn >> 21) & 0x7f)

Definition at line 97 of file spu.h.

#define DECODE_INSN_RT (   insn)    (insn & 0x7f)

Definition at line 94 of file spu.h.

#define DECODE_INSN_U10 (   insn)    UNSIGNED_EXTRACT(insn,10,14)

Definition at line 100 of file spu.h.

#define DECODE_INSN_U14 (   insn)    UNSIGNED_EXTRACT(insn,14,0)

Definition at line 107 of file spu.h.

#define DECODE_INSN_U16 (   insn)    UNSIGNED_EXTRACT(insn,16,7)

Definition at line 104 of file spu.h.

#define DECODE_INSN_U18 (   insn)    UNSIGNED_EXTRACT(insn,18,7)

Definition at line 111 of file spu.h.

#define DECODE_INSN_U7 (   insn)    UNSIGNED_EXTRACT(insn,7,14)

Definition at line 115 of file spu.h.

#define DECODE_INSN_U8 (   insn)    UNSIGNED_EXTRACT(insn,8,14)

Definition at line 119 of file spu.h.

#define DECODE_INSN_U9a (   insn)    ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))

Definition at line 124 of file spu.h.

#define DECODE_INSN_U9b (   insn)    ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))

Definition at line 125 of file spu.h.

#define SIGNED_EXTRACT (   insn,
  size,
  pos 
)    (((int)((insn) << (32-size-pos))) >> (32-size))

Definition at line 91 of file spu.h.

#define UNSIGNED_EXTRACT (   insn,
  size,
  pos 
)    (((insn) >> pos) & ((1 << size)-1))

Definition at line 92 of file spu.h.

Enumeration Type Documentation

Enumerator:
A_T 
A_A 
A_B 
A_C 
A_S 
A_H 
A_P 
A_S3 
A_S6 
A_S7N 
A_S7 
A_U7A 
A_U7B 
A_S10B 
A_S10 
A_S11 
A_S11I 
A_S14 
A_S16 
A_S18 
A_R18 
A_U3 
A_U5 
A_U6 
A_U7 
A_U14 
A_X16 
A_U18 
A_MAX 

Definition at line 40 of file spu.h.

Enumerator:
RRR 
RI18 
RI16 
RI10 
RI8 
RI7 
RR 
LBT 
LBTI 
IDATA 
UNKNOWN_IFORMAT 

Definition at line 24 of file spu.h.

enum spu_insns
Enumerator:
APUOP 
APUOP 

Definition at line 72 of file spu.h.