class RISCEncoder extends AnyRef
Translate RISC programs into RISC assembly code. Completes the code generation (e.g., by allocating registers). The resulting code is made available as a list of RISC machine instructions.
- Source
- RISCEncoder.scala
- Alphabetic
- By Inheritance
- RISCEncoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RISCEncoder()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
code: Builder[Assembler, Seq[Assembler]]
The code sequence that is being assembled.
-
def
emit(instr: Assembler): Unit
Emit a RISC instruction.
-
def
emitcomment(text: String): Unit
Emit a comment.
-
def
encode(p: RISCProg): Unit
Encode the given RISC program by emitting the prologue, then the encoding of each of the program's instructions, then the epilogue.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
val
firsttemp: Int
First and last temporary registers
-
def
gentarget(): Label
Generate a brand new target label.
Generate a brand new target label. Shares counter with the transformation phase so that labels are unique.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getassem: AssemCode
Return the raw assembler code
-
def
getcode: Code
Compute the final code sequence.
Compute the final code sequence. Compared to the one in the code buffer, symbolic labels are resolved into numeric displacements and all pseudo-instructions (comments and labels) are stripped before the code is returned.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lasttemp: Int
-
val
memreg: Int
Local register to use for base address of memory block.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
reg: (RISCTree) ⇒ RegNo
Register allocation - we use an attribute grammar to implement a stack style allocation of registers.
Register allocation - we use an attribute grammar to implement a stack style allocation of registers. Unless a specific node type is handled by a special case, this attribution assumes that the children of each node will be evaluated in left to right order.
-
def
resetcode(): Unit
Reset the code cache
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )