From ea5ba0cd2596d77649bcce90bfc24f6765afcf3c Mon Sep 17 00:00:00 2001 From: EliteTK Date: Mon, 24 Feb 2014 21:29:55 +0000 Subject: Final cleanup... Hopefully? --- .gitignore | 1 + callocing.s | 56 ------------------------------------------------ isOdd.s | 68 ----------------------------------------------------------- isOddBetter.s | 59 --------------------------------------------------- 4 files changed, 1 insertion(+), 183 deletions(-) delete mode 100644 callocing.s delete mode 100644 isOdd.s delete mode 100644 isOddBetter.s diff --git a/.gitignore b/.gitignore index 7fe55aa..1f92605 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.html *.xml *.out +*.s diff --git a/callocing.s b/callocing.s deleted file mode 100644 index c99607d..0000000 --- a/callocing.s +++ /dev/null @@ -1,56 +0,0 @@ - .file "callocing.c" - .section .rodata -.LC0: - .string "%d: %d\n" -.LC1: - .string "\n%d\n" - .text - .globl main - .type main, @function -main: -.LFB2: - .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 $1073741824, %edi - call malloc - movq %rax, -16(%rbp) - movl $0, -4(%rbp) - jmp .L2 -.L3: - movl -4(%rbp), %eax - cltq - leaq 0(,%rax,4), %rdx - movq -16(%rbp), %rax - addq %rdx, %rax - movl (%rax), %edx - movl -4(%rbp), %eax - movl %eax, %esi - movl $.LC0, %edi - movl $0, %eax - call printf - addl $1, -4(%rbp) -.L2: - cmpl $99, -4(%rbp) - jle .L3 - movq -16(%rbp), %rax - movq %rax, %rsi - movl $.LC1, %edi - movl $0, %eax - call printf - movq -16(%rbp), %rax - movq %rax, %rdi - call free - movl $0, %eax - leave - .cfi_def_cfa 7, 8 - ret - .cfi_endproc -.LFE2: - .size main, .-main - .ident "GCC: (GNU) 4.8.2 20131219 (prerelease)" - .section .note.GNU-stack,"",@progbits diff --git a/isOdd.s b/isOdd.s deleted file mode 100644 index 4a90dd6..0000000 --- a/isOdd.s +++ /dev/null @@ -1,68 +0,0 @@ - .file "isOdd.c" - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "true" -.LC1: - .string "false" -.LC2: - .string "Usage: '%s '\n" - .section .text.startup,"ax",@progbits - .p2align 4,,15 - .globl main - .type main, @function -main: -.LFB11: - .cfi_startproc - cmpl $2, %edi - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - movl %edi, %ebx - je .L8 - movq (%rsi), %rsi - movl $.LC2, %edi - xorl %eax, %eax - call printf - movl $1, %eax - popq %rbx - .cfi_remember_state - .cfi_def_cfa_offset 8 - ret -.L8: - .cfi_restore_state - movq 8(%rsi), %rdi - xorl %eax, %eax - call atoi - cltd - movl $.LC0, %edi - idivl %ebx - movl $.LC1, %eax - testl %edx, %edx - cmove %rax, %rdi - call puts - xorl %eax, %eax - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_endproc -.LFE11: - .size main, .-main - .text - .p2align 4,,15 - .globl isOdd - .type isOdd, @function -isOdd: -.LFB12: - .cfi_startproc - movl %edi, %eax - shrl $31, %eax - addl %eax, %edi - andl $1, %edi - cmpl %eax, %edi - setne %al - ret - .cfi_endproc -.LFE12: - .size isOdd, .-isOdd - .ident "GCC: (GNU) 4.8.2 20131219 (prerelease)" - .section .note.GNU-stack,"",@progbits diff --git a/isOddBetter.s b/isOddBetter.s deleted file mode 100644 index ab437d7..0000000 --- a/isOddBetter.s +++ /dev/null @@ -1,59 +0,0 @@ - .file "isOddBetter.c" - .section .rodata.str1.1,"aMS",@progbits,1 -.LC0: - .string "true" -.LC1: - .string "false" -.LC2: - .string "Usage: '%s '\n" - .section .text.startup,"ax",@progbits - .p2align 4,,15 - .globl main - .type main, @function -main: -.LFB11: - .cfi_startproc - subq $8, %rsp - .cfi_def_cfa_offset 16 - cmpl $2, %edi - je .L8 - movq (%rsi), %rsi - movl $.LC2, %edi - xorl %eax, %eax - call printf - movl $1, %eax -.L4: - addq $8, %rsp - .cfi_remember_state - .cfi_def_cfa_offset 8 - ret -.L8: - .cfi_restore_state - movq 8(%rsi), %rdi - xorl %eax, %eax - call atoi - movl $.LC0, %edi - testb $1, %al - movl $.LC1, %eax - cmove %rax, %rdi - call puts - xorl %eax, %eax - jmp .L4 - .cfi_endproc -.LFE11: - .size main, .-main - .text - .p2align 4,,15 - .globl isOdd - .type isOdd, @function -isOdd: -.LFB12: - .cfi_startproc - movl %edi, %eax - andl $1, %eax - ret - .cfi_endproc -.LFE12: - .size isOdd, .-isOdd - .ident "GCC: (GNU) 4.8.2 20131219 (prerelease)" - .section .note.GNU-stack,"",@progbits -- cgit v1.2.3-54-g00ecf