Command to run the test (source code):
./chef.py test backend -bw doc/p_54.c
cat build/cpp-bin/assembly.s
Result :
.file "p_54.c"
.text
.Ltext0:
.globl main
.type main, @function
main:
pushq %rbp
movq %rsp, %rbp
subq $72, %rsp
jmp .L1_innerbeginof_main
.L1_innerbeginof_main:
movl $0, -8(%rbp)
movl -8(%rbp), %r10d
movl %r10d, -12(%rbp) # copyInstr
movl $0, -20(%rbp)
movl -20(%rbp), %r10d
movl %r10d, -24(%rbp) # copyInstr
movl $0, -32(%rbp)
movl -32(%rbp), %r10d
movl %r10d, -36(%rbp) # copyInstr
# empty with returnName=a
movl $79, -44(%rbp)
movl -44(%rbp), %r10d
movl %r10d, -12(%rbp) # copyInstr
# empty with returnName=b
movl $0, -48(%rbp)
movl -12(%rbp), %eax
addl %eax, -48(%rbp)
movl -48(%rbp), %r10d
movl %r10d, -24(%rbp) # copyInstr
# empty with returnName=c
movl $75, -56(%rbp)
movl -56(%rbp), %r10d
movl %r10d, -36(%rbp) # copyInstr
# empty with returnName=a
movl $10, -64(%rbp)
movl -64(%rbp), %r10d
movl %r10d, -12(%rbp) # copyInstr
# empty with returnName=b
pushq %rdi
movl -24(%rbp), %edi # call Param
call putchar
popq %rdi
# empty with returnName=c
pushq %rdi
movl -36(%rbp), %edi # call Param
call putchar
popq %rdi
# empty with returnName=a
pushq %rdi
movl -12(%rbp), %edi # call Param
call putchar
popq %rdi
jmp .L0_endof_main
.L0_endof_main:
leave
ret