Skip to content

Commit

Permalink
https://github.com/sdasgup3/binary-decompilation/issues/77
Browse files Browse the repository at this point in the history
  • Loading branch information
sdasgup3 committed Jul 1, 2018
1 parent 51980c6 commit a5fd9e6
Show file tree
Hide file tree
Showing 24 changed files with 37,214 additions and 656 deletions.
2,070 changes: 2,070 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/ipa-sra-2-0.compare.log

Large diffs are not rendered by default.

3,789 changes: 3,668 additions & 121 deletions tests/gcc.c-torture/job_601_1465/Output/ipa-sra-2-0.kstate

Large diffs are not rendered by default.

1,132 changes: 1,129 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/ipa-sra-2-0.xstate

Large diffs are not rendered by default.

1,517 changes: 1,517 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr36765-0.compare.log

Large diffs are not rendered by default.

3,066 changes: 2,954 additions & 112 deletions tests/gcc.c-torture/job_601_1465/Output/pr36765-0.kstate

Large diffs are not rendered by default.

712 changes: 709 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/pr36765-0.xstate

Large diffs are not rendered by default.

1,804 changes: 1,804 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-1-0.compare.log

Large diffs are not rendered by default.

3,579 changes: 3,483 additions & 96 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-1-0.kstate

Large diffs are not rendered by default.

887 changes: 884 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-1-0.xstate

Large diffs are not rendered by default.

1,804 changes: 1,804 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-2-0.compare.log

Large diffs are not rendered by default.

3,579 changes: 3,483 additions & 96 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-2-0.kstate

Large diffs are not rendered by default.

887 changes: 884 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/pr41395-2-0.xstate

Large diffs are not rendered by default.

4,747 changes: 4,747 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr42614-0.compare.log

Large diffs are not rendered by default.

6,409 changes: 6,238 additions & 171 deletions tests/gcc.c-torture/job_601_1465/Output/pr42614-0.kstate

Large diffs are not rendered by default.

1,132 changes: 1,129 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/pr42614-0.xstate

Large diffs are not rendered by default.

163 changes: 159 additions & 4 deletions tests/gcc.c-torture/job_601_1465/bin/ipa-sra-2-0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,87 @@ L6:
L1:
popq %rbp
ret
strlen:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movq $0, -8(%rbp)
jmp L8
L9:
addq $1, -8(%rbp)
L8:
movq -24(%rbp), %rdx
movq -8(%rbp), %rax
addq %rdx, %rax
movzbl (%rax), %eax
testb %al, %al
jne L9
movq -8(%rbp), %rax
popq %rbp
ret
strcpy:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq -24(%rbp), %rax
movq %rax, -8(%rbp)
nop
L12:
movq -24(%rbp), %rax
leaq 1(%rax), %rdx
movq %rdx, -24(%rbp)
movq -32(%rbp), %rdx
leaq 1(%rdx), %rcx
movq %rcx, -32(%rbp)
movzbl (%rdx), %edx
movb %dl, (%rax)
movzbl (%rax), %eax
testb %al, %al
jne L12
movq -8(%rbp), %rax
popq %rbp
ret
memcmp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq %rdx, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -8(%rbp)
movq -32(%rbp), %rax
movq %rax, -16(%rbp)
jmp L15
L18:
movq -8(%rbp), %rax
movzbl (%rax), %edx
movq -16(%rbp), %rax
movzbl (%rax), %eax
cmpb %al, %dl
je L16
movq -8(%rbp), %rax
movzbl (%rax), %eax
movzbl %al, %edx
movq -16(%rbp), %rax
movzbl (%rax), %eax
movzbl %al, %eax
subl %eax, %edx
movl %edx, %eax
jmp L17
L16:
addq $1, -8(%rbp)
addq $1, -16(%rbp)
L15:
movq -40(%rbp), %rax
leaq -1(%rax), %rdx
movq %rdx, -40(%rbp)
testq %rax, %rax
jne L18
movl $0, %eax
L17:
popq %rbp
ret
exit:
pushq %rbp
movq %rsp, %rbp
Expand All @@ -39,6 +120,80 @@ abort:
movq $-1, %rax
jmp %rax
popq %rbp
ret
memset:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movl %esi, -28(%rbp)
movq %rdx, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -8(%rbp)
jmp L22
L23:
movq -8(%rbp), %rax
leaq 1(%rax), %rdx
movq %rdx, -8(%rbp)
movl -28(%rbp), %edx
movb %dl, (%rax)
L22:
movq -40(%rbp), %rax
leaq -1(%rax), %rdx
movq %rdx, -40(%rbp)
testq %rax, %rax
jne L23
movq -24(%rbp), %rax
popq %rbp
ret
memcpy:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq %rdx, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -8(%rbp)
movq -32(%rbp), %rax
movq %rax, -16(%rbp)
jmp L26
L27:
movq -8(%rbp), %rax
leaq 1(%rax), %rdx
movq %rdx, -8(%rbp)
movq -16(%rbp), %rdx
leaq 1(%rdx), %rcx
movq %rcx, -16(%rbp)
movzbl (%rdx), %edx
movb %dl, (%rax)
L26:
movq -40(%rbp), %rax
leaq -1(%rax), %rdx
movq %rdx, -40(%rbp)
testq %rax, %rax
jne L27
movq -24(%rbp), %rax
popq %rbp
ret
malloc:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
movl $1000, %eax
popq %rbp
ret
calloc:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $1000, %eax
popq %rbp
ret
free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
popq %rbp
ret
foo:
Expand All @@ -47,16 +202,16 @@ foo:
movl %edi, -20(%rbp)
movq %rsi, -32(%rbp)
cmpl $0, -20(%rbp)
je L10
je L35
movq -32(%rbp), %rax
movl 3999996(%rax), %eax
movl %eax, -4(%rbp)
jmp L11
L10:
jmp L36
L35:
movq -32(%rbp), %rax
movl (%rax), %eax
movl %eax, -4(%rbp)
L11:
L36:
movl -4(%rbp), %eax
popq %rbp
ret
Expand Down
59 changes: 55 additions & 4 deletions tests/gcc.c-torture/job_601_1465/bin/pr36765-0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,60 @@ L22:
movq -24(%rbp), %rax
popq %rbp
ret
memcpy:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -24(%rbp)
movq %rsi, -32(%rbp)
movq %rdx, -40(%rbp)
movq -24(%rbp), %rax
movq %rax, -8(%rbp)
movq -32(%rbp), %rax
movq %rax, -16(%rbp)
jmp L26
L27:
movq -8(%rbp), %rax
leaq 1(%rax), %rdx
movq %rdx, -8(%rbp)
movq -16(%rbp), %rdx
leaq 1(%rdx), %rcx
movq %rcx, -16(%rbp)
movzbl (%rdx), %edx
movb %dl, (%rax)
L26:
movq -40(%rbp), %rax
leaq -1(%rax), %rdx
movq %rdx, -40(%rbp)
testq %rax, %rax
jne L27
movq -24(%rbp), %rax
popq %rbp
ret
malloc:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
movl $1000, %eax
popq %rbp
ret
calloc:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl $1000, %eax
popq %rbp
ret
free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -8(%rbp)
popq %rbp
ret
foo:
pushq %rbp
movq %rsp, %rbp
subq $32, %rsp
subq $24, %rsp
movl %edi, -20(%rbp)
movl $16, %edi
call malloc
Expand All @@ -166,15 +216,16 @@ foo:
movl (%rax), %eax
leave
ret
.globl _start
_start:
pushq %rbp
movq %rsp, %rbp
movl $0, %edi
call foo
cmpl $1, %eax
je L28
je L37
call abort
L28:
movl $0, %eax
L37:
movl $10, %eax
popq %rbp
ret
Loading

0 comments on commit a5fd9e6

Please sign in to comment.