ProjetCompil.Global.Src3
Class Operande

java.lang.Object
  extended by ProjetCompil.Global.Src3.Operande

public abstract class Operande
extends java.lang.Object

Classe des opérandes des instructions de la machine abstraite.


Field Summary
static Operande GB
          Operande correspondant au registre Registre.GB.
static Operande LB
          Operande correspondant au registre Registre.LB.
static Operande R0
          Operande correspondant au registre Registre.R0.
static Operande R1
          Operande correspondant au registre Registre.R1.
static Operande R10
          Operande correspondant au registre Registre.R10.
static Operande R11
          Operande correspondant au registre Registre.R11.
static Operande R12
          Operande correspondant au registre Registre.R12.
static Operande R13
          Operande correspondant au registre Registre.R13.
static Operande R14
          Operande correspondant au registre Registre.R14.
static Operande R15
          Operande correspondant au registre Registre.R15.
static Operande R2
          Operande correspondant au registre Registre.R2.
static Operande R3
          Operande correspondant au registre Registre.R3.
static Operande R4
          Operande correspondant au registre Registre.R4.
static Operande R5
          Operande correspondant au registre Registre.R5.
static Operande R6
          Operande correspondant au registre Registre.R6.
static Operande R7
          Operande correspondant au registre Registre.R7.
static Operande R8
          Operande correspondant au registre Registre.R8.
static Operande R9
          Operande correspondant au registre Registre.R9.
 
Method Summary
static Operande creationOpChaine(java.lang.String valChaine)
          Constructeur d'opérande chaîne (de nature OpChaine).
static Operande creationOpEntier(int valEntier)
          Constructeur d'opérande entier (de nature OpEntier).
static Operande creationOpEtiq(Etiq etiquette)
          Constructeur d'opérande étiquette (de nature OpEtiq).
static Operande creationOpIndexe(int deplacement, Registre regBase, Registre regIndex)
          Constructeur d'opérande indexé (de nature OpIndexe).
static Operande creationOpIndirect(int deplacement, Registre reg)
          Constructeur d'opérande indirect (de nature OpIndirect).
static Operande creationOpReel(float valReel)
          Constructeur d'opérande réel (de nature OpReel).
 java.lang.String getChaine()
          La chaîne qui correspond à cet opérande.
 int getDeplacement()
          Le déplacement qui correspond à cet opérande.
 int getEntier()
          L'entier qui correspond à cet opérande.
 Etiq getEtiq()
          L'étiquette qui correspond à cet opérande.
 NatureOperande getNature()
          La nature de cet opérande.
 float getReel()
          Le réel qui correspond à cet opérande.
 Registre getRegistre()
          Le registre qui correspond à cet opérande.
 Registre getRegistreBase()
          Le registre de base qui correspond à cet opérande.
 Registre getRegistreIndex()
          Le registre d'index qui correspond à cet opérande.
static Operande opDirect(Registre reg)
          L'opérande qui correspond au registre reg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

R0

public static final Operande R0
Operande correspondant au registre Registre.R0.


R1

public static final Operande R1
Operande correspondant au registre Registre.R1.


R2

public static final Operande R2
Operande correspondant au registre Registre.R2.


R3

public static final Operande R3
Operande correspondant au registre Registre.R3.


R4

public static final Operande R4
Operande correspondant au registre Registre.R4.


R5

public static final Operande R5
Operande correspondant au registre Registre.R5.


R6

public static final Operande R6
Operande correspondant au registre Registre.R6.


R7

public static final Operande R7
Operande correspondant au registre Registre.R7.


R8

public static final Operande R8
Operande correspondant au registre Registre.R8.


R9

public static final Operande R9
Operande correspondant au registre Registre.R9.


R10

public static final Operande R10
Operande correspondant au registre Registre.R10.


R11

public static final Operande R11
Operande correspondant au registre Registre.R11.


R12

public static final Operande R12
Operande correspondant au registre Registre.R12.


R13

public static final Operande R13
Operande correspondant au registre Registre.R13.


R14

public static final Operande R14
Operande correspondant au registre Registre.R14.


R15

public static final Operande R15
Operande correspondant au registre Registre.R15.


GB

public static final Operande GB
Operande correspondant au registre Registre.GB.


LB

public static final Operande LB
Operande correspondant au registre Registre.LB.

Method Detail

opDirect

public static Operande opDirect(Registre reg)
L'opérande qui correspond au registre reg. Cet opérande est crée une seule fois.


creationOpIndirect

public static Operande creationOpIndirect(int deplacement,
                                          Registre reg)
Constructeur d'opérande indirect (de nature OpIndirect). Permet l'adressage indirect avec déplacement.


creationOpIndexe

public static Operande creationOpIndexe(int deplacement,
                                        Registre regBase,
                                        Registre regIndex)
Constructeur d'opérande indexé (de nature OpIndexe). Permet l'adressage indirect indexé avec déplacement.


creationOpEntier

public static Operande creationOpEntier(int valEntier)
Constructeur d'opérande entier (de nature OpEntier). Permet l'adressage immédiat entier.


creationOpReel

public static Operande creationOpReel(float valReel)
Constructeur d'opérande réel (de nature OpReel). Permet l'adressage immédiat réel.


creationOpChaine

public static Operande creationOpChaine(java.lang.String valChaine)
Constructeur d'opérande chaîne (de nature OpChaine).


creationOpEtiq

public static Operande creationOpEtiq(Etiq etiquette)
Constructeur d'opérande étiquette (de nature OpEtiq).


getNature

public NatureOperande getNature()
La nature de cet opérande.


getRegistre

public Registre getRegistre()
Le registre qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpDirect


getDeplacement

public int getDeplacement()
Le déplacement qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpIndirect ou this.getNature() == NatureOperande.OpIndexe


getRegistreBase

public Registre getRegistreBase()
Le registre de base qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpIndirect ou this.getNature() == NatureOperande.OpIndexe


getRegistreIndex

public Registre getRegistreIndex()
Le registre d'index qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpIndexe


getEntier

public int getEntier()
L'entier qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpEntier


getReel

public float getReel()
Le réel qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpReel


getChaine

public java.lang.String getChaine()
La chaîne qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpChaine


getEtiq

public Etiq getEtiq()
L'étiquette qui correspond à cet opérande. Précondition : this.getNature() == NatureOperande.OpEtiq