Fix large application setup.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 21 Jan 2019 22:39:11 +0000 (22:39 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 21 Aug 2019 21:34:04 +0000 (21:34 +0000)
src/compiler/machines/aarch64/rules3.scm

index 37f7fd8d70d24023d18a4fc09c098da2996801c5..29feed26c61c80649db0c1b018dae2c14f8eeb16 100644 (file)
@@ -69,6 +69,7 @@ USA.
          (BR ,regnum:applicand-pc))))
 
 (define (apply-setup frame-size)
+  (assert (= regnum:applicand regnum:utility-arg1))
   (case frame-size
     ((1) (invoke-hook/subroutine entry:compiler-apply-setup-size-1))
     ((2) (invoke-hook/subroutine entry:compiler-apply-setup-size-2))
@@ -79,7 +80,7 @@ USA.
     ((7) (invoke-hook/subroutine entry:compiler-apply-setup-size-7))
     ((8) (invoke-hook/subroutine entry:compiler-apply-setup-size-8))
     (else
-     (LAP ,@(load-unsigned-immediate regnum:utility-arg1 frame-size)
+     (LAP ,@(load-unsigned-immediate regnum:utility-arg2 frame-size)
           ,@(invoke-hook/subroutine entry:compiler-apply-setup)))))
 \f
 (define-rule statement