aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliteTK <tomasz.kramkowski@gmail.com>2014-02-24 21:29:55 +0000
committerEliteTK <tomasz.kramkowski@gmail.com>2014-02-24 21:29:55 +0000
commitea5ba0cd2596d77649bcce90bfc24f6765afcf3c (patch)
tree72772d571c5b66734a1108d2e220edca69a18654
parent1e4bf42350a2145081224e4610312bc65566ad5c (diff)
downloadc-stuff-ea5ba0cd2596d77649bcce90bfc24f6765afcf3c.tar.gz
c-stuff-ea5ba0cd2596d77649bcce90bfc24f6765afcf3c.tar.xz
c-stuff-ea5ba0cd2596d77649bcce90bfc24f6765afcf3c.zip
Final cleanup... Hopefully?
-rw-r--r--.gitignore1
-rw-r--r--callocing.s56
-rw-r--r--isOdd.s68
-rw-r--r--isOddBetter.s59
4 files changed, 1 insertions, 183 deletions
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 <number>'\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 <number>'\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