Skip to content
Snippets Groups Projects
Commit 876cf3c0 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Auch die do-while-Schleife erzeugt denselben Assembler-Output. Obwohl es ein...

Auch die do-while-Schleife erzeugt denselben Assembler-Output. Obwohl es ein ganz anderes Programm ist, bewirkt es dasselbe, und die Optimierung macht daraus dasselbe Assembler-Programm. 10.10.2024
parent f688d9e7
Branches
No related tags found
No related merge requests found
.file "while-12.c"
.text
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "%d\n"
.section .text.startup,"ax",@progbits
.p2align 4
.globl main
.type main, @function
main:
.LFB11:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
leaq .LC0(%rip), %rbp
pushq %rbx
.cfi_def_cfa_offset 24
.cfi_offset 3, -24
movl $1, %ebx
subq $8, %rsp
.cfi_def_cfa_offset 32
.p2align 4,,10
.p2align 3
.L2:
movl %ebx, %esi
movq %rbp, %rdi
xorl %eax, %eax
addl $1, %ebx
call printf@PLT
cmpl $11, %ebx
jne .L2
addq $8, %rsp
.cfi_def_cfa_offset 24
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 16
popq %rbp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE11:
.size main, .-main
.ident "GCC: (Debian 12.2.0-14) 12.2.0"
.section .note.GNU-stack,"",@progbits
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment