From b76b5a9cbb20d5888108ff0abf0139cc7cb547cb Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 19 Jan 2019 20:51:56 +0000 Subject: [PATCH] Load UARG2, don't clobber UARG1, in apply hooks. --- src/microcode/cmpauxmd/aarch64.m4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/microcode/cmpauxmd/aarch64.m4 b/src/microcode/cmpauxmd/aarch64.m4 index 19da66a06..5350af8ae 100644 --- a/src/microcode/cmpauxmd/aarch64.m4 +++ b/src/microcode/cmpauxmd/aarch64.m4 @@ -337,12 +337,14 @@ $1: // APPLY_HOOK(name, label, n) // // Application setup hook, to be implemented at label. - // Currently not implemented, so just loads n into x1 and - // defers to apply_setup. + // Currently not implemented, so just loads n (frame size, + // i.e. number of arguments + 1) into UARG2 and defers to + // apply_setup. Caller ensures UARG1 already has the + // callee. // define(APPLY_HOOK, ` $1: - mov x1, #$3 + mov UARG2, #$3 b SYMBOL(apply_setup) nop nop') -- 2.25.1