summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zjit/src/ir.rs23
1 files changed, 15 insertions, 8 deletions
diff --git a/zjit/src/ir.rs b/zjit/src/ir.rs
index 0d349350d2..bd7e3c857b 100644
--- a/zjit/src/ir.rs
+++ b/zjit/src/ir.rs
@@ -37,22 +37,29 @@ enum Insn {
//SetIvar {},
//GetIvar {},
- // Send with dynamic dispatch
- // Ignoring keyword arguments etc for now
- Send { self_val: Opnd, args: Vec<Opnd> },
+ // Operators
+ Add { v0: Opnd, v1: Opnd },
- // Control flow instructions
- Return { val: Opnd },
+ // Comparison operators
+ Lt { v0: Opnd, v1: Opnd },
// Unconditional jump
Jump(BranchEdge),
- // Operators
- Add { v0: Opnd, v1: Opnd },
-
// Conditional branch instructions
IfTrue { val: Opnd, branch: BranchEdge },
IfFalse { val: Opnd, target: BranchEdge },
+
+ // Call a C function
+ // TODO: should we store the C function name?
+ CCall { cfun: *const u8, args: Vec<Opnd> },
+
+ // Send with dynamic dispatch
+ // Ignoring keyword arguments etc for now
+ Send { self_val: Opnd, args: Vec<Opnd> },
+
+ // Control flow instructions
+ Return { val: Opnd },
}
#[derive(Default, Debug, PartialEq)]