aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-03-30 22:37:37 +0100
committerMichael Williamson <mike@zwobble.org>2026-03-30 22:37:37 +0100
commit8858ac50734d720e8a923917603b41201fd63e4c (patch)
treeedd39bf08cee14c7e67813ea274e0f790e956f9e
parent494205e2e4a57899b2c837efbe7b346ea0781d43 (diff)
Handle int32-const
-rw-r--r--patio-to-cranelift/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/patio-to-cranelift/src/lib.rs b/patio-to-cranelift/src/lib.rs
index fbb0e14f..6ceb4968 100644
--- a/patio-to-cranelift/src/lib.rs
+++ b/patio-to-cranelift/src/lib.rs
@@ -184,6 +184,13 @@ fn compile_operand(
compile_int_value(int_const.value(), cranelift_int_type, context)
}
+ PatioOperandValue::PatioInt32Const => {
+ let int_32_const = operand.value_operand_value_as_patio_int_32_const().unwrap();
+ // TODO: de-duplicate with patio_type_to_cranelift_type
+ let cranelift_int_type = cranelift::prelude::Type::int(32).unwrap();
+ compile_int_value(int_32_const.value(), cranelift_int_type, context)
+ }
+
operand_type => {
todo!("Unhandled operand type: {:?} {}", operand_type.variant_name(), operand_type.0)
}