scale.backend.trips2
Class Opcodes

java.lang.Object
  extended by scale.backend.trips2.Opcodes

public class Opcodes
extends java.lang.Object

This class provides Trips instruction information.

$Id: Opcodes.java,v 1.19 2005-10-11 14:38:00 burrill Exp $

Copyright 2004 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

Trips opcodes are represented by an integer.


Field Summary
static int _DUMMYSD
           
static int _ENTER
           
static int _ENTERA
           
static int _ENTERB
           
static int _LAST
           
static int _LDSPILL
           
static int _LPF
           
static int _NOP
           
static int _PHI
           
static int _SDSPILL
           
static int ADD
           
static int ADDI
           
static int AND
           
static int ANDI
           
static int APP
           
static byte B0
          This indicates a Trips Branch Instruction with no operands
static byte B1
          This indicates a Trips Branch Instruction with one operand
static int BR
           
static int BRO
           
static byte C0
          This indicates a Trips Constant Instruction with no operands
static byte C1
          This indicates a Trips Constant Instruction with one operand
static int CALL
           
static int CALLO
           
static int DIVS
           
static int DIVSI
           
static int DIVU
           
static int DIVUI
           
static byte ENT
          This indicates an enter directive
static int EXTSB
           
static int EXTSH
           
static int EXTSW
           
static int EXTUB
           
static int EXTUH
           
static int EXTUW
           
static int FADD
           
static int FDIV
           
static int FDTOI
           
static int FDTOS
           
static int FEQ
           
static int FGE
           
static int FGT
           
static int FITOD
           
static int FLE
           
static int FLT
           
static int FMUL
           
static int FNE
           
static int FSTOD
           
static int FSUB
           
static byte G0
          This indicates a Trips General Instruction with no operands
static byte G1
          This indicates a Trips General Instruction with one operand
static byte G2
          This indicates a Trips General Instruction with two operands
static int GENS
           
static int GENU
           
static byte I0
          This indicates a Trips Immediate Instruction with no operands
static byte I1
          This indicates a Trips Immediate Instruction with one operand
static byte L1
          This indicates a Trips Load Instruction
static int LB
           
static int LBS
           
static int LD
           
static int LH
           
static int LHS
           
static byte LPF
          This indicates an LPF instruction
static int LW
           
static int LWS
           
static int MFPC
           
static int MOV
           
static int MOVI
           
static int MUL
           
static int MULI
           
static int NULL
           
static int OR
           
static int ORI
           
static byte PHI
          This indicates a Phi Instruction
static byte R0
          This indicates a Trips Read Instruction with one operand
static int READ
           
static int RET
           
static byte S2
          This indicates a Trips Store Instruction
static int SB
           
static int SCALL
           
static int SD
           
static int SH
           
static int SLL
           
static int SLLI
           
static int SRA
           
static int SRAI
           
static int SRL
           
static int SRLI
           
static int SUB
           
static int SUBI
           
static int SW
           
static int TEQ
           
static int TEQI
           
static int TGE
           
static int TGEI
           
static int TGEU
           
static int TGEUI
           
static int TGT
           
static int TGTI
           
static int TGTU
           
static int TGTUI
           
static int TLE
           
static int TLEI
           
static int TLEU
           
static int TLEUI
           
static int TLT
           
static int TLTI
           
static int TLTU
           
static int TLTUI
           
static int TNE
           
static int TNEI
           
static byte UNK
          This indicates an unknown/unused instruction
static byte W1
          This indicates a Trips Write Instruction with one operand
static int WRITE
           
static int XOR
           
static int XORI
           
 
Constructor Summary
Opcodes()
           
 
Method Summary
static byte getFormat(int opcode)
          Return the instruction format.
static int getIntImmOp(int op)
          Return the immediate form of an integer instruction.
static int getIntOp(int op)
          Return the non-immediate form of an integer instruction.
static int getNumTargets(Instruction inst)
          Return the number of targets.
static int getNumTargets(int opcode)
          Return the number of targets.
static java.lang.String getOp(Branch inst)
          Return the opcode mnemonic for the instruction.
static java.lang.String getOp(Instruction inst)
          Return the opcode mnemonic for the instruction.
static java.lang.String getOp(int opcode)
          Return the opcode mnemonic for the instruction opcode.
static int getOp(java.lang.String opcode)
          Return the opcode for a mneumonic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENT

public static final byte ENT
This indicates an enter directive

See Also:
Constant Field Values

G0

public static final byte G0
This indicates a Trips General Instruction with no operands

See Also:
Constant Field Values

G1

public static final byte G1
This indicates a Trips General Instruction with one operand

See Also:
Constant Field Values

G2

public static final byte G2
This indicates a Trips General Instruction with two operands

See Also:
Constant Field Values

I0

public static final byte I0
This indicates a Trips Immediate Instruction with no operands

See Also:
Constant Field Values

I1

public static final byte I1
This indicates a Trips Immediate Instruction with one operand

See Also:
Constant Field Values

L1

public static final byte L1
This indicates a Trips Load Instruction

See Also:
Constant Field Values

S2

public static final byte S2
This indicates a Trips Store Instruction

See Also:
Constant Field Values

B0

public static final byte B0
This indicates a Trips Branch Instruction with no operands

See Also:
Constant Field Values

B1

public static final byte B1
This indicates a Trips Branch Instruction with one operand

See Also:
Constant Field Values

C0

public static final byte C0
This indicates a Trips Constant Instruction with no operands

See Also:
Constant Field Values

C1

public static final byte C1
This indicates a Trips Constant Instruction with one operand

See Also:
Constant Field Values

R0

public static final byte R0
This indicates a Trips Read Instruction with one operand

See Also:
Constant Field Values

W1

public static final byte W1
This indicates a Trips Write Instruction with one operand

See Also:
Constant Field Values

PHI

public static final byte PHI
This indicates a Phi Instruction

See Also:
Constant Field Values

LPF

public static final byte LPF
This indicates an LPF instruction

See Also:
Constant Field Values

UNK

public static final byte UNK
This indicates an unknown/unused instruction

See Also:
Constant Field Values

ADD

public static final int ADD
See Also:
Constant Field Values

SUB

public static final int SUB
See Also:
Constant Field Values

MUL

public static final int MUL
See Also:
Constant Field Values

DIVS

public static final int DIVS
See Also:
Constant Field Values

DIVU

public static final int DIVU
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

XOR

public static final int XOR
See Also:
Constant Field Values

SLL

public static final int SLL
See Also:
Constant Field Values

SRL

public static final int SRL
See Also:
Constant Field Values

SRA

public static final int SRA
See Also:
Constant Field Values

TEQ

public static final int TEQ
See Also:
Constant Field Values

TNE

public static final int TNE
See Also:
Constant Field Values

TLE

public static final int TLE
See Also:
Constant Field Values

TLEU

public static final int TLEU
See Also:
Constant Field Values

TLT

public static final int TLT
See Also:
Constant Field Values

TLTU

public static final int TLTU
See Also:
Constant Field Values

TGE

public static final int TGE
See Also:
Constant Field Values

TGEU

public static final int TGEU
See Also:
Constant Field Values

TGT

public static final int TGT
See Also:
Constant Field Values

TGTU

public static final int TGTU
See Also:
Constant Field Values

ADDI

public static final int ADDI
See Also:
Constant Field Values

SUBI

public static final int SUBI
See Also:
Constant Field Values

MULI

public static final int MULI
See Also:
Constant Field Values

DIVSI

public static final int DIVSI
See Also:
Constant Field Values

DIVUI

public static final int DIVUI
See Also:
Constant Field Values

ANDI

public static final int ANDI
See Also:
Constant Field Values

ORI

public static final int ORI
See Also:
Constant Field Values

XORI

public static final int XORI
See Also:
Constant Field Values

SLLI

public static final int SLLI
See Also:
Constant Field Values

SRLI

public static final int SRLI
See Also:
Constant Field Values

SRAI

public static final int SRAI
See Also:
Constant Field Values

TEQI

public static final int TEQI
See Also:
Constant Field Values

TNEI

public static final int TNEI
See Also:
Constant Field Values

TLEI

public static final int TLEI
See Also:
Constant Field Values

TLEUI

public static final int TLEUI
See Also:
Constant Field Values

TLTI

public static final int TLTI
See Also:
Constant Field Values

TLTUI

public static final int TLTUI
See Also:
Constant Field Values

TGEI

public static final int TGEI
See Also:
Constant Field Values

TGEUI

public static final int TGEUI
See Also:
Constant Field Values

TGTI

public static final int TGTI
See Also:
Constant Field Values

TGTUI

public static final int TGTUI
See Also:
Constant Field Values

FADD

public static final int FADD
See Also:
Constant Field Values

FSUB

public static final int FSUB
See Also:
Constant Field Values

FMUL

public static final int FMUL
See Also:
Constant Field Values

FDIV

public static final int FDIV
See Also:
Constant Field Values

FEQ

public static final int FEQ
See Also:
Constant Field Values

FNE

public static final int FNE
See Also:
Constant Field Values

FLE

public static final int FLE
See Also:
Constant Field Values

FLT

public static final int FLT
See Also:
Constant Field Values

FGE

public static final int FGE
See Also:
Constant Field Values

FGT

public static final int FGT
See Also:
Constant Field Values

FITOD

public static final int FITOD
See Also:
Constant Field Values

FDTOI

public static final int FDTOI
See Also:
Constant Field Values

FSTOD

public static final int FSTOD
See Also:
Constant Field Values

FDTOS

public static final int FDTOS
See Also:
Constant Field Values

GENS

public static final int GENS
See Also:
Constant Field Values

GENU

public static final int GENU
See Also:
Constant Field Values

APP

public static final int APP
See Also:
Constant Field Values

LB

public static final int LB
See Also:
Constant Field Values

LH

public static final int LH
See Also:
Constant Field Values

LW

public static final int LW
See Also:
Constant Field Values

LD

public static final int LD
See Also:
Constant Field Values

LBS

public static final int LBS
See Also:
Constant Field Values

LHS

public static final int LHS
See Also:
Constant Field Values

LWS

public static final int LWS
See Also:
Constant Field Values

SB

public static final int SB
See Also:
Constant Field Values

SH

public static final int SH
See Also:
Constant Field Values

SW

public static final int SW
See Also:
Constant Field Values

SD

public static final int SD
See Also:
Constant Field Values

EXTSB

public static final int EXTSB
See Also:
Constant Field Values

EXTSH

public static final int EXTSH
See Also:
Constant Field Values

EXTSW

public static final int EXTSW
See Also:
Constant Field Values

EXTUB

public static final int EXTUB
See Also:
Constant Field Values

EXTUH

public static final int EXTUH
See Also:
Constant Field Values

EXTUW

public static final int EXTUW
See Also:
Constant Field Values

BR

public static final int BR
See Also:
Constant Field Values

CALL

public static final int CALL
See Also:
Constant Field Values

RET

public static final int RET
See Also:
Constant Field Values

BRO

public static final int BRO
See Also:
Constant Field Values

CALLO

public static final int CALLO
See Also:
Constant Field Values

SCALL

public static final int SCALL
See Also:
Constant Field Values

MOV

public static final int MOV
See Also:
Constant Field Values

MOVI

public static final int MOVI
See Also:
Constant Field Values

MFPC

public static final int MFPC
See Also:
Constant Field Values

WRITE

public static final int WRITE
See Also:
Constant Field Values

READ

public static final int READ
See Also:
Constant Field Values

NULL

public static final int NULL
See Also:
Constant Field Values

_NOP

public static final int _NOP
See Also:
Constant Field Values

_ENTER

public static final int _ENTER
See Also:
Constant Field Values

_ENTERA

public static final int _ENTERA
See Also:
Constant Field Values

_ENTERB

public static final int _ENTERB
See Also:
Constant Field Values

_PHI

public static final int _PHI
See Also:
Constant Field Values

_SDSPILL

public static final int _SDSPILL
See Also:
Constant Field Values

_LDSPILL

public static final int _LDSPILL
See Also:
Constant Field Values

_DUMMYSD

public static final int _DUMMYSD
See Also:
Constant Field Values

_LPF

public static final int _LPF
See Also:
Constant Field Values

_LAST

public static final int _LAST
See Also:
Constant Field Values
Constructor Detail

Opcodes

public Opcodes()
Method Detail

getNumTargets

public static int getNumTargets(Instruction inst)
Return the number of targets.


getNumTargets

public static int getNumTargets(int opcode)
Return the number of targets.


getIntOp

public static int getIntOp(int op)
Return the non-immediate form of an integer instruction.


getIntImmOp

public static int getIntImmOp(int op)
Return the immediate form of an integer instruction.


getOp

public static java.lang.String getOp(Instruction inst)
Return the opcode mnemonic for the instruction.


getOp

public static java.lang.String getOp(Branch inst)
Return the opcode mnemonic for the instruction.


getOp

public static java.lang.String getOp(int opcode)
Return the opcode mnemonic for the instruction opcode.


getOp

public static int getOp(java.lang.String opcode)
Return the opcode for a mneumonic


getFormat

public static byte getFormat(int opcode)
Return the instruction format.