Load UARG2, don't clobber UARG1, in apply hooks.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 19 Jan 2019 20:51:56 +0000 (20:51 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 21 Aug 2019 21:34:03 +0000 (21:34 +0000)
src/microcode/cmpauxmd/aarch64.m4

index 19da66a061a659f376825d86f269934a93739ae4..5350af8aed6f7fadb80be903373ebde1afc25626 100644 (file)
@@ -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')