Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // gcc -S -O0
- .file "x.cpp"
- .text
- .globl main
- .type main, @function
- main:
- .LFB0:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movl $10, -20(%rbp)
- movl $20, -4(%rbp)
- leaq -20(%rbp), %rax
- movq %rax, -16(%rbp)
- movq -16(%rbp), %rax
- movl -4(%rbp), %edx
- movl %edx, (%rax)
- movl $0, %eax
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size main, .-main
- .globl _Z1rv
- .type _Z1rv, @function
- _Z1rv:
- .LFB1:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movl $0, -20(%rbp)
- movl $0, -4(%rbp)
- leaq -20(%rbp), %rax
- movq %rax, -16(%rbp)
- movq -16(%rbp), %rax
- movl -4(%rbp), %edx
- movl %edx, (%rax)
- nop
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE1:
- .size _Z1rv, .-_Z1rv
- .ident "GCC: (SUSE Linux) 6.2.1 20160830 [gcc-6-branch revision 239856]"
- .section .note.GNU-stack,"",@progbits
- // source
- int main() {
- int a = 10;
- int b = 20;
- int *x = &a;
- *x = b;
- return 0;
- }
- void r() {
- int a = 0;
- int b = 0;
- int &c = a;
- c = b;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement