From: Taylor R Campbell Date: Sat, 19 Jan 2019 23:56:45 +0000 (+0000) Subject: Tidy up interface_to_C. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~57 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a5f5c130d9579b55b4e8b4a236d894b111ee9910;p=mit-scheme.git Tidy up interface_to_C. --- 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]