diff options
Diffstat (limited to 'patio-to-cranelift/src/patio/instructions.rs')
| -rw-r--r-- | patio-to-cranelift/src/patio/instructions.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/patio-to-cranelift/src/patio/instructions.rs b/patio-to-cranelift/src/patio/instructions.rs index 1cba2953..908a0779 100644 --- a/patio-to-cranelift/src/patio/instructions.rs +++ b/patio-to-cranelift/src/patio/instructions.rs @@ -8,12 +8,14 @@ pub(crate) enum PatioInstruction { BoolToInt(PatioBoolToInt), Call(PatioCall), CallPointer(PatioCallPointer), + DataPtrToInt(PatioDataPtrToInt), If(PatioIf), IntAdd(PatioIntAdd), IntEquals(PatioIntEquals), IntNotEqual(PatioIntNotEqual), IntSub(PatioIntSub), IntToBool(PatioIntToBool), + IntToDataPtr(PatioIntToDataPtr), LocalStore(PatioLocalStore), MemoryLoad(PatioMemoryLoad), MemoryStore(PatioMemoryStore), @@ -46,6 +48,11 @@ pub(crate) struct PatioCallPointer { pub(crate) args: Vec<PatioOperand>, } +pub(crate) struct PatioDataPtrToInt { + pub(crate) destination: PatioLocalRef, + pub(crate) value: PatioOperand, +} + pub(crate) struct PatioIf { pub(crate) destinations: Vec<PatioLocalRef>, pub(crate) condition: PatioOperand, @@ -82,6 +89,11 @@ pub(crate) struct PatioIntToBool { pub(crate) value: PatioOperand, } +pub(crate) struct PatioIntToDataPtr { + pub(crate) destination: PatioLocalRef, + pub(crate) value: PatioOperand, +} + pub(crate) struct PatioLocalStore { pub(crate) destination: PatioLocalRef, pub(crate) value: PatioOperand, |
