This commit is contained in:
nora 2023-05-23 09:11:23 +02:00
parent 8bf9849641
commit d3846e3357
5 changed files with 265 additions and 133 deletions

View file

@ -43,6 +43,12 @@ use crate::ty::Ty;
pub struct DefId(u32);
#[derive(Debug, Clone)]
pub struct TyLayout {
pub ty: Ty,
pub layout: Layout,
}
#[derive(Debug, Clone, Copy)]
pub struct Layout {
pub size: u64,
pub align: u64,
@ -69,6 +75,7 @@ pub struct BasicBlock {
#[derive(Debug, Clone)]
pub struct RegisterData {
pub tyl: TyLayout,
pub name: Option<Symbol>,
}
@ -111,6 +118,11 @@ pub enum StatementKind {
reg: Register,
amount: Operand,
},
Call {
result: Register,
func: Operand,
args: Vec<Operand>,
},
}
#[derive(Debug, Clone, Copy)]