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 65af9e8 commit 1c57136
Show file tree
Hide file tree
Showing 33 changed files with 61,536 additions and 3,463 deletions.
2,191 changes: 2,191 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/941202-1-0.compare.log

Large diffs are not rendered by default.

1,438 changes: 1,244 additions & 194 deletions tests/gcc.c-torture/job_601_1465/Output/941202-1-0.kstate

Large diffs are not rendered by default.

1,728 changes: 1,721 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/941202-1-0.xstate

Large diffs are not rendered by default.

3,121 changes: 3,121 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/991112-1-0.compare.log

Large diffs are not rendered by default.

4,685 changes: 4,598 additions & 87 deletions tests/gcc.c-torture/job_601_1465/Output/991112-1-0.kstate

Large diffs are not rendered by default.

2,497 changes: 2,494 additions & 3 deletions tests/gcc.c-torture/job_601_1465/Output/991112-1-0.xstate

Large diffs are not rendered by default.

4,183 changes: 4,183 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/frame-address-0.compare.log

Large diffs are not rendered by default.

4,653 changes: 4,340 additions & 313 deletions tests/gcc.c-torture/job_601_1465/Output/frame-address-0.kstate

Large diffs are not rendered by default.

2,780 changes: 2,773 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/frame-address-0.xstate

Large diffs are not rendered by default.

3,851 changes: 3,851 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr30185-0.compare.log

Large diffs are not rendered by default.

5,313 changes: 4,515 additions & 798 deletions tests/gcc.c-torture/job_601_1465/Output/pr30185-0.kstate

Large diffs are not rendered by default.

3,130 changes: 3,123 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/pr30185-0.xstate

Large diffs are not rendered by default.

3,099 changes: 3,099 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr69447-0.compare.log

Large diffs are not rendered by default.

4,159 changes: 3,318 additions & 841 deletions tests/gcc.c-torture/job_601_1465/Output/pr69447-0.kstate

Large diffs are not rendered by default.

2,500 changes: 2,493 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/pr69447-0.xstate

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2,748 changes: 2,642 additions & 106 deletions tests/gcc.c-torture/job_601_1465/Output/pr71626-1-0.kstate

Large diffs are not rendered by default.

785 changes: 778 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/pr71626-1-0.xstate

Large diffs are not rendered by default.

2,609 changes: 2,609 additions & 0 deletions tests/gcc.c-torture/job_601_1465/Output/pr78791-0.compare.log

Large diffs are not rendered by default.

4,663 changes: 3,970 additions & 693 deletions tests/gcc.c-torture/job_601_1465/Output/pr78791-0.kstate

Large diffs are not rendered by default.

2,185 changes: 2,178 additions & 7 deletions tests/gcc.c-torture/job_601_1465/Output/pr78791-0.xstate

Large diffs are not rendered by default.

55 changes: 53 additions & 2 deletions tests/gcc.c-torture/job_601_1465/bin/941202-1-0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,66 @@ 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
g:
pushq %rbp
movq %rsp, %rbp
subq $8, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
cmpl $3, -4(%rbp)
je L26
je L35
call abort
L26:
L35:
leave
ret
f:
Expand Down Expand Up @@ -187,6 +237,7 @@ f:
call g
leave
ret
.globl _start
_start:
pushq %rbp
movq %rsp, %rbp
Expand Down
102 changes: 91 additions & 11 deletions tests/gcc.c-torture/job_601_1465/bin/991112-1-0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,85 @@ 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
isprint:
pushq %rbp
movq %rsp, %rbp
movl %edi, -4(%rbp)
cmpl $96, -4(%rbp)
jle L35
cmpl $122, -4(%rbp)
jg L35
movl $1, %eax
jmp L36
L35:
cmpl $64, -4(%rbp)
jle L37
cmpl $90, -4(%rbp)
jg L37
movl $1, %eax
jmp L36
L37:
cmpl $47, -4(%rbp)
jle L38
cmpl $57, -4(%rbp)
jg L38
movl $1, %eax
jmp L36
L38:
movl $0, %eax
L36:
popq %rbp
ret
rl_show_char:
pushq %rbp
movq %rsp, %rbp
Expand All @@ -156,21 +235,22 @@ rl_show_char:
rl_character_len:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
subq $8, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %eax
movl %eax, %edi
call isprint
testl %eax, %eax
je L28
je L42
movl $1, %eax
jmp L29
L28:
jmp L43
L42:
movl $2, %eax
L29:
L43:
leave
ret
.globl _start
_start:
pushq %rbp
movq %rsp, %rbp
Expand All @@ -179,19 +259,19 @@ _start:
movq -8(%rbp), %rax
movl $1, %esi
movl $97, %edi
call %rax
call %rax
cmpl $1, %eax
je L32
je L46
call abort
L32:
L46:
movq -8(%rbp), %rax
movl $1, %esi
movl $2, %edi
call %rax
call %rax
cmpl $2, %eax
je L33
je L47
call abort
L33:
L47:
movl $0, %eax
leave
ret
Loading

0 comments on commit 1c57136

Please sign in to comment.