From a5f5c130d9579b55b4e8b4a236d894b111ee9910 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 19 Jan 2019 23:56:45 +0000 Subject: [PATCH] Tidy up interface_to_C. --- src/microcode/cmpauxmd/aarch64.m4 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/microcode/cmpauxmd/aarch64.m4 b/src/microcode/cmpauxmd/aarch64.m4 index e0b52a664..e6f6cf35a 100644 --- a/src/microcode/cmpauxmd/aarch64.m4 +++ b/src/microcode/cmpauxmd/aarch64.m4 @@ -124,7 +124,7 @@ END(C_to_interface) // Returning to C from Scheme /////////////////////////////////////////////////////////////////////////////// - // void interface_to_C (long code@x0) + // void interface_to_C (long code@x1, void * garbage@x17) // // When a utility returns and it needs to fall back to the // interpreter, it directs scheme_to_interface_return to @@ -133,17 +133,17 @@ END(C_to_interface) // // Steps: // - // 1. Tear down the Scheme registers. - // 2. Restore the return address, frame pointer, and + // 1. Restore the return address, frame pointer, and // callee-saves registers. - // 3. Return. + // 2. Return. + // + // The mutable Scheme registers -- FREE, SSP -- will have + // alreay been saved by scheme_to_interface on earlier + // entry to C. // GLOBAL(interface_to_C) - // Tear down the Scheme registers. - ADRL(x1,Free) // address of Free pointer - str FREE, [x1] // store current Free pointer - ADRL(x1,stack_pointer) // address of stack pointer - str SSP, [x1] // store current stack pointer + // Set return value. + mov x0, x1 // Restore callee-saves registers. ldp x19, x20, [sp,#16] -- 2.25.1