]> git.mdlowis.com Git - proto/aas.git/commitdiff
fixed up local parameter access
authorMike Lowis <mike.lowis@gentex.com>
Mon, 20 Nov 2023 19:44:52 +0000 (14:44 -0500)
committerMike Lowis <mike.lowis@gentex.com>
Mon, 20 Nov 2023 19:44:52 +0000 (14:44 -0500)
aas.rb

diff --git a/aas.rb b/aas.rb
index 9c0fb4f086a09c8c9fb2ba125e32c9da894e048a..4f69b8ed2b4b22e27624beb0899f26d20ac90b46 100755 (executable)
--- a/aas.rb
+++ b/aas.rb
@@ -293,7 +293,8 @@ class Function
   # Function Scaffolding: Locals and Returns
   ##
   def get_param(num)
-    emit "movq      #{8*(num+1)}(%rbp), %rax"
+    emit "movq      #{8*(num+2)}(%rbp), %rax"
+    emit "pushq     %rax"
   end
 
   def locals(count)