Add preamble syntax for declaring static and dynamic heaps, and update the langref section on heaps. Add IR support for heap references. Remove the heap_load and heap_store as discussed in #144. We will use heap_addr along with native load and store instructions in their place. Add the heap_addr instruction and document its bounds checking semantics.
55 lines
1.6 KiB
Rust
55 lines
1.6 KiB
Rust
//! Representation of Cretonne IL functions.
|
|
|
|
pub mod types;
|
|
pub mod entities;
|
|
pub mod condcodes;
|
|
pub mod immediates;
|
|
pub mod instructions;
|
|
pub mod stackslot;
|
|
pub mod jumptable;
|
|
pub mod dfg;
|
|
pub mod layout;
|
|
pub mod function;
|
|
mod builder;
|
|
mod extfunc;
|
|
mod funcname;
|
|
mod globalvar;
|
|
mod heap;
|
|
mod memflags;
|
|
mod progpoint;
|
|
mod valueloc;
|
|
|
|
pub use ir::builder::{InstBuilder, InstBuilderBase, InstInserterBase, InsertBuilder};
|
|
pub use ir::dfg::{DataFlowGraph, ValueDef};
|
|
pub use ir::entities::{Ebb, Inst, Value, StackSlot, GlobalVar, JumpTable, FuncRef, SigRef, Heap};
|
|
pub use ir::extfunc::{Signature, CallConv, ArgumentType, ArgumentExtension, ArgumentPurpose,
|
|
ExtFuncData};
|
|
pub use ir::funcname::FunctionName;
|
|
pub use ir::function::Function;
|
|
pub use ir::globalvar::GlobalVarData;
|
|
pub use ir::heap::{HeapData, HeapStyle, HeapBase};
|
|
pub use ir::instructions::{Opcode, InstructionData, VariableArgs, ValueList, ValueListPool};
|
|
pub use ir::jumptable::JumpTableData;
|
|
pub use ir::layout::{Layout, CursorBase, Cursor};
|
|
pub use ir::memflags::MemFlags;
|
|
pub use ir::progpoint::{ProgramPoint, ProgramOrder, ExpandedProgramPoint};
|
|
pub use ir::stackslot::{StackSlots, StackSlotKind, StackSlotData};
|
|
pub use ir::types::Type;
|
|
pub use ir::valueloc::{ValueLoc, ArgumentLoc};
|
|
|
|
use binemit;
|
|
use entity::{PrimaryMap, EntityMap};
|
|
use isa;
|
|
|
|
/// Map of value locations.
|
|
pub type ValueLocations = EntityMap<Value, ValueLoc>;
|
|
|
|
/// Map of jump tables.
|
|
pub type JumpTables = PrimaryMap<JumpTable, JumpTableData>;
|
|
|
|
/// Map of instruction encodings.
|
|
pub type InstEncodings = EntityMap<Inst, isa::Encoding>;
|
|
|
|
/// Code offsets for EBBs.
|
|
pub type EbbOffsets = EntityMap<Ebb, binemit::CodeOffset>;
|