From 8858ac50734d720e8a923917603b41201fd63e4c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 30 Mar 2026 22:37:37 +0100 Subject: Handle int32-const --- patio-to-cranelift/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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) } -- cgit v1.2.3