Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "shift.c"
- .section .rodata
- .LC0:
- .string "ans << 32 = 0x%X\n"
- .LC1:
- .string "ans >> 32 = 0x%X\n"
- .LC2:
- .string "ans << n(32) = 0x%X\n"
- .LC3:
- .string "ans >> n(32) = 0x%X\n"
- .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
- subq $16, %rsp
- movl $32, -4(%rbp)
- movl $.LC0, %eax
- movl $0, %esi
- movq %rax, %rdi
- movl $0, %eax
- call printf
- movl $.LC1, %eax
- movl $0, %esi
- movq %rax, %rdi
- movl $0, %eax
- call printf
- movl -4(%rbp), %eax
- movl $-1, %edx
- movl %eax, %ecx
- sall %cl, %edx
- movl $.LC2, %eax
- movl %edx, %esi
- movq %rax, %rdi
- movl $0, %eax
- call printf
- movl -4(%rbp), %eax
- movl $-1, %edx
- movl %eax, %ecx
- shrl %cl, %edx
- movl $.LC3, %eax
- movl %edx, %esi
- movq %rax, %rdi
- movl $0, %eax
- call printf
- movl $0, %eax
- leave
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size main, .-main
- .ident "GCC: (Debian 4.6.1-4) 4.6.1"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement