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

Function float_int_to_float_roundtrip

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

Source from the content-addressed store, hash-verified

2255 op: IrMathOp::Shr,
2256 ty: i32_ty.clone(),
2257 lhs: IrValue::Integer(-8),
2258 rhs: IrValue::Integer(2),
2259 });
2260 entry.push_instruction(IrInstruction::Cmp {
2261 dest: IrRegister::Named("ok".into()),
2262 op: IrCmpOp::Eq,
2263 ty: i32_ty,
2264 lhs: IrValue::Register(IrRegister::Named("shifted".into())),
2265 rhs: IrValue::Integer(-2),
2266 });
2267 let program = pass_fail_ir(
2268 "shr_signed",
2269 entry,
2270 IrValue::Register(IrRegister::Named("ok".into())),
2271 );
2272 let (_, outcome, _) = run_ir(&program);
2273 assert!(
2274 matches!(outcome, RunOutcome::Halted(0)),
2275 "sra: -8 >> 2 == -2, got {outcome:?}"
2276 );
2277}
2278

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected