$ cat RC4.s.m4
m4_include(macros.m4)m4_dnl
NEWFUNC(testfunc)
DEFVAR(INT64, theInt)
DEFVAR(INT32, theSmallInt)
DEFVAR(ARRAY, INT8, 256, theArray)
START_FUNC
movq $256, %rcx
xorq %rax, %rax
testfunc_loop_start:
movb %al, V_theArray(%rax)
incq %rax
decq %rcx
jnz testfunc_loop_start
movq $50, %rax
movb V_theArray(%rax), %al
END_FUNC
$ m4 -P RC4.s.m4
.globl testfunc
.type testfunc, @function
testfunc:
# INT64 theInt = -8(%rbp)
# INT32 theSmallInt = -12(%rbp)
# INT8 theArray[256] = -268(%rbp)
pushq %rbp
movq %rsp, %rbp
subq $268, %rsp
movq $256, %rcx
xorq %rax, %rax
testfunc_loop_start:
movb %al, -268(%rbp, %rax, 1)
incq %rax
decq %rcx
jnz testfunc_loop_start
movq $50, %rax
movb -268(%rbp, %rax, 1), %al
movq %rbp, %rsp
popq %rbp
ret