Expand description
arch
contains the default architectures supported by codegem
. An architecture does not
need to be in this module to be supported, as the traits that must be implemented are public
and can be implemented by other crates wishing to extend codegem
’s functionality.
Modules§
- rv64
rv64
provides a backend for the RISC V 64GC architecture.- urcl
urcl
provides a backend for the URCL intermediate language, which can be then used to compile to a variety of targets.- x64
x64
provides a backend for the x86_64 architecture.
Structs§
- Function
- Labelled
Instructions - VCode
- VCode
Generator VCodeGenerator
is an internal structure used to generateVCode
for a given backend.
Enums§
- Location
Location
is a representation of a location inVCode
.- VReg
VReg
is a representation of a register inVCode
.
Traits§
- Instr
Instr
is one of the two traits necessary to implement to define your own backend (the other trait beingInstructionSelector
). This trait represents an instruction in the target architecture that can be generated bycodegem
. It also contains various functions related to the generatedVCode
such asInstr::mandatory_transforms
andInstr::emit_assembly
.- Instruction
Selector InstructionSelector
is the other trait that has to be implemented for a backend. This trait selects instructions to use based on theOperation
s andTerminator
s in the provided IR.