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

Function ir_math_shr_signed

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

Source from the content-addressed store, hash-verified

2048 return 0
2049 }
2050 return 1
2051}
2052"#,
2053 );
2054 assert!(
2055 matches!(outcome, StepOutcome::Halted(0)),
2056 "middle field b=99 must be readable at offset 4, got {outcome:?}"
2057 );
2058}
2059
2060/// Struct with mixed i32 and i64 fields: i64 must be aligned to 8 bytes.
2061#[test]
2062fn struct_mixed_i32_i64_fields() {
2063 let (_, outcome, _) = run_hll(
2064 r#"
2065struct Mixed { small: i32, big: i64 }
2066
2067make_mixed: (s: i32, b: i64) -> Mixed {
2068 return { .small = s, .big = b }
2069}
2070
2071main: () -> i32 {
2072 m: Mixed = make_mixed(7, 2148532224)
2073 a: i64 = 1048576
2074 expected: i64 = a * 2049
2075 if m.small == 7 {
2076 if m.big == expected {
2077 return 0
2078 }
2079 }
2080 return 1

Callers

nothing calls this directly

Calls 4

pass_fail_irFunction · 0.85
run_irFunction · 0.85
push_instructionMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected