MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / float_f32_int_cast

Function float_f32_int_cast

tests/integration/vm_execution.rs:2278–2296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2276 );
2277}
2278
2279/// Left shift (`sll`): 1 << 10 must equal 1024. Built directly in IR.
2280#[test]
2281fn ir_math_shl() {
2282 let i32_ty = IrType::Integer(IntWidth::I32);
2283 let mut entry = IrBlock::new("entry");
2284 entry.push_instruction(IrInstruction::Math {
2285 dest: IrRegister::Named("result".into()),
2286 op: IrMathOp::Shl,
2287 ty: i32_ty.clone(),
2288 lhs: IrValue::Integer(1),
2289 rhs: IrValue::Integer(10),
2290 });
2291 entry.push_instruction(IrInstruction::Cmp {
2292 dest: IrRegister::Named("ok".into()),
2293 op: IrCmpOp::Eq,
2294 ty: i32_ty,
2295 lhs: IrValue::Register(IrRegister::Named("result".into())),
2296 rhs: IrValue::Integer(1024),
2297 });
2298 let program = pass_fail_ir(
2299 "shl",

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected