From f1dd2bea49b589d2fd56b4fff1c5a6004e97b96e Mon Sep 17 00:00:00 2001 From: Perry Kivolowitz Date: Fri, 21 Jun 2024 11:22:57 -0500 Subject: [PATCH] changed tabs to spaces in nine_args.s --- section_1/funcs/nine_args_asm.s | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/section_1/funcs/nine_args_asm.s b/section_1/funcs/nine_args_asm.s index 81bb22a..437903a 100644 --- a/section_1/funcs/nine_args_asm.s +++ b/section_1/funcs/nine_args_asm.s @@ -1,5 +1,5 @@ - .text - .global main + .text + .global main /* Demonstration of using more than 8 arguments to a function. This demo is LINUX only as APPLE will put all arguments beyond the first @@ -11,35 +11,35 @@ */ SillyFunction: - stp x29, x30, [sp, -16]! // Changes sp. + stp x29, x30, [sp, -16]! // Changes sp. mov x29, sp - ldr x0, =fmt - mov x1, x7 - ldr x2, [sp, 16] // This does not alter the sp. - bl printf - ldp x29, x30, [sp], 16 // Undoes change to sp. - ret + ldr x0, =fmt + mov x1, x7 + ldr x2, [sp, 16] // This does not alter the sp. + bl printf + ldp x29, x30, [sp], 16 // Undoes change to sp. + ret -main: - stp x29, x30, [sp, -16]! // sp down total of 16. +main: + stp x29, x30, [sp, -16]! // sp down total of 16. mov x29, sp - mov x0, 9 - str x0, [sp, -16]! // sp down total of 32. - mov x0, 1 - mov x1, 2 - mov x2, 3 - mov x3, 4 - mov x4, 5 - mov x5, 6 - mov x6, 7 - mov x7, 8 - bl SillyFunction + mov x0, 9 + str x0, [sp, -16]! // sp down total of 32. + mov x0, 1 + mov x1, 2 + mov x2, 3 + mov x3, 4 + mov x4, 5 + mov x5, 6 + mov x6, 7 + mov x7, 8 + bl SillyFunction add sp, sp, 16 // undoes change of sp by 16 due // to function call. - ldp x29, x30, [sp], 16 // undoes change to sp of 16. - ret - - .data -fmt: .asciz "This example hurts my brain: %ld %ld\n" + ldp x29, x30, [sp], 16 // undoes change to sp of 16. + ret + + .data +fmt: .asciz "This example hurts my brain: %ld %ld\n" - .end + .end