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

Function hll_negative_integer_inits

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

Source from the content-addressed store, hash-verified

537
538// A nine-arg callee exercises the stack-passed argument path (caller_sp),
539// which is the one place omitting the frame pointer changes the base register.
540const OMIT_FP_PROGRAM: &str = r#"
541sum9: (a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, g: i64, h: i64, i: i64) -> i64 {
542 return a + b + c + d + e + f + g + h + i
543}
544
545main: () -> i32 {
546 total: i64 = sum9(1, 2, 3, 4, 5, 6, 7, 8, 9)
547 return total as i32
548}
549"#;
550
551#[test]
552fn omit_frame_pointer_preserves_behavior() {
553 let (base_outcome, base_uart, base_lines) = run_hll_omit_fp(OMIT_FP_PROGRAM, false);
554 let (omit_outcome, omit_uart, omit_lines) = run_hll_omit_fp(OMIT_FP_PROGRAM, true);
555
556 assert_eq!(
557 format!("{base_outcome:?}"),
558 format!("{omit_outcome:?}"),
559 "omitting the frame pointer changed the exit outcome"
560 );
561 assert_eq!(
562 base_uart, omit_uart,
563 "omitting the frame pointer changed UART output"
564 );
565 assert!(

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected