Itsa me, quake3io!
This commit is contained in:
parent
dbe4ddb103
commit
5b755058f5
1409 changed files with 798983 additions and 798983 deletions
184
lcc/x86/linux/tst/8q.1bk
Normal file → Executable file
184
lcc/x86/linux/tst/8q.1bk
Normal file → Executable file
|
@ -1,92 +1,92 @@
|
|||
1 5 8 6 3 7 2 4
|
||||
1 6 8 3 7 4 2 5
|
||||
1 7 4 6 8 2 5 3
|
||||
1 7 5 8 2 4 6 3
|
||||
2 4 6 8 3 1 7 5
|
||||
2 5 7 1 3 8 6 4
|
||||
2 5 7 4 1 8 6 3
|
||||
2 6 1 7 4 8 3 5
|
||||
2 6 8 3 1 4 7 5
|
||||
2 7 3 6 8 5 1 4
|
||||
2 7 5 8 1 4 6 3
|
||||
2 8 6 1 3 5 7 4
|
||||
3 1 7 5 8 2 4 6
|
||||
3 5 2 8 1 7 4 6
|
||||
3 5 2 8 6 4 7 1
|
||||
3 5 7 1 4 2 8 6
|
||||
3 5 8 4 1 7 2 6
|
||||
3 6 2 5 8 1 7 4
|
||||
3 6 2 7 1 4 8 5
|
||||
3 6 2 7 5 1 8 4
|
||||
3 6 4 1 8 5 7 2
|
||||
3 6 4 2 8 5 7 1
|
||||
3 6 8 1 4 7 5 2
|
||||
3 6 8 1 5 7 2 4
|
||||
3 6 8 2 4 1 7 5
|
||||
3 7 2 8 5 1 4 6
|
||||
3 7 2 8 6 4 1 5
|
||||
3 8 4 7 1 6 2 5
|
||||
4 1 5 8 2 7 3 6
|
||||
4 1 5 8 6 3 7 2
|
||||
4 2 5 8 6 1 3 7
|
||||
4 2 7 3 6 8 1 5
|
||||
4 2 7 3 6 8 5 1
|
||||
4 2 7 5 1 8 6 3
|
||||
4 2 8 5 7 1 3 6
|
||||
4 2 8 6 1 3 5 7
|
||||
4 6 1 5 2 8 3 7
|
||||
4 6 8 2 7 1 3 5
|
||||
4 6 8 3 1 7 5 2
|
||||
4 7 1 8 5 2 6 3
|
||||
4 7 3 8 2 5 1 6
|
||||
4 7 5 2 6 1 3 8
|
||||
4 7 5 3 1 6 8 2
|
||||
4 8 1 3 6 2 7 5
|
||||
4 8 1 5 7 2 6 3
|
||||
4 8 5 3 1 7 2 6
|
||||
5 1 4 6 8 2 7 3
|
||||
5 1 8 4 2 7 3 6
|
||||
5 1 8 6 3 7 2 4
|
||||
5 2 4 6 8 3 1 7
|
||||
5 2 4 7 3 8 6 1
|
||||
5 2 6 1 7 4 8 3
|
||||
5 2 8 1 4 7 3 6
|
||||
5 3 1 6 8 2 4 7
|
||||
5 3 1 7 2 8 6 4
|
||||
5 3 8 4 7 1 6 2
|
||||
5 7 1 3 8 6 4 2
|
||||
5 7 1 4 2 8 6 3
|
||||
5 7 2 4 8 1 3 6
|
||||
5 7 2 6 3 1 4 8
|
||||
5 7 2 6 3 1 8 4
|
||||
5 7 4 1 3 8 6 2
|
||||
5 8 4 1 3 6 2 7
|
||||
5 8 4 1 7 2 6 3
|
||||
6 1 5 2 8 3 7 4
|
||||
6 2 7 1 3 5 8 4
|
||||
6 2 7 1 4 8 5 3
|
||||
6 3 1 7 5 8 2 4
|
||||
6 3 1 8 4 2 7 5
|
||||
6 3 1 8 5 2 4 7
|
||||
6 3 5 7 1 4 2 8
|
||||
6 3 5 8 1 4 2 7
|
||||
6 3 7 2 4 8 1 5
|
||||
6 3 7 2 8 5 1 4
|
||||
6 3 7 4 1 8 2 5
|
||||
6 4 1 5 8 2 7 3
|
||||
6 4 2 8 5 7 1 3
|
||||
6 4 7 1 3 5 2 8
|
||||
6 4 7 1 8 2 5 3
|
||||
6 8 2 4 1 7 5 3
|
||||
7 1 3 8 6 4 2 5
|
||||
7 2 4 1 8 5 3 6
|
||||
7 2 6 3 1 4 8 5
|
||||
7 3 1 6 8 5 2 4
|
||||
7 3 8 2 5 1 6 4
|
||||
7 4 2 5 8 1 3 6
|
||||
7 4 2 8 6 1 3 5
|
||||
7 5 3 1 6 8 2 4
|
||||
8 2 4 1 7 5 3 6
|
||||
8 2 5 3 1 7 4 6
|
||||
8 3 1 6 2 5 7 4
|
||||
8 4 1 3 6 2 7 5
|
||||
1 5 8 6 3 7 2 4
|
||||
1 6 8 3 7 4 2 5
|
||||
1 7 4 6 8 2 5 3
|
||||
1 7 5 8 2 4 6 3
|
||||
2 4 6 8 3 1 7 5
|
||||
2 5 7 1 3 8 6 4
|
||||
2 5 7 4 1 8 6 3
|
||||
2 6 1 7 4 8 3 5
|
||||
2 6 8 3 1 4 7 5
|
||||
2 7 3 6 8 5 1 4
|
||||
2 7 5 8 1 4 6 3
|
||||
2 8 6 1 3 5 7 4
|
||||
3 1 7 5 8 2 4 6
|
||||
3 5 2 8 1 7 4 6
|
||||
3 5 2 8 6 4 7 1
|
||||
3 5 7 1 4 2 8 6
|
||||
3 5 8 4 1 7 2 6
|
||||
3 6 2 5 8 1 7 4
|
||||
3 6 2 7 1 4 8 5
|
||||
3 6 2 7 5 1 8 4
|
||||
3 6 4 1 8 5 7 2
|
||||
3 6 4 2 8 5 7 1
|
||||
3 6 8 1 4 7 5 2
|
||||
3 6 8 1 5 7 2 4
|
||||
3 6 8 2 4 1 7 5
|
||||
3 7 2 8 5 1 4 6
|
||||
3 7 2 8 6 4 1 5
|
||||
3 8 4 7 1 6 2 5
|
||||
4 1 5 8 2 7 3 6
|
||||
4 1 5 8 6 3 7 2
|
||||
4 2 5 8 6 1 3 7
|
||||
4 2 7 3 6 8 1 5
|
||||
4 2 7 3 6 8 5 1
|
||||
4 2 7 5 1 8 6 3
|
||||
4 2 8 5 7 1 3 6
|
||||
4 2 8 6 1 3 5 7
|
||||
4 6 1 5 2 8 3 7
|
||||
4 6 8 2 7 1 3 5
|
||||
4 6 8 3 1 7 5 2
|
||||
4 7 1 8 5 2 6 3
|
||||
4 7 3 8 2 5 1 6
|
||||
4 7 5 2 6 1 3 8
|
||||
4 7 5 3 1 6 8 2
|
||||
4 8 1 3 6 2 7 5
|
||||
4 8 1 5 7 2 6 3
|
||||
4 8 5 3 1 7 2 6
|
||||
5 1 4 6 8 2 7 3
|
||||
5 1 8 4 2 7 3 6
|
||||
5 1 8 6 3 7 2 4
|
||||
5 2 4 6 8 3 1 7
|
||||
5 2 4 7 3 8 6 1
|
||||
5 2 6 1 7 4 8 3
|
||||
5 2 8 1 4 7 3 6
|
||||
5 3 1 6 8 2 4 7
|
||||
5 3 1 7 2 8 6 4
|
||||
5 3 8 4 7 1 6 2
|
||||
5 7 1 3 8 6 4 2
|
||||
5 7 1 4 2 8 6 3
|
||||
5 7 2 4 8 1 3 6
|
||||
5 7 2 6 3 1 4 8
|
||||
5 7 2 6 3 1 8 4
|
||||
5 7 4 1 3 8 6 2
|
||||
5 8 4 1 3 6 2 7
|
||||
5 8 4 1 7 2 6 3
|
||||
6 1 5 2 8 3 7 4
|
||||
6 2 7 1 3 5 8 4
|
||||
6 2 7 1 4 8 5 3
|
||||
6 3 1 7 5 8 2 4
|
||||
6 3 1 8 4 2 7 5
|
||||
6 3 1 8 5 2 4 7
|
||||
6 3 5 7 1 4 2 8
|
||||
6 3 5 8 1 4 2 7
|
||||
6 3 7 2 4 8 1 5
|
||||
6 3 7 2 8 5 1 4
|
||||
6 3 7 4 1 8 2 5
|
||||
6 4 1 5 8 2 7 3
|
||||
6 4 2 8 5 7 1 3
|
||||
6 4 7 1 3 5 2 8
|
||||
6 4 7 1 8 2 5 3
|
||||
6 8 2 4 1 7 5 3
|
||||
7 1 3 8 6 4 2 5
|
||||
7 2 4 1 8 5 3 6
|
||||
7 2 6 3 1 4 8 5
|
||||
7 3 1 6 8 5 2 4
|
||||
7 3 8 2 5 1 6 4
|
||||
7 4 2 5 8 1 3 6
|
||||
7 4 2 8 6 1 3 5
|
||||
7 5 3 1 6 8 2 4
|
||||
8 2 4 1 7 5 3 6
|
||||
8 2 5 3 1 7 4 6
|
||||
8 3 1 6 2 5 7 4
|
||||
8 4 1 3 6 2 7 5
|
||||
|
|
4
lcc/x86/linux/tst/8q.2bk
Normal file → Executable file
4
lcc/x86/linux/tst/8q.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/8q.c:30: warning: missing return value
|
||||
tst/8q.c:39: warning: missing return value
|
||||
tst/8q.c:30: warning: missing return value
|
||||
tst/8q.c:39: warning: missing return value
|
||||
|
|
360
lcc/x86/linux/tst/8q.sbk
Normal file → Executable file
360
lcc/x86/linux/tst/8q.sbk
Normal file → Executable file
|
@ -1,180 +1,180 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC2:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,4),%edi
|
||||
movl $1,down(%edi)
|
||||
movl $1,up(%edi)
|
||||
.LC3:
|
||||
incl -4(%ebp)
|
||||
cmpl $15,-4(%ebp)
|
||||
jl .LC2
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
movl $1,rows(,%edi,4)
|
||||
.LC7:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC6
|
||||
pushl $0
|
||||
call queens
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf10:
|
||||
.size main,.Lf10-main
|
||||
.globl queens
|
||||
.align 16
|
||||
.type queens,@function
|
||||
queens:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC12:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $0,rows(,%edi,4)
|
||||
je .LC16
|
||||
movl 20(%ebp),%esi
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
cmpl $0,up+28(,%ebx,4)
|
||||
je .LC16
|
||||
leal (%esi,%edi),%edi
|
||||
cmpl $0,down(,%edi,4)
|
||||
je .LC16
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
leal (%esi,%edi),%ebx
|
||||
movl $0,down(,%ebx,4)
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
movl $0,up+28(,%ebx,4)
|
||||
movl $0,rows(,%edi,4)
|
||||
movl 20(%ebp),%edi
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,x(,%edi,4)
|
||||
cmpl $7,20(%ebp)
|
||||
jne .LC20
|
||||
call print
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
pushl %edi
|
||||
call queens
|
||||
addl $4,%esp
|
||||
.LC21:
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
leal (%esi,%edi),%ebx
|
||||
movl $1,down(,%ebx,4)
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
movl $1,up+28(,%ebx,4)
|
||||
movl $1,rows(,%edi,4)
|
||||
.LC16:
|
||||
.LC13:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC12
|
||||
movl $0,%eax
|
||||
.LC11:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf23:
|
||||
.size queens,.Lf23-queens
|
||||
.globl print
|
||||
.align 16
|
||||
.type print,@function
|
||||
print:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
movl x(,%edi,4),%edi
|
||||
leal 49(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC26:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC25
|
||||
pushl $.LC30
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC24:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf31:
|
||||
.size print,.Lf31-print
|
||||
.bss
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,32
|
||||
.comm x,32
|
||||
.globl rows
|
||||
.align 4
|
||||
.type rows,@object
|
||||
.size rows,32
|
||||
.comm rows,32
|
||||
.globl down
|
||||
.align 4
|
||||
.type down,@object
|
||||
.size down,60
|
||||
.comm down,60
|
||||
.globl up
|
||||
.align 4
|
||||
.type up,@object
|
||||
.size up,60
|
||||
.comm up,60
|
||||
.data
|
||||
.align 1
|
||||
.LC30:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC29:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 32
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC2:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,4),%edi
|
||||
movl $1,down(%edi)
|
||||
movl $1,up(%edi)
|
||||
.LC3:
|
||||
incl -4(%ebp)
|
||||
cmpl $15,-4(%ebp)
|
||||
jl .LC2
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
movl $1,rows(,%edi,4)
|
||||
.LC7:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC6
|
||||
pushl $0
|
||||
call queens
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf10:
|
||||
.size main,.Lf10-main
|
||||
.globl queens
|
||||
.align 16
|
||||
.type queens,@function
|
||||
queens:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC12:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $0,rows(,%edi,4)
|
||||
je .LC16
|
||||
movl 20(%ebp),%esi
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
cmpl $0,up+28(,%ebx,4)
|
||||
je .LC16
|
||||
leal (%esi,%edi),%edi
|
||||
cmpl $0,down(,%edi,4)
|
||||
je .LC16
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
leal (%esi,%edi),%ebx
|
||||
movl $0,down(,%ebx,4)
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
movl $0,up+28(,%ebx,4)
|
||||
movl $0,rows(,%edi,4)
|
||||
movl 20(%ebp),%edi
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,x(,%edi,4)
|
||||
cmpl $7,20(%ebp)
|
||||
jne .LC20
|
||||
call print
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
pushl %edi
|
||||
call queens
|
||||
addl $4,%esp
|
||||
.LC21:
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
leal (%esi,%edi),%ebx
|
||||
movl $1,down(,%ebx,4)
|
||||
movl %edi,%ebx
|
||||
subl %esi,%ebx
|
||||
movl $1,up+28(,%ebx,4)
|
||||
movl $1,rows(,%edi,4)
|
||||
.LC16:
|
||||
.LC13:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC12
|
||||
movl $0,%eax
|
||||
.LC11:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf23:
|
||||
.size queens,.Lf23-queens
|
||||
.globl print
|
||||
.align 16
|
||||
.type print,@function
|
||||
print:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
movl x(,%edi,4),%edi
|
||||
leal 49(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC26:
|
||||
incl -4(%ebp)
|
||||
cmpl $8,-4(%ebp)
|
||||
jl .LC25
|
||||
pushl $.LC30
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC24:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf31:
|
||||
.size print,.Lf31-print
|
||||
.bss
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,32
|
||||
.comm x,32
|
||||
.globl rows
|
||||
.align 4
|
||||
.type rows,@object
|
||||
.size rows,32
|
||||
.comm rows,32
|
||||
.globl down
|
||||
.align 4
|
||||
.type down,@object
|
||||
.size down,60
|
||||
.comm down,60
|
||||
.globl up
|
||||
.align 4
|
||||
.type up,@object
|
||||
.size up,60
|
||||
.comm up,60
|
||||
.data
|
||||
.align 1
|
||||
.LC30:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC29:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 32
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
8
lcc/x86/linux/tst/array.1bk
Normal file → Executable file
8
lcc/x86/linux/tst/array.1bk
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
|
|
4
lcc/x86/linux/tst/array.2bk
Normal file → Executable file
4
lcc/x86/linux/tst/array.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/array.c:33: warning: missing return value
|
||||
tst/array.c:48: warning: missing return value
|
||||
tst/array.c:33: warning: missing return value
|
||||
tst/array.c:48: warning: missing return value
|
||||
|
|
470
lcc/x86/linux/tst/array.sbk
Normal file → Executable file
470
lcc/x86/linux/tst/array.sbk
Normal file → Executable file
|
@ -1,235 +1,235 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $60,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC2:
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl %esi,%ebx
|
||||
sall $4,%ebx
|
||||
leal x(%ebx),%ebx
|
||||
imul $1000,%esi,%esi
|
||||
leal (%edi,%esi),%esi
|
||||
movl %esi,(%ebx,%edi,4)
|
||||
.LC7:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC6
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
sall $4,%esi
|
||||
leal x(%esi),%esi
|
||||
movl %esi,y(,%edi,4)
|
||||
.LC3:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC2
|
||||
call f
|
||||
movl $0,-8(%ebp)
|
||||
.LC10:
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
sall $4,%esi
|
||||
leal -60(%ebp),%ebx
|
||||
leal (%ebx,%esi),%esi
|
||||
movl %esi,-12(%ebp)
|
||||
movl %esi,y(,%edi,4)
|
||||
movl $0,-4(%ebp)
|
||||
.LC14:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,4),%edi
|
||||
movl -12(%ebp),%esi
|
||||
movl -8(%ebp),%ebx
|
||||
sall $4,%ebx
|
||||
leal x(%ebx),%ebx
|
||||
movl (%ebx,%edi),%ebx
|
||||
movl %ebx,(%esi,%edi)
|
||||
.LC15:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC14
|
||||
.LC11:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC10
|
||||
pushl $y
|
||||
leal -60(%ebp),%edi
|
||||
pushl %edi
|
||||
call g
|
||||
addl $8,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf18:
|
||||
.size main,.Lf18-main
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC20:
|
||||
movl $0,-4(%ebp)
|
||||
.LC24:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
sall $4,%esi
|
||||
leal x(%esi),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC25:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC24
|
||||
.LC21:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC20
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC30:
|
||||
movl $0,-4(%ebp)
|
||||
.LC34:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC35:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC34
|
||||
.LC31:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC30
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC19:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf38:
|
||||
.size f,.Lf38-f
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC40:
|
||||
movl $0,-4(%ebp)
|
||||
.LC44:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
sall $4,%esi
|
||||
movl 20(%ebp),%ebx
|
||||
leal (%ebx,%esi),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC45:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC44
|
||||
.LC41:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC40
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC48:
|
||||
movl $0,-4(%ebp)
|
||||
.LC52:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl 24(%ebp),%ebx
|
||||
movl (%ebx,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC53:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC52
|
||||
.LC49:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC48
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC39:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf56:
|
||||
.size g,.Lf56-g
|
||||
.bss
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,12
|
||||
.comm y,12
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,48
|
||||
.comm x,48
|
||||
.data
|
||||
.align 1
|
||||
.LC29:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC28:
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $60,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC2:
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl %esi,%ebx
|
||||
sall $4,%ebx
|
||||
leal x(%ebx),%ebx
|
||||
imul $1000,%esi,%esi
|
||||
leal (%edi,%esi),%esi
|
||||
movl %esi,(%ebx,%edi,4)
|
||||
.LC7:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC6
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
sall $4,%esi
|
||||
leal x(%esi),%esi
|
||||
movl %esi,y(,%edi,4)
|
||||
.LC3:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC2
|
||||
call f
|
||||
movl $0,-8(%ebp)
|
||||
.LC10:
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
sall $4,%esi
|
||||
leal -60(%ebp),%ebx
|
||||
leal (%ebx,%esi),%esi
|
||||
movl %esi,-12(%ebp)
|
||||
movl %esi,y(,%edi,4)
|
||||
movl $0,-4(%ebp)
|
||||
.LC14:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,4),%edi
|
||||
movl -12(%ebp),%esi
|
||||
movl -8(%ebp),%ebx
|
||||
sall $4,%ebx
|
||||
leal x(%ebx),%ebx
|
||||
movl (%ebx,%edi),%ebx
|
||||
movl %ebx,(%esi,%edi)
|
||||
.LC15:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC14
|
||||
.LC11:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC10
|
||||
pushl $y
|
||||
leal -60(%ebp),%edi
|
||||
pushl %edi
|
||||
call g
|
||||
addl $8,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf18:
|
||||
.size main,.Lf18-main
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC20:
|
||||
movl $0,-4(%ebp)
|
||||
.LC24:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
sall $4,%esi
|
||||
leal x(%esi),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC25:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC24
|
||||
.LC21:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC20
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC30:
|
||||
movl $0,-4(%ebp)
|
||||
.LC34:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC35:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC34
|
||||
.LC31:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC30
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC19:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf38:
|
||||
.size f,.Lf38-f
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC40:
|
||||
movl $0,-4(%ebp)
|
||||
.LC44:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
sall $4,%esi
|
||||
movl 20(%ebp),%ebx
|
||||
leal (%ebx,%esi),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC45:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC44
|
||||
.LC41:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC40
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-8(%ebp)
|
||||
.LC48:
|
||||
movl $0,-4(%ebp)
|
||||
.LC52:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl 24(%ebp),%ebx
|
||||
movl (%ebx,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC28
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC53:
|
||||
incl -4(%ebp)
|
||||
cmpl $4,-4(%ebp)
|
||||
jl .LC52
|
||||
.LC49:
|
||||
incl -8(%ebp)
|
||||
cmpl $3,-8(%ebp)
|
||||
jl .LC48
|
||||
pushl $.LC29
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC39:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf56:
|
||||
.size g,.Lf56-g
|
||||
.bss
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,12
|
||||
.comm y,12
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,48
|
||||
.comm x,48
|
||||
.data
|
||||
.align 1
|
||||
.LC29:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC28:
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
102
lcc/x86/linux/tst/cf.1bk
Normal file → Executable file
102
lcc/x86/linux/tst/cf.1bk
Normal file → Executable file
|
@ -1,51 +1,51 @@
|
|||
char freq
|
||||
011 8.1
|
||||
012 6.1
|
||||
040 11.9
|
||||
! 0.2
|
||||
" 1.5
|
||||
% 0.6
|
||||
& 0.4
|
||||
' 0.4
|
||||
( 2.9
|
||||
) 2.9
|
||||
* 0.8
|
||||
+ 1.3
|
||||
, 1.3
|
||||
- 0.4
|
||||
. 0.6
|
||||
/ 1.0
|
||||
0 2.5
|
||||
1 1.9
|
||||
2 0.6
|
||||
3 0.2
|
||||
7 0.4
|
||||
8 0.2
|
||||
; 3.8
|
||||
< 0.8
|
||||
= 2.7
|
||||
> 0.2
|
||||
[ 1.5
|
||||
\ 0.8
|
||||
] 1.5
|
||||
a 3.1
|
||||
c 4.4
|
||||
e 2.3
|
||||
f 6.0
|
||||
g 1.3
|
||||
h 1.0
|
||||
i 5.0
|
||||
l 1.0
|
||||
m 0.2
|
||||
n 3.3
|
||||
o 2.1
|
||||
p 1.0
|
||||
q 0.4
|
||||
r 4.2
|
||||
s 0.6
|
||||
t 3.8
|
||||
u 1.2
|
||||
v 0.6
|
||||
w 0.2
|
||||
{ 0.6
|
||||
} 0.6
|
||||
char freq
|
||||
011 8.1
|
||||
012 6.1
|
||||
040 11.9
|
||||
! 0.2
|
||||
" 1.5
|
||||
% 0.6
|
||||
& 0.4
|
||||
' 0.4
|
||||
( 2.9
|
||||
) 2.9
|
||||
* 0.8
|
||||
+ 1.3
|
||||
, 1.3
|
||||
- 0.4
|
||||
. 0.6
|
||||
/ 1.0
|
||||
0 2.5
|
||||
1 1.9
|
||||
2 0.6
|
||||
3 0.2
|
||||
7 0.4
|
||||
8 0.2
|
||||
; 3.8
|
||||
< 0.8
|
||||
= 2.7
|
||||
> 0.2
|
||||
[ 1.5
|
||||
\ 0.8
|
||||
] 1.5
|
||||
a 3.1
|
||||
c 4.4
|
||||
e 2.3
|
||||
f 6.0
|
||||
g 1.3
|
||||
h 1.0
|
||||
i 5.0
|
||||
l 1.0
|
||||
m 0.2
|
||||
n 3.3
|
||||
o 2.1
|
||||
p 1.0
|
||||
q 0.4
|
||||
r 4.2
|
||||
s 0.6
|
||||
t 3.8
|
||||
u 1.2
|
||||
v 0.6
|
||||
w 0.2
|
||||
{ 0.6
|
||||
} 0.6
|
||||
|
|
0
lcc/x86/linux/tst/cf.2bk
Normal file → Executable file
0
lcc/x86/linux/tst/cf.2bk
Normal file → Executable file
322
lcc/x86/linux/tst/cf.sbk
Normal file → Executable file
322
lcc/x86/linux/tst/cf.sbk
Normal file → Executable file
|
@ -1,161 +1,161 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $24,%esp
|
||||
cmpl $1,20(%ebp)
|
||||
jg .LC2
|
||||
flds .LC4
|
||||
fstps -16(%ebp)
|
||||
jmp .LC3
|
||||
.LC2:
|
||||
movl 24(%ebp),%edi
|
||||
pushl 4(%edi)
|
||||
call atof
|
||||
addl $4,%esp
|
||||
fstps -20(%ebp)
|
||||
flds -20(%ebp)
|
||||
fdivs .LC5
|
||||
fstps -16(%ebp)
|
||||
.LC3:
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-4(%ebp)
|
||||
flds .LC4
|
||||
fstps f(,%edi,4)
|
||||
.LC7:
|
||||
cmpl $127,-4(%ebp)
|
||||
jle .LC6
|
||||
movl $0,-8(%ebp)
|
||||
jmp .LC11
|
||||
.LC10:
|
||||
movl -12(%ebp),%edi
|
||||
leal f(,%edi,4),%edi
|
||||
flds (,%edi)
|
||||
fadds .LC13
|
||||
fstps (,%edi)
|
||||
incl -8(%ebp)
|
||||
.LC11:
|
||||
call getchar
|
||||
movl %eax,-12(%ebp)
|
||||
cmpl $-1,%eax
|
||||
jne .LC10
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC15:
|
||||
movl -4(%ebp),%edi
|
||||
flds f(,%edi,4)
|
||||
fstps -24(%ebp)
|
||||
flds .LC4
|
||||
fcomps -24(%ebp)
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC19
|
||||
flds -24(%ebp)
|
||||
fildl -8(%ebp)
|
||||
fdivp %st(1),%st
|
||||
flds -16(%ebp)
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC19
|
||||
cmpl $32,-4(%ebp)
|
||||
jg .LC21
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC23
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC22
|
||||
.LC21:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC24
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC22:
|
||||
flds .LC5
|
||||
movl -4(%ebp),%edi
|
||||
fmuls f(,%edi,4)
|
||||
fildl -8(%ebp)
|
||||
fdivp %st(1),%st
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC25
|
||||
call printf
|
||||
addl $12,%esp
|
||||
.LC19:
|
||||
.LC16:
|
||||
incl -4(%ebp)
|
||||
cmpl $127,-4(%ebp)
|
||||
jle .LC15
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf26:
|
||||
.size main,.Lf26-main
|
||||
.bss
|
||||
.globl f
|
||||
.align 4
|
||||
.type f,@object
|
||||
.size f,512
|
||||
.comm f,512
|
||||
.data
|
||||
.align 1
|
||||
.LC25:
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 46
|
||||
.byte 49
|
||||
.byte 102
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC24:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC23:
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 51
|
||||
.byte 111
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 99
|
||||
.byte 104
|
||||
.byte 97
|
||||
.byte 114
|
||||
.byte 9
|
||||
.byte 102
|
||||
.byte 114
|
||||
.byte 101
|
||||
.byte 113
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 4
|
||||
.LC13:
|
||||
.long 1065353216
|
||||
.align 4
|
||||
.LC5:
|
||||
.long 1120403456
|
||||
.align 4
|
||||
.LC4:
|
||||
.long 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $24,%esp
|
||||
cmpl $1,20(%ebp)
|
||||
jg .LC2
|
||||
flds .LC4
|
||||
fstps -16(%ebp)
|
||||
jmp .LC3
|
||||
.LC2:
|
||||
movl 24(%ebp),%edi
|
||||
pushl 4(%edi)
|
||||
call atof
|
||||
addl $4,%esp
|
||||
fstps -20(%ebp)
|
||||
flds -20(%ebp)
|
||||
fdivs .LC5
|
||||
fstps -16(%ebp)
|
||||
.LC3:
|
||||
movl $0,-4(%ebp)
|
||||
.LC6:
|
||||
movl -4(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-4(%ebp)
|
||||
flds .LC4
|
||||
fstps f(,%edi,4)
|
||||
.LC7:
|
||||
cmpl $127,-4(%ebp)
|
||||
jle .LC6
|
||||
movl $0,-8(%ebp)
|
||||
jmp .LC11
|
||||
.LC10:
|
||||
movl -12(%ebp),%edi
|
||||
leal f(,%edi,4),%edi
|
||||
flds (,%edi)
|
||||
fadds .LC13
|
||||
fstps (,%edi)
|
||||
incl -8(%ebp)
|
||||
.LC11:
|
||||
call getchar
|
||||
movl %eax,-12(%ebp)
|
||||
cmpl $-1,%eax
|
||||
jne .LC10
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC15:
|
||||
movl -4(%ebp),%edi
|
||||
flds f(,%edi,4)
|
||||
fstps -24(%ebp)
|
||||
flds .LC4
|
||||
fcomps -24(%ebp)
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC19
|
||||
flds -24(%ebp)
|
||||
fildl -8(%ebp)
|
||||
fdivp %st(1),%st
|
||||
flds -16(%ebp)
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC19
|
||||
cmpl $32,-4(%ebp)
|
||||
jg .LC21
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC23
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC22
|
||||
.LC21:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC24
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC22:
|
||||
flds .LC5
|
||||
movl -4(%ebp),%edi
|
||||
fmuls f(,%edi,4)
|
||||
fildl -8(%ebp)
|
||||
fdivp %st(1),%st
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC25
|
||||
call printf
|
||||
addl $12,%esp
|
||||
.LC19:
|
||||
.LC16:
|
||||
incl -4(%ebp)
|
||||
cmpl $127,-4(%ebp)
|
||||
jle .LC15
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf26:
|
||||
.size main,.Lf26-main
|
||||
.bss
|
||||
.globl f
|
||||
.align 4
|
||||
.type f,@object
|
||||
.size f,512
|
||||
.comm f,512
|
||||
.data
|
||||
.align 1
|
||||
.LC25:
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 46
|
||||
.byte 49
|
||||
.byte 102
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC24:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC23:
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 51
|
||||
.byte 111
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 99
|
||||
.byte 104
|
||||
.byte 97
|
||||
.byte 114
|
||||
.byte 9
|
||||
.byte 102
|
||||
.byte 114
|
||||
.byte 101
|
||||
.byte 113
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 4
|
||||
.LC13:
|
||||
.long 1065353216
|
||||
.align 4
|
||||
.LC5:
|
||||
.long 1120403456
|
||||
.align 4
|
||||
.LC4:
|
||||
.long 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
96
lcc/x86/linux/tst/cq.1bk
Normal file → Executable file
96
lcc/x86/linux/tst/cq.1bk
Normal file → Executable file
|
@ -1,48 +1,48 @@
|
|||
Section s22 returned 0.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Section s241 returned 0.
|
||||
Section s243 returned 0.
|
||||
Section s244 returned 0.
|
||||
Section s25 returned 0.
|
||||
8 bits in chars.
|
||||
32 bits in ints.
|
||||
16 bits in shorts.
|
||||
32 bits in longs.
|
||||
32 bits in unsigneds.
|
||||
32 bits in floats.
|
||||
64 bits in doubles.
|
||||
1.192093e-07 is the least number that can be added to 1. (float).
|
||||
2.220446e-16 is the least number that can be added to 1. (double).
|
||||
Section s26 returned 0.
|
||||
Section s4 returned 0.
|
||||
Section s61 returned 0.
|
||||
Section s626 returned 0.
|
||||
Section s71 returned 0.
|
||||
Section s72 returned 0.
|
||||
Section s757 returned 0.
|
||||
Section s7813 returned 0.
|
||||
Section s714 returned 0.
|
||||
Section s715 returned 0.
|
||||
Register count for char is unreliable.
|
||||
Register count for pointer is unreliable.
|
||||
Register count for int is unreliable.
|
||||
Section s81 returned 0.
|
||||
Section s84 returned 0.
|
||||
char alignment: 1
|
||||
short alignment: 2
|
||||
int alignment: 4
|
||||
long alignment: 4
|
||||
unsigned alignment: 4
|
||||
float alignment: 4
|
||||
double alignment: 4
|
||||
Sign extension in fields
|
||||
Be especially careful with 1-bit fields!
|
||||
Section s85 returned 0.
|
||||
Section s86 returned 0.
|
||||
Section s88 returned 0.
|
||||
Section s9 returned 0.
|
||||
|
||||
No errors detected.
|
||||
Section s22 returned 0.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Section s241 returned 0.
|
||||
Section s243 returned 0.
|
||||
Section s244 returned 0.
|
||||
Section s25 returned 0.
|
||||
8 bits in chars.
|
||||
32 bits in ints.
|
||||
16 bits in shorts.
|
||||
32 bits in longs.
|
||||
32 bits in unsigneds.
|
||||
32 bits in floats.
|
||||
64 bits in doubles.
|
||||
1.192093e-07 is the least number that can be added to 1. (float).
|
||||
2.220446e-16 is the least number that can be added to 1. (double).
|
||||
Section s26 returned 0.
|
||||
Section s4 returned 0.
|
||||
Section s61 returned 0.
|
||||
Section s626 returned 0.
|
||||
Section s71 returned 0.
|
||||
Section s72 returned 0.
|
||||
Section s757 returned 0.
|
||||
Section s7813 returned 0.
|
||||
Section s714 returned 0.
|
||||
Section s715 returned 0.
|
||||
Register count for char is unreliable.
|
||||
Register count for pointer is unreliable.
|
||||
Register count for int is unreliable.
|
||||
Section s81 returned 0.
|
||||
Section s84 returned 0.
|
||||
char alignment: 1
|
||||
short alignment: 2
|
||||
int alignment: 4
|
||||
long alignment: 4
|
||||
unsigned alignment: 4
|
||||
float alignment: 4
|
||||
double alignment: 4
|
||||
Sign extension in fields
|
||||
Be especially careful with 1-bit fields!
|
||||
Section s85 returned 0.
|
||||
Section s86 returned 0.
|
||||
Section s88 returned 0.
|
||||
Section s9 returned 0.
|
||||
|
||||
No errors detected.
|
||||
|
|
50
lcc/x86/linux/tst/cq.2bk
Normal file → Executable file
50
lcc/x86/linux/tst/cq.2bk
Normal file → Executable file
|
@ -1,25 +1,25 @@
|
|||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `4294967296'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `040000000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `0x100000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `68719476735'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0777777777777'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0xfffffffff'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `68719476736'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `01000000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `0x1000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:533: warning: missing return value
|
||||
tst/cq.c:1169: warning: missing return value
|
||||
tst/cq.c:5294: warning: unreachable code
|
||||
tst/cq.c:5303: warning: missing return value
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `4294967296'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `040000000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `0x100000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `68719476735'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0777777777777'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0xfffffffff'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `68719476736'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `01000000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `0x1000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:533: warning: missing return value
|
||||
tst/cq.c:1169: warning: missing return value
|
||||
tst/cq.c:5294: warning: unreachable code
|
||||
tst/cq.c:5303: warning: missing return value
|
||||
|
|
31512
lcc/x86/linux/tst/cq.sbk
Normal file → Executable file
31512
lcc/x86/linux/tst/cq.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
22
lcc/x86/linux/tst/cvt.1bk
Normal file → Executable file
22
lcc/x86/linux/tst/cvt.1bk
Normal file → Executable file
|
@ -1,11 +1,11 @@
|
|||
1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
|
||||
2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
|
||||
3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
|
||||
4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
|
||||
5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
|
||||
6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
|
||||
7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
|
||||
8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
|
||||
9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
|
||||
10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
|
||||
11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
|
||||
1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
|
||||
2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
|
||||
3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
|
||||
4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
|
||||
5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
|
||||
6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
|
||||
7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
|
||||
8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
|
||||
9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
|
||||
10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
|
||||
11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
|
||||
|
|
4
lcc/x86/linux/tst/cvt.2bk
Normal file → Executable file
4
lcc/x86/linux/tst/cvt.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
|
||||
tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
|
||||
tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
|
||||
tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
|
||||
|
|
1584
lcc/x86/linux/tst/cvt.sbk
Normal file → Executable file
1584
lcc/x86/linux/tst/cvt.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
10
lcc/x86/linux/tst/fields.1bk
Normal file → Executable file
10
lcc/x86/linux/tst/fields.1bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
x = 1 2 3 4 -3 6
|
||||
y = 3 8 9
|
||||
x = 1 2 3 0 0 6
|
||||
y = 2 8 16
|
||||
p->a = 0x3, p->b = 0xf
|
||||
x = 1 2 3 4 -3 6
|
||||
y = 3 8 9
|
||||
x = 1 2 3 0 0 6
|
||||
y = 2 8 16
|
||||
p->a = 0x3, p->b = 0xf
|
||||
|
|
8
lcc/x86/linux/tst/fields.2bk
Normal file → Executable file
8
lcc/x86/linux/tst/fields.2bk
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
tst/fields.c:6: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:8: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:30: warning: missing return value
|
||||
tst/fields.c:34: warning: missing return value
|
||||
tst/fields.c:6: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:8: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:30: warning: missing return value
|
||||
tst/fields.c:34: warning: missing return value
|
||||
|
|
642
lcc/x86/linux/tst/fields.sbk
Normal file → Executable file
642
lcc/x86/linux/tst/fields.sbk
Normal file → Executable file
|
@ -1,321 +1,321 @@
|
|||
.data
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,16
|
||||
x:
|
||||
.long 1
|
||||
.byte 2
|
||||
.space 3
|
||||
.byte 3
|
||||
.byte 64
|
||||
.space 2
|
||||
.byte 80
|
||||
.byte 6
|
||||
.space 2
|
||||
.globl i
|
||||
.align 4
|
||||
.type i,@object
|
||||
.size i,4
|
||||
i:
|
||||
.long 16
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,8
|
||||
y:
|
||||
.byte 35
|
||||
.space 3
|
||||
.byte 9
|
||||
.byte 0
|
||||
.byte 0
|
||||
.byte 0
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movsbl x+13,%edi
|
||||
pushl %edi
|
||||
movl x+12,%edi
|
||||
sall $25,%edi
|
||||
sarl $29,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $16,%edi
|
||||
sarl $28,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $20,%edi
|
||||
sarl $20,%edi
|
||||
pushl %edi
|
||||
movsbl x+4,%edi
|
||||
pushl %edi
|
||||
pushl x
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $28,%esp
|
||||
pushl y+4
|
||||
movl y,%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $16,%esp
|
||||
movl x+8,%edi
|
||||
andl $0xffff0fff,%edi
|
||||
movl i,%esi
|
||||
sall $28,%esi
|
||||
sarl $28,%esi
|
||||
shll $12,%esi
|
||||
andl $0xf000,%esi
|
||||
orl %esi,%edi
|
||||
movl %edi,x+8
|
||||
movl x+12,%edi
|
||||
andl $0xffffff8f,%edi
|
||||
movl %edi,x+12
|
||||
movsbl x+13,%edi
|
||||
pushl %edi
|
||||
movl x+12,%edi
|
||||
sall $25,%edi
|
||||
sarl $29,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $16,%edi
|
||||
sarl $28,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $20,%edi
|
||||
sarl $20,%edi
|
||||
pushl %edi
|
||||
movsbl x+4,%edi
|
||||
pushl %edi
|
||||
pushl x
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $28,%esp
|
||||
movl y,%edi
|
||||
andl $0xfffffffc,%edi
|
||||
orl $2,%edi
|
||||
movl %edi,y
|
||||
movl i,%edi
|
||||
movl %edi,y+4
|
||||
pushl y+4
|
||||
movl y,%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $16,%esp
|
||||
pushl $x
|
||||
call f2
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf21:
|
||||
.size main,.Lf21-main
|
||||
.globl f1
|
||||
.align 16
|
||||
.type f1,@function
|
||||
f1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
andl $0xffffffc3,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
andl $0xfffffffc,%esi
|
||||
movl $0,%ebx
|
||||
andl $3,%ebx
|
||||
andl $3,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
andl $60,%edi
|
||||
cmpl $0,%edi
|
||||
je .LC23
|
||||
pushl $.LC25
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC23:
|
||||
movl 20(%ebp),%edi
|
||||
orl $3,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
orl $60,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC22:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf27:
|
||||
.size f1,.Lf27-f1
|
||||
.globl f2
|
||||
.align 16
|
||||
.type f2,@function
|
||||
f2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
cmpl $0,i
|
||||
jne .LC30
|
||||
movl $1,-4(%ebp)
|
||||
jmp .LC31
|
||||
.LC30:
|
||||
movl $0,-4(%ebp)
|
||||
.LC31:
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
andl $0xfffffffc,%esi
|
||||
movl -4(%ebp),%ebx
|
||||
andl $3,%ebx
|
||||
andl $3,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
pushl %edi
|
||||
call f1
|
||||
addl $4,%esp
|
||||
movl (,%edi),%esi
|
||||
andl $0xffffffc3,%esi
|
||||
movl $0,%ebx
|
||||
andl $15,%ebx
|
||||
leal (,%ebx,4),%ebx
|
||||
andl $60,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC28:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf32:
|
||||
.size f2,.Lf32-f2
|
||||
.data
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 97
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 44
|
||||
.byte 32
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC25:
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 33
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 33
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC10:
|
||||
.byte 121
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.data
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,16
|
||||
x:
|
||||
.long 1
|
||||
.byte 2
|
||||
.space 3
|
||||
.byte 3
|
||||
.byte 64
|
||||
.space 2
|
||||
.byte 80
|
||||
.byte 6
|
||||
.space 2
|
||||
.globl i
|
||||
.align 4
|
||||
.type i,@object
|
||||
.size i,4
|
||||
i:
|
||||
.long 16
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,8
|
||||
y:
|
||||
.byte 35
|
||||
.space 3
|
||||
.byte 9
|
||||
.byte 0
|
||||
.byte 0
|
||||
.byte 0
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movsbl x+13,%edi
|
||||
pushl %edi
|
||||
movl x+12,%edi
|
||||
sall $25,%edi
|
||||
sarl $29,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $16,%edi
|
||||
sarl $28,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $20,%edi
|
||||
sarl $20,%edi
|
||||
pushl %edi
|
||||
movsbl x+4,%edi
|
||||
pushl %edi
|
||||
pushl x
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $28,%esp
|
||||
pushl y+4
|
||||
movl y,%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $16,%esp
|
||||
movl x+8,%edi
|
||||
andl $0xffff0fff,%edi
|
||||
movl i,%esi
|
||||
sall $28,%esi
|
||||
sarl $28,%esi
|
||||
shll $12,%esi
|
||||
andl $0xf000,%esi
|
||||
orl %esi,%edi
|
||||
movl %edi,x+8
|
||||
movl x+12,%edi
|
||||
andl $0xffffff8f,%edi
|
||||
movl %edi,x+12
|
||||
movsbl x+13,%edi
|
||||
pushl %edi
|
||||
movl x+12,%edi
|
||||
sall $25,%edi
|
||||
sarl $29,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $16,%edi
|
||||
sarl $28,%edi
|
||||
pushl %edi
|
||||
movl x+8,%edi
|
||||
sall $20,%edi
|
||||
sarl $20,%edi
|
||||
pushl %edi
|
||||
movsbl x+4,%edi
|
||||
pushl %edi
|
||||
pushl x
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $28,%esp
|
||||
movl y,%edi
|
||||
andl $0xfffffffc,%edi
|
||||
orl $2,%edi
|
||||
movl %edi,y
|
||||
movl i,%edi
|
||||
movl %edi,y+4
|
||||
pushl y+4
|
||||
movl y,%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $16,%esp
|
||||
pushl $x
|
||||
call f2
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf21:
|
||||
.size main,.Lf21-main
|
||||
.globl f1
|
||||
.align 16
|
||||
.type f1,@function
|
||||
f1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
andl $0xffffffc3,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
andl $0xfffffffc,%esi
|
||||
movl $0,%ebx
|
||||
andl $3,%ebx
|
||||
andl $3,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
andl $60,%edi
|
||||
cmpl $0,%edi
|
||||
je .LC23
|
||||
pushl $.LC25
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC23:
|
||||
movl 20(%ebp),%edi
|
||||
orl $3,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
orl $60,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
movl %edi,%esi
|
||||
shrl $2,%esi
|
||||
andl $15,%esi
|
||||
pushl %esi
|
||||
andl $3,%edi
|
||||
pushl %edi
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC22:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf27:
|
||||
.size f1,.Lf27-f1
|
||||
.globl f2
|
||||
.align 16
|
||||
.type f2,@function
|
||||
f2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
cmpl $0,i
|
||||
jne .LC30
|
||||
movl $1,-4(%ebp)
|
||||
jmp .LC31
|
||||
.LC30:
|
||||
movl $0,-4(%ebp)
|
||||
.LC31:
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
andl $0xfffffffc,%esi
|
||||
movl -4(%ebp),%ebx
|
||||
andl $3,%ebx
|
||||
andl $3,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 20(%ebp),%edi
|
||||
pushl %edi
|
||||
call f1
|
||||
addl $4,%esp
|
||||
movl (,%edi),%esi
|
||||
andl $0xffffffc3,%esi
|
||||
movl $0,%ebx
|
||||
andl $15,%ebx
|
||||
leal (,%ebx,4),%ebx
|
||||
andl $60,%ebx
|
||||
orl %ebx,%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC28:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf32:
|
||||
.size f2,.Lf32-f2
|
||||
.data
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 97
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 44
|
||||
.byte 32
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC25:
|
||||
.byte 112
|
||||
.byte 45
|
||||
.byte 62
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 33
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 33
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC10:
|
||||
.byte 121
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
58
lcc/x86/linux/tst/front.2bk
Normal file → Executable file
58
lcc/x86/linux/tst/front.2bk
Normal file → Executable file
|
@ -1,29 +1,29 @@
|
|||
tst/front.c:3: warning: missing return value
|
||||
tst/front.c:10: warning: missing return value
|
||||
tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14'
|
||||
tst/front.c:21: warning: missing return value
|
||||
tst/front.c:32: warning: missing return value
|
||||
tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int'
|
||||
tst/front.c:38: warning: missing return value
|
||||
tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void'
|
||||
tst/front.c:63: warning: missing return value
|
||||
tst/front.c:68: warning: missing return value
|
||||
tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68
|
||||
tst/front.c:69: warning: missing return value
|
||||
tst/front.c:71: invalid storage class `static' for `int function goo'
|
||||
tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70
|
||||
tst/front.c:71: warning: missing return value
|
||||
tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72
|
||||
tst/front.c:74: warning: missing return value
|
||||
tst/front.c:81: warning: missing return value
|
||||
tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81
|
||||
tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80
|
||||
tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double'
|
||||
tst/front.c:92: warning: missing return value
|
||||
tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94
|
||||
tst/front.c:98: warning: missing return value
|
||||
tst/front.c:101: conflicting argument declarations for function `gg1'
|
||||
tst/front.c:101: warning: missing return value
|
||||
tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)'
|
||||
tst/front.c:113: warning: missing return value
|
||||
tst/front.c:120: warning: missing return value
|
||||
tst/front.c:3: warning: missing return value
|
||||
tst/front.c:10: warning: missing return value
|
||||
tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14'
|
||||
tst/front.c:21: warning: missing return value
|
||||
tst/front.c:32: warning: missing return value
|
||||
tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int'
|
||||
tst/front.c:38: warning: missing return value
|
||||
tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void'
|
||||
tst/front.c:63: warning: missing return value
|
||||
tst/front.c:68: warning: missing return value
|
||||
tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68
|
||||
tst/front.c:69: warning: missing return value
|
||||
tst/front.c:71: invalid storage class `static' for `int function goo'
|
||||
tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70
|
||||
tst/front.c:71: warning: missing return value
|
||||
tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72
|
||||
tst/front.c:74: warning: missing return value
|
||||
tst/front.c:81: warning: missing return value
|
||||
tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81
|
||||
tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80
|
||||
tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double'
|
||||
tst/front.c:92: warning: missing return value
|
||||
tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94
|
||||
tst/front.c:98: warning: missing return value
|
||||
tst/front.c:101: conflicting argument declarations for function `gg1'
|
||||
tst/front.c:101: warning: missing return value
|
||||
tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)'
|
||||
tst/front.c:113: warning: missing return value
|
||||
tst/front.c:120: warning: missing return value
|
||||
|
|
1060
lcc/x86/linux/tst/front.sbk
Normal file → Executable file
1060
lcc/x86/linux/tst/front.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
0
lcc/x86/linux/tst/incr.1bk
Normal file → Executable file
0
lcc/x86/linux/tst/incr.1bk
Normal file → Executable file
18
lcc/x86/linux/tst/incr.2bk
Normal file → Executable file
18
lcc/x86/linux/tst/incr.2bk
Normal file → Executable file
|
@ -1,9 +1,9 @@
|
|||
tst/incr.c:1: warning: missing return value
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:11: warning: missing return value
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:21: warning: missing return value
|
||||
tst/incr.c:30: warning: missing return value
|
||||
tst/incr.c:39: warning: missing return value
|
||||
tst/incr.c:1: warning: missing return value
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:11: warning: missing return value
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:21: warning: missing return value
|
||||
tst/incr.c:30: warning: missing return value
|
||||
tst/incr.c:39: warning: missing return value
|
||||
|
|
362
lcc/x86/linux/tst/incr.sbk
Normal file → Executable file
362
lcc/x86/linux/tst/incr.sbk
Normal file → Executable file
|
@ -1,181 +1,181 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf2:
|
||||
.size main,.Lf2-main
|
||||
.globl memchar
|
||||
.align 16
|
||||
.type memchar,@function
|
||||
memchar:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf4:
|
||||
.size memchar,.Lf4-memchar
|
||||
.globl memint
|
||||
.align 16
|
||||
.type memint,@function
|
||||
memint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl $0,%eax
|
||||
.LC5:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf6:
|
||||
.size memint,.Lf6-memint
|
||||
.globl regchar
|
||||
.align 16
|
||||
.type regchar,@function
|
||||
regchar:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl $0,%eax
|
||||
.LC7:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf8:
|
||||
.size regchar,.Lf8-regchar
|
||||
.globl regint
|
||||
.align 16
|
||||
.type regint,@function
|
||||
regint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl $0,%eax
|
||||
.LC9:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf10:
|
||||
.size regint,.Lf10-regint
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf2:
|
||||
.size main,.Lf2-main
|
||||
.globl memchar
|
||||
.align 16
|
||||
.type memchar,@function
|
||||
memchar:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf4:
|
||||
.size memchar,.Lf4-memchar
|
||||
.globl memint
|
||||
.align 16
|
||||
.type memint,@function
|
||||
memint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl $0,%eax
|
||||
.LC5:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf6:
|
||||
.size memint,.Lf6-memint
|
||||
.globl regchar
|
||||
.align 16
|
||||
.type regchar,@function
|
||||
regchar:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -1(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movb (,%edi),%bl
|
||||
movb %bl,-1(%ebp)
|
||||
movl $0,%eax
|
||||
.LC7:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf8:
|
||||
.size regchar,.Lf8-regchar
|
||||
.globl regint
|
||||
.align 16
|
||||
.type regint,@function
|
||||
regint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
leal -4(%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl (,%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl $0,%eax
|
||||
.LC9:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf10:
|
||||
.size regint,.Lf10-regint
|
||||
.ident "LCC: 4.1"
|
||||
|
|
32
lcc/x86/linux/tst/init.1bk
Normal file → Executable file
32
lcc/x86/linux/tst/init.1bk
Normal file → Executable file
|
@ -1,16 +1,16 @@
|
|||
1 2 3 4
|
||||
5 6
|
||||
7
|
||||
if
|
||||
for
|
||||
else
|
||||
while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
0 0 0
|
||||
1 2 3 4
|
||||
5 6
|
||||
7
|
||||
if
|
||||
for
|
||||
else
|
||||
while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
0 0 0
|
||||
|
|
6
lcc/x86/linux/tst/init.2bk
Normal file → Executable file
6
lcc/x86/linux/tst/init.2bk
Normal file → Executable file
|
@ -1,3 +1,3 @@
|
|||
tst/init.c:36: warning: missing return value
|
||||
tst/init.c:49: warning: missing return value
|
||||
tst/init.c:59: warning: missing return value
|
||||
tst/init.c:36: warning: missing return value
|
||||
tst/init.c:49: warning: missing return value
|
||||
tst/init.c:59: warning: missing return value
|
||||
|
|
672
lcc/x86/linux/tst/init.sbk
Normal file → Executable file
672
lcc/x86/linux/tst/init.sbk
Normal file → Executable file
|
@ -1,336 +1,336 @@
|
|||
.data
|
||||
.globl words
|
||||
.align 4
|
||||
.type words,@object
|
||||
words:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.byte 105
|
||||
.byte 102
|
||||
.byte 0
|
||||
.space 3
|
||||
.space 2
|
||||
.long 4
|
||||
.long 5
|
||||
.space 4
|
||||
.byte 102
|
||||
.byte 111
|
||||
.byte 114
|
||||
.space 3
|
||||
.space 2
|
||||
.long 6
|
||||
.long 7
|
||||
.long 8
|
||||
.byte 101
|
||||
.byte 108
|
||||
.byte 115
|
||||
.byte 101
|
||||
.byte 0
|
||||
.space 1
|
||||
.space 2
|
||||
.long 9
|
||||
.long 10
|
||||
.long 11
|
||||
.byte 119
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 108
|
||||
.byte 101
|
||||
.space 1
|
||||
.space 2
|
||||
.long 0
|
||||
.space 8
|
||||
.space 8
|
||||
.size words,100
|
||||
.globl wordlist
|
||||
.align 4
|
||||
.type wordlist,@object
|
||||
.size wordlist,4
|
||||
wordlist:
|
||||
.long words
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
x:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.long 4
|
||||
.long 0
|
||||
.long 5
|
||||
.long 6
|
||||
.space 12
|
||||
.long 7
|
||||
.space 16
|
||||
.size x,60
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
y:
|
||||
.long x
|
||||
.long x+20
|
||||
.long x+40
|
||||
.long 0
|
||||
.size y,16
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
jmp .LC8
|
||||
.LC5:
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC12
|
||||
.LC9:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC13
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC10:
|
||||
incl -4(%ebp)
|
||||
.LC12:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
cmpl $0,(%esi,%edi,4)
|
||||
jne .LC9
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC6:
|
||||
incl -8(%ebp)
|
||||
.LC8:
|
||||
movl -8(%ebp),%edi
|
||||
movl y(,%edi,4),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC5
|
||||
call f
|
||||
pushl wordlist
|
||||
call g
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC4:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf15:
|
||||
.size main,.Lf15-main
|
||||
.data
|
||||
.align 4
|
||||
.type keywords.17,@object
|
||||
keywords.17:
|
||||
.long .LC18
|
||||
.long .LC19
|
||||
.long .LC20
|
||||
.long .LC21
|
||||
.long 0
|
||||
.size keywords.17,20
|
||||
.globl f
|
||||
.text
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
leal keywords.17,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC25
|
||||
.LC22:
|
||||
movl -4(%ebp),%edi
|
||||
pushl (,%edi)
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC23:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC22
|
||||
movl $0,%eax
|
||||
.LC16:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf27:
|
||||
.size f,.Lf27-f
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
jmp .LC32
|
||||
.LC29:
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC36
|
||||
.LC33:
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC37
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC34:
|
||||
incl -4(%ebp)
|
||||
.LC36:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $3,%edi
|
||||
jb .LC33
|
||||
movl 20(%ebp),%edi
|
||||
leal 12(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC30:
|
||||
movl 20(%ebp),%edi
|
||||
leal 20(%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
.LC32:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $0,(,%edi)
|
||||
jne .LC29
|
||||
call h
|
||||
movl $0,%eax
|
||||
.LC28:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf38:
|
||||
.size g,.Lf38-g
|
||||
.globl h
|
||||
.align 16
|
||||
.type h,@function
|
||||
h:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC43
|
||||
.LC40:
|
||||
imul $20,-4(%ebp),%edi
|
||||
leal words+12(%edi),%esi
|
||||
pushl %esi
|
||||
pushl words+8(%edi)
|
||||
pushl words+4(%edi)
|
||||
pushl words(%edi)
|
||||
pushl $.LC44
|
||||
call printf
|
||||
addl $20,%esp
|
||||
.LC41:
|
||||
incl -4(%ebp)
|
||||
.LC43:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $5,%edi
|
||||
jb .LC40
|
||||
movl $0,%eax
|
||||
.LC39:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf48:
|
||||
.size h,.Lf48-h
|
||||
.data
|
||||
.align 1
|
||||
.LC44:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC37:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC21:
|
||||
.byte 119
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 108
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC20:
|
||||
.byte 101
|
||||
.byte 108
|
||||
.byte 115
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC19:
|
||||
.byte 102
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC18:
|
||||
.byte 105
|
||||
.byte 102
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC13:
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.data
|
||||
.globl words
|
||||
.align 4
|
||||
.type words,@object
|
||||
words:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.byte 105
|
||||
.byte 102
|
||||
.byte 0
|
||||
.space 3
|
||||
.space 2
|
||||
.long 4
|
||||
.long 5
|
||||
.space 4
|
||||
.byte 102
|
||||
.byte 111
|
||||
.byte 114
|
||||
.space 3
|
||||
.space 2
|
||||
.long 6
|
||||
.long 7
|
||||
.long 8
|
||||
.byte 101
|
||||
.byte 108
|
||||
.byte 115
|
||||
.byte 101
|
||||
.byte 0
|
||||
.space 1
|
||||
.space 2
|
||||
.long 9
|
||||
.long 10
|
||||
.long 11
|
||||
.byte 119
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 108
|
||||
.byte 101
|
||||
.space 1
|
||||
.space 2
|
||||
.long 0
|
||||
.space 8
|
||||
.space 8
|
||||
.size words,100
|
||||
.globl wordlist
|
||||
.align 4
|
||||
.type wordlist,@object
|
||||
.size wordlist,4
|
||||
wordlist:
|
||||
.long words
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
x:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.long 4
|
||||
.long 0
|
||||
.long 5
|
||||
.long 6
|
||||
.space 12
|
||||
.long 7
|
||||
.space 16
|
||||
.size x,60
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
y:
|
||||
.long x
|
||||
.long x+20
|
||||
.long x+40
|
||||
.long 0
|
||||
.size y,16
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
jmp .LC8
|
||||
.LC5:
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC12
|
||||
.LC9:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC13
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC10:
|
||||
incl -4(%ebp)
|
||||
.LC12:
|
||||
movl -4(%ebp),%edi
|
||||
movl -8(%ebp),%esi
|
||||
movl y(,%esi,4),%esi
|
||||
cmpl $0,(%esi,%edi,4)
|
||||
jne .LC9
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC6:
|
||||
incl -8(%ebp)
|
||||
.LC8:
|
||||
movl -8(%ebp),%edi
|
||||
movl y(,%edi,4),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC5
|
||||
call f
|
||||
pushl wordlist
|
||||
call g
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC4:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf15:
|
||||
.size main,.Lf15-main
|
||||
.data
|
||||
.align 4
|
||||
.type keywords.17,@object
|
||||
keywords.17:
|
||||
.long .LC18
|
||||
.long .LC19
|
||||
.long .LC20
|
||||
.long .LC21
|
||||
.long 0
|
||||
.size keywords.17,20
|
||||
.globl f
|
||||
.text
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
leal keywords.17,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC25
|
||||
.LC22:
|
||||
movl -4(%ebp),%edi
|
||||
pushl (,%edi)
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC23:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC22
|
||||
movl $0,%eax
|
||||
.LC16:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf27:
|
||||
.size f,.Lf27-f
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
jmp .LC32
|
||||
.LC29:
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC36
|
||||
.LC33:
|
||||
movl -4(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
pushl (%esi,%edi,4)
|
||||
pushl $.LC37
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC34:
|
||||
incl -4(%ebp)
|
||||
.LC36:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $3,%edi
|
||||
jb .LC33
|
||||
movl 20(%ebp),%edi
|
||||
leal 12(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC30:
|
||||
movl 20(%ebp),%edi
|
||||
leal 20(%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
.LC32:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $0,(,%edi)
|
||||
jne .LC29
|
||||
call h
|
||||
movl $0,%eax
|
||||
.LC28:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf38:
|
||||
.size g,.Lf38-g
|
||||
.globl h
|
||||
.align 16
|
||||
.type h,@function
|
||||
h:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC43
|
||||
.LC40:
|
||||
imul $20,-4(%ebp),%edi
|
||||
leal words+12(%edi),%esi
|
||||
pushl %esi
|
||||
pushl words+8(%edi)
|
||||
pushl words+4(%edi)
|
||||
pushl words(%edi)
|
||||
pushl $.LC44
|
||||
call printf
|
||||
addl $20,%esp
|
||||
.LC41:
|
||||
incl -4(%ebp)
|
||||
.LC43:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $5,%edi
|
||||
jb .LC40
|
||||
movl $0,%eax
|
||||
.LC39:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf48:
|
||||
.size h,.Lf48-h
|
||||
.data
|
||||
.align 1
|
||||
.LC44:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC37:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC21:
|
||||
.byte 119
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 108
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC20:
|
||||
.byte 101
|
||||
.byte 108
|
||||
.byte 115
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC19:
|
||||
.byte 102
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC18:
|
||||
.byte 105
|
||||
.byte 102
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC13:
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
28
lcc/x86/linux/tst/limits.1bk
Normal file → Executable file
28
lcc/x86/linux/tst/limits.1bk
Normal file → Executable file
|
@ -1,14 +1,14 @@
|
|||
UCHAR_MAX: 000000ff=255
|
||||
USHRT_MAX: 0000ffff=65535
|
||||
UINT_MAX: ffffffff=-1
|
||||
ULONG_MAX: ffffffff=-1
|
||||
CHAR_MAX: 0000007f=127
|
||||
SCHAR_MAX: 0000007f=127
|
||||
SHRT_MAX: 00007fff=32767
|
||||
INT_MAX: 7fffffff=2147483647
|
||||
LONG_MAX: 7fffffff=2147483647
|
||||
CHAR_MIN: ffffff80=-128
|
||||
SCHAR_MIN: ffffff80=-128
|
||||
SHRT_MIN: ffff8000=-32768
|
||||
INT_MIN: 80000000=-2147483648
|
||||
LONG_MIN: 80000000=-2147483648
|
||||
UCHAR_MAX: 000000ff=255
|
||||
USHRT_MAX: 0000ffff=65535
|
||||
UINT_MAX: ffffffff=-1
|
||||
ULONG_MAX: ffffffff=-1
|
||||
CHAR_MAX: 0000007f=127
|
||||
SCHAR_MAX: 0000007f=127
|
||||
SHRT_MAX: 00007fff=32767
|
||||
INT_MAX: 7fffffff=2147483647
|
||||
LONG_MAX: 7fffffff=2147483647
|
||||
CHAR_MIN: ffffff80=-128
|
||||
SCHAR_MIN: ffffff80=-128
|
||||
SHRT_MIN: ffff8000=-32768
|
||||
INT_MIN: 80000000=-2147483648
|
||||
LONG_MIN: 80000000=-2147483648
|
||||
|
|
0
lcc/x86/linux/tst/limits.2bk
Normal file → Executable file
0
lcc/x86/linux/tst/limits.2bk
Normal file → Executable file
792
lcc/x86/linux/tst/limits.sbk
Normal file → Executable file
792
lcc/x86/linux/tst/limits.sbk
Normal file → Executable file
|
@ -1,396 +1,396 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
pushl $255
|
||||
pushl $255
|
||||
pushl $.LC2
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $65535
|
||||
pushl $65535
|
||||
pushl $.LC3
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $0xffffffff
|
||||
pushl $0xffffffff
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $0xffffffff
|
||||
pushl $0xffffffff
|
||||
pushl $.LC5
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $127
|
||||
pushl $127
|
||||
pushl $.LC6
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $127
|
||||
pushl $127
|
||||
pushl $.LC7
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $32767
|
||||
pushl $32767
|
||||
pushl $.LC8
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $2147483647
|
||||
pushl $2147483647
|
||||
pushl $.LC9
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $2147483647
|
||||
pushl $2147483647
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-128
|
||||
pushl $-128
|
||||
pushl $.LC11
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-128
|
||||
pushl $-128
|
||||
pushl $.LC12
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-32768
|
||||
pushl $-32768
|
||||
pushl $.LC13
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-2147483648
|
||||
pushl $-2147483648
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-2147483648
|
||||
pushl $-2147483648
|
||||
pushl $.LC15
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf16:
|
||||
.size main,.Lf16-main
|
||||
.data
|
||||
.align 1
|
||||
.LC15:
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC13:
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC12:
|
||||
.byte 83
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC11:
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC10:
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC9:
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC8:
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 83
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC6:
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC5:
|
||||
.byte 85
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 85
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC3:
|
||||
.byte 85
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC2:
|
||||
.byte 85
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
pushl $255
|
||||
pushl $255
|
||||
pushl $.LC2
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $65535
|
||||
pushl $65535
|
||||
pushl $.LC3
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $0xffffffff
|
||||
pushl $0xffffffff
|
||||
pushl $.LC4
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $0xffffffff
|
||||
pushl $0xffffffff
|
||||
pushl $.LC5
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $127
|
||||
pushl $127
|
||||
pushl $.LC6
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $127
|
||||
pushl $127
|
||||
pushl $.LC7
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $32767
|
||||
pushl $32767
|
||||
pushl $.LC8
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $2147483647
|
||||
pushl $2147483647
|
||||
pushl $.LC9
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $2147483647
|
||||
pushl $2147483647
|
||||
pushl $.LC10
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-128
|
||||
pushl $-128
|
||||
pushl $.LC11
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-128
|
||||
pushl $-128
|
||||
pushl $.LC12
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-32768
|
||||
pushl $-32768
|
||||
pushl $.LC13
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-2147483648
|
||||
pushl $-2147483648
|
||||
pushl $.LC14
|
||||
call printf
|
||||
addl $12,%esp
|
||||
pushl $-2147483648
|
||||
pushl $-2147483648
|
||||
pushl $.LC15
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf16:
|
||||
.size main,.Lf16-main
|
||||
.data
|
||||
.align 1
|
||||
.LC15:
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC14:
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC13:
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC12:
|
||||
.byte 83
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC11:
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC10:
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC9:
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC8:
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 83
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC6:
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC5:
|
||||
.byte 85
|
||||
.byte 76
|
||||
.byte 79
|
||||
.byte 78
|
||||
.byte 71
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 108
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 85
|
||||
.byte 73
|
||||
.byte 78
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC3:
|
||||
.byte 85
|
||||
.byte 83
|
||||
.byte 72
|
||||
.byte 82
|
||||
.byte 84
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC2:
|
||||
.byte 85
|
||||
.byte 67
|
||||
.byte 72
|
||||
.byte 65
|
||||
.byte 82
|
||||
.byte 95
|
||||
.byte 77
|
||||
.byte 65
|
||||
.byte 88
|
||||
.byte 58
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 48
|
||||
.byte 56
|
||||
.byte 120
|
||||
.byte 61
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
366
lcc/x86/linux/tst/paranoia.1bk
Normal file → Executable file
366
lcc/x86/linux/tst/paranoia.1bk
Normal file → Executable file
|
@ -1,183 +1,183 @@
|
|||
Lest this program stop prematurely, i.e. before displaying
|
||||
|
||||
`END OF TEST',
|
||||
|
||||
try to persuade the computer NOT to terminate execution when an
|
||||
error like Over/Underflow or Division by Zero occurs, but rather
|
||||
to persevere with a surrogate value after, perhaps, displaying some
|
||||
warning. If persuasion avails naught, don't despair but run this
|
||||
program anyway to see how many milestones it passes, and then
|
||||
amend it to make further progress.
|
||||
|
||||
Answer questions with Y, y, N or n (unless otherwise indicated).
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 0 Page: 1
|
||||
|
||||
Users are invited to help debug and augment this program so it will
|
||||
cope with unanticipated and newly uncovered arithmetic pathologies.
|
||||
|
||||
Please send suggestions and interesting results to
|
||||
Richard Karpinski
|
||||
Computer Center U-76
|
||||
University of California
|
||||
San Francisco, CA 94143-0704, USA
|
||||
|
||||
In doing so, please include the following information:
|
||||
Precision: double;
|
||||
Version: 10 February 1989;
|
||||
Computer:
|
||||
|
||||
Compiler:
|
||||
|
||||
Optimization level:
|
||||
|
||||
Other relevant compiler options:
|
||||
|
||||
Diagnosis resumes after milestone Number 1 Page: 2
|
||||
|
||||
Running this program should reveal these characteristics:
|
||||
Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...
|
||||
Precision = number of significant digits carried.
|
||||
U2 = Radix/Radix^Precision = One Ulp
|
||||
(OneUlpnit in the Last Place) of 1.000xxx .
|
||||
U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .
|
||||
Adequacy of guard digits for Mult., Div. and Subt.
|
||||
Whether arithmetic is chopped, correctly rounded, or something else
|
||||
for Mult., Div., Add/Subt. and Sqrt.
|
||||
Whether a Sticky Bit used correctly for rounding.
|
||||
UnderflowThreshold = an underflow threshold.
|
||||
E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.
|
||||
V = an overflow threshold, roughly.
|
||||
V0 tells, roughly, whether Infinity is represented.
|
||||
Comparisions are checked for consistency with subtraction
|
||||
and for contamination with pseudo-zeros.
|
||||
Sqrt is tested. Y^X is not tested.
|
||||
Extra-precise subexpressions are revealed but NOT YET tested.
|
||||
Decimal-Binary conversion is NOT YET tested for accuracy.
|
||||
|
||||
Diagnosis resumes after milestone Number 2 Page: 3
|
||||
|
||||
The program attempts to discriminate among
|
||||
FLAWs, like lack of a sticky bit,
|
||||
Serious DEFECTs, like lack of a guard digit, and
|
||||
FAILUREs, like 2+2 == 5 .
|
||||
Failures may confound subsequent diagnoses.
|
||||
|
||||
The diagnostic capabilities of this program go beyond an earlier
|
||||
program called `MACHAR', which can be found at the end of the
|
||||
book `Software Manual for the Elementary Functions' (1980) by
|
||||
W. J. Cody and W. Waite. Although both programs try to discover
|
||||
the Radix, Precision and range (over/underflow thresholds)
|
||||
of the arithmetic, this program tries to cope with a wider variety
|
||||
of pathologies, and to say how well the arithmetic is implemented.
|
||||
|
||||
The program is based upon a conventional radix representation for
|
||||
floating-point numbers, but also allows logarithmic encoding
|
||||
as used by certain early WANG machines.
|
||||
|
||||
BASIC version of this program (C) 1983 by Prof. W. M. Kahan;
|
||||
see source comments for more history.
|
||||
|
||||
Diagnosis resumes after milestone Number 3 Page: 4
|
||||
|
||||
Program is now RUNNING tests on small integers:
|
||||
-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.
|
||||
|
||||
Searching for Radix and Precision.
|
||||
Radix = 2.000000 .
|
||||
Closest relative separation found is U1 = 1.1102230e-16 .
|
||||
|
||||
Recalculating radix and precision
|
||||
confirms closest relative separation U1 .
|
||||
Radix confirmed.
|
||||
The number of significant digits of the Radix is 53.000000 .
|
||||
Some subexpressions appear to be calculated extra
|
||||
precisely with about 11 extra B-digits, i.e.
|
||||
roughly 3.31133 extra significant decimals.
|
||||
That feature is not tested further by this program.
|
||||
|
||||
Diagnosis resumes after milestone Number 30 Page: 5
|
||||
|
||||
Subtraction appears to be normalized, as it should be.
|
||||
Checking for guard digit in *, /, and -.
|
||||
*, /, and - appear to have guard digits, as they should.
|
||||
|
||||
Diagnosis resumes after milestone Number 40 Page: 6
|
||||
|
||||
Checking rounding on multiply, divide and add/subtract.
|
||||
* is neither chopped nor correctly rounded.
|
||||
/ is neither chopped nor correctly rounded.
|
||||
Addition/Subtraction neither rounds nor chops.
|
||||
Sticky bit used incorrectly or not at all.
|
||||
FLAW: lack(s) of guard digits or failure(s) to correctly round or chop
|
||||
(noted above) count as one flaw in the final tally below.
|
||||
|
||||
Does Multiplication commute? Testing on 20 random pairs.
|
||||
No failures found in 20 integer pairs.
|
||||
|
||||
Running test of square root(x).
|
||||
Testing if sqrt(X * X) == X for 20 Integers X.
|
||||
Test for sqrt monotonicity.
|
||||
sqrt has passed a test for Monotonicity.
|
||||
Testing whether sqrt is rounded or chopped.
|
||||
Square root is neither chopped nor correctly rounded.
|
||||
Observed errors run from -5.0000000e-01 to 5.0000000e-01 ulps.
|
||||
|
||||
Diagnosis resumes after milestone Number 90 Page: 7
|
||||
|
||||
Testing powers Z^i for small Integers Z and i.
|
||||
... no discrepancis found.
|
||||
|
||||
Seeking Underflow thresholds UfThold and E0.
|
||||
Smallest strictly positive number found is E0 = 4.94066e-324 .
|
||||
Since comparison denies Z = 0, evaluating (Z + Z) / Z should be safe.
|
||||
What the machine gets for (Z + Z) / Z is 2.00000000000000000e+00 .
|
||||
This is O.K., provided Over/Underflow has NOT just been signaled.
|
||||
Underflow is gradual; it incurs Absolute Error =
|
||||
(roundoff in UfThold) < E0.
|
||||
The Underflow threshold is 2.22507385850720188e-308, below which
|
||||
calculation may suffer larger Relative error than merely roundoff.
|
||||
Since underflow occurs below the threshold
|
||||
UfThold = (2.00000000000000000e+00) ^ (-1.02200000000000000e+03)
|
||||
only underflow should afflict the expression
|
||||
(2.00000000000000000e+00) ^ (-1.02200000000000000e+03);
|
||||
actually calculating yields: 0.00000000000000000e+00 .
|
||||
This computed value is O.K.
|
||||
|
||||
Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065218e+00 as X -> 1.
|
||||
Accuracy seems adequate.
|
||||
Testing powers Z^Q at four nearly extreme values.
|
||||
... no discrepancies found.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 160 Page: 8
|
||||
|
||||
Searching for Overflow threshold:
|
||||
This may generate an error.
|
||||
Can `Z = -Y' overflow?
|
||||
Trying it on Y = -Inf .
|
||||
Seems O.K.
|
||||
Overflow threshold is V = 1.79769313486231571e+308 .
|
||||
Overflow saturates at V0 = Inf .
|
||||
No Overflow should be signaled for V * 1 = 1.79769313486231571e+308
|
||||
nor for V / 1 = 1.79769313486231571e+308 .
|
||||
Any overflow signal separating this * from the one
|
||||
above is a DEFECT.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 190 Page: 9
|
||||
|
||||
|
||||
What message and/or values does Division by Zero produce?
|
||||
Trying to compute 1 / 0 produces ... Inf .
|
||||
|
||||
Trying to compute 0 / 0 produces ... NaN .
|
||||
|
||||
Diagnosis resumes after milestone Number 220 Page: 10
|
||||
|
||||
|
||||
The number of FLAWs discovered = 1.
|
||||
|
||||
The arithmetic diagnosed seems Satisfactory though flawed.
|
||||
END OF TEST.
|
||||
Lest this program stop prematurely, i.e. before displaying
|
||||
|
||||
`END OF TEST',
|
||||
|
||||
try to persuade the computer NOT to terminate execution when an
|
||||
error like Over/Underflow or Division by Zero occurs, but rather
|
||||
to persevere with a surrogate value after, perhaps, displaying some
|
||||
warning. If persuasion avails naught, don't despair but run this
|
||||
program anyway to see how many milestones it passes, and then
|
||||
amend it to make further progress.
|
||||
|
||||
Answer questions with Y, y, N or n (unless otherwise indicated).
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 0 Page: 1
|
||||
|
||||
Users are invited to help debug and augment this program so it will
|
||||
cope with unanticipated and newly uncovered arithmetic pathologies.
|
||||
|
||||
Please send suggestions and interesting results to
|
||||
Richard Karpinski
|
||||
Computer Center U-76
|
||||
University of California
|
||||
San Francisco, CA 94143-0704, USA
|
||||
|
||||
In doing so, please include the following information:
|
||||
Precision: double;
|
||||
Version: 10 February 1989;
|
||||
Computer:
|
||||
|
||||
Compiler:
|
||||
|
||||
Optimization level:
|
||||
|
||||
Other relevant compiler options:
|
||||
|
||||
Diagnosis resumes after milestone Number 1 Page: 2
|
||||
|
||||
Running this program should reveal these characteristics:
|
||||
Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...
|
||||
Precision = number of significant digits carried.
|
||||
U2 = Radix/Radix^Precision = One Ulp
|
||||
(OneUlpnit in the Last Place) of 1.000xxx .
|
||||
U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .
|
||||
Adequacy of guard digits for Mult., Div. and Subt.
|
||||
Whether arithmetic is chopped, correctly rounded, or something else
|
||||
for Mult., Div., Add/Subt. and Sqrt.
|
||||
Whether a Sticky Bit used correctly for rounding.
|
||||
UnderflowThreshold = an underflow threshold.
|
||||
E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.
|
||||
V = an overflow threshold, roughly.
|
||||
V0 tells, roughly, whether Infinity is represented.
|
||||
Comparisions are checked for consistency with subtraction
|
||||
and for contamination with pseudo-zeros.
|
||||
Sqrt is tested. Y^X is not tested.
|
||||
Extra-precise subexpressions are revealed but NOT YET tested.
|
||||
Decimal-Binary conversion is NOT YET tested for accuracy.
|
||||
|
||||
Diagnosis resumes after milestone Number 2 Page: 3
|
||||
|
||||
The program attempts to discriminate among
|
||||
FLAWs, like lack of a sticky bit,
|
||||
Serious DEFECTs, like lack of a guard digit, and
|
||||
FAILUREs, like 2+2 == 5 .
|
||||
Failures may confound subsequent diagnoses.
|
||||
|
||||
The diagnostic capabilities of this program go beyond an earlier
|
||||
program called `MACHAR', which can be found at the end of the
|
||||
book `Software Manual for the Elementary Functions' (1980) by
|
||||
W. J. Cody and W. Waite. Although both programs try to discover
|
||||
the Radix, Precision and range (over/underflow thresholds)
|
||||
of the arithmetic, this program tries to cope with a wider variety
|
||||
of pathologies, and to say how well the arithmetic is implemented.
|
||||
|
||||
The program is based upon a conventional radix representation for
|
||||
floating-point numbers, but also allows logarithmic encoding
|
||||
as used by certain early WANG machines.
|
||||
|
||||
BASIC version of this program (C) 1983 by Prof. W. M. Kahan;
|
||||
see source comments for more history.
|
||||
|
||||
Diagnosis resumes after milestone Number 3 Page: 4
|
||||
|
||||
Program is now RUNNING tests on small integers:
|
||||
-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.
|
||||
|
||||
Searching for Radix and Precision.
|
||||
Radix = 2.000000 .
|
||||
Closest relative separation found is U1 = 1.1102230e-16 .
|
||||
|
||||
Recalculating radix and precision
|
||||
confirms closest relative separation U1 .
|
||||
Radix confirmed.
|
||||
The number of significant digits of the Radix is 53.000000 .
|
||||
Some subexpressions appear to be calculated extra
|
||||
precisely with about 11 extra B-digits, i.e.
|
||||
roughly 3.31133 extra significant decimals.
|
||||
That feature is not tested further by this program.
|
||||
|
||||
Diagnosis resumes after milestone Number 30 Page: 5
|
||||
|
||||
Subtraction appears to be normalized, as it should be.
|
||||
Checking for guard digit in *, /, and -.
|
||||
*, /, and - appear to have guard digits, as they should.
|
||||
|
||||
Diagnosis resumes after milestone Number 40 Page: 6
|
||||
|
||||
Checking rounding on multiply, divide and add/subtract.
|
||||
* is neither chopped nor correctly rounded.
|
||||
/ is neither chopped nor correctly rounded.
|
||||
Addition/Subtraction neither rounds nor chops.
|
||||
Sticky bit used incorrectly or not at all.
|
||||
FLAW: lack(s) of guard digits or failure(s) to correctly round or chop
|
||||
(noted above) count as one flaw in the final tally below.
|
||||
|
||||
Does Multiplication commute? Testing on 20 random pairs.
|
||||
No failures found in 20 integer pairs.
|
||||
|
||||
Running test of square root(x).
|
||||
Testing if sqrt(X * X) == X for 20 Integers X.
|
||||
Test for sqrt monotonicity.
|
||||
sqrt has passed a test for Monotonicity.
|
||||
Testing whether sqrt is rounded or chopped.
|
||||
Square root is neither chopped nor correctly rounded.
|
||||
Observed errors run from -5.0000000e-01 to 5.0000000e-01 ulps.
|
||||
|
||||
Diagnosis resumes after milestone Number 90 Page: 7
|
||||
|
||||
Testing powers Z^i for small Integers Z and i.
|
||||
... no discrepancis found.
|
||||
|
||||
Seeking Underflow thresholds UfThold and E0.
|
||||
Smallest strictly positive number found is E0 = 4.94066e-324 .
|
||||
Since comparison denies Z = 0, evaluating (Z + Z) / Z should be safe.
|
||||
What the machine gets for (Z + Z) / Z is 2.00000000000000000e+00 .
|
||||
This is O.K., provided Over/Underflow has NOT just been signaled.
|
||||
Underflow is gradual; it incurs Absolute Error =
|
||||
(roundoff in UfThold) < E0.
|
||||
The Underflow threshold is 2.22507385850720188e-308, below which
|
||||
calculation may suffer larger Relative error than merely roundoff.
|
||||
Since underflow occurs below the threshold
|
||||
UfThold = (2.00000000000000000e+00) ^ (-1.02200000000000000e+03)
|
||||
only underflow should afflict the expression
|
||||
(2.00000000000000000e+00) ^ (-1.02200000000000000e+03);
|
||||
actually calculating yields: 0.00000000000000000e+00 .
|
||||
This computed value is O.K.
|
||||
|
||||
Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065218e+00 as X -> 1.
|
||||
Accuracy seems adequate.
|
||||
Testing powers Z^Q at four nearly extreme values.
|
||||
... no discrepancies found.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 160 Page: 8
|
||||
|
||||
Searching for Overflow threshold:
|
||||
This may generate an error.
|
||||
Can `Z = -Y' overflow?
|
||||
Trying it on Y = -Inf .
|
||||
Seems O.K.
|
||||
Overflow threshold is V = 1.79769313486231571e+308 .
|
||||
Overflow saturates at V0 = Inf .
|
||||
No Overflow should be signaled for V * 1 = 1.79769313486231571e+308
|
||||
nor for V / 1 = 1.79769313486231571e+308 .
|
||||
Any overflow signal separating this * from the one
|
||||
above is a DEFECT.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 190 Page: 9
|
||||
|
||||
|
||||
What message and/or values does Division by Zero produce?
|
||||
Trying to compute 1 / 0 produces ... Inf .
|
||||
|
||||
Trying to compute 0 / 0 produces ... NaN .
|
||||
|
||||
Diagnosis resumes after milestone Number 220 Page: 10
|
||||
|
||||
|
||||
The number of FLAWs discovered = 1.
|
||||
|
||||
The arithmetic diagnosed seems Satisfactory though flawed.
|
||||
END OF TEST.
|
||||
|
|
32
lcc/x86/linux/tst/paranoia.2bk
Normal file → Executable file
32
lcc/x86/linux/tst/paranoia.2bk
Normal file → Executable file
|
@ -1,16 +1,16 @@
|
|||
tst/paranoia.c:1867: warning: missing return value
|
||||
tst/paranoia.c:1874: warning: missing return value
|
||||
tst/paranoia.c:1884: warning: missing return value
|
||||
tst/paranoia.c:1924: warning: missing return value
|
||||
tst/paranoia.c:1939: warning: missing return value
|
||||
tst/paranoia.c:1956: warning: missing return value
|
||||
tst/paranoia.c:1975: warning: missing return value
|
||||
tst/paranoia.c:1988: warning: missing return value
|
||||
tst/paranoia.c:1995: warning: missing return value
|
||||
tst/paranoia.c:2055: warning: missing return value
|
||||
tst/paranoia.c:2062: warning: missing return value
|
||||
tst/paranoia.c:2070: warning: missing return value
|
||||
tst/paranoia.c:2087: warning: missing return value
|
||||
tst/paranoia.c:2115: warning: missing return value
|
||||
tst/paranoia.c:2144: warning: missing return value
|
||||
tst/paranoia.c:2173: warning: missing return value
|
||||
tst/paranoia.c:1867: warning: missing return value
|
||||
tst/paranoia.c:1874: warning: missing return value
|
||||
tst/paranoia.c:1884: warning: missing return value
|
||||
tst/paranoia.c:1924: warning: missing return value
|
||||
tst/paranoia.c:1939: warning: missing return value
|
||||
tst/paranoia.c:1956: warning: missing return value
|
||||
tst/paranoia.c:1975: warning: missing return value
|
||||
tst/paranoia.c:1988: warning: missing return value
|
||||
tst/paranoia.c:1995: warning: missing return value
|
||||
tst/paranoia.c:2055: warning: missing return value
|
||||
tst/paranoia.c:2062: warning: missing return value
|
||||
tst/paranoia.c:2070: warning: missing return value
|
||||
tst/paranoia.c:2087: warning: missing return value
|
||||
tst/paranoia.c:2115: warning: missing return value
|
||||
tst/paranoia.c:2144: warning: missing return value
|
||||
tst/paranoia.c:2173: warning: missing return value
|
||||
|
|
40496
lcc/x86/linux/tst/paranoia.sbk
Normal file → Executable file
40496
lcc/x86/linux/tst/paranoia.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
40
lcc/x86/linux/tst/sort.1bk
Normal file → Executable file
40
lcc/x86/linux/tst/sort.1bk
Normal file → Executable file
|
@ -1,20 +1,20 @@
|
|||
exchange(1,9)
|
||||
exchange(3,7)
|
||||
exchange(5,6)
|
||||
exchange(0,5)
|
||||
exchange(0,3)
|
||||
exchange(0,0)
|
||||
exchange(1,2)
|
||||
exchange(6,6)
|
||||
exchange(8,9)
|
||||
exchange(7,8)
|
||||
-51
|
||||
-1
|
||||
0
|
||||
1
|
||||
3
|
||||
10
|
||||
18
|
||||
32
|
||||
567
|
||||
789
|
||||
exchange(1,9)
|
||||
exchange(3,7)
|
||||
exchange(5,6)
|
||||
exchange(0,5)
|
||||
exchange(0,3)
|
||||
exchange(0,0)
|
||||
exchange(1,2)
|
||||
exchange(6,6)
|
||||
exchange(8,9)
|
||||
exchange(7,8)
|
||||
-51
|
||||
-1
|
||||
0
|
||||
1
|
||||
3
|
||||
10
|
||||
18
|
||||
32
|
||||
567
|
||||
789
|
||||
|
|
10
lcc/x86/linux/tst/sort.2bk
Normal file → Executable file
10
lcc/x86/linux/tst/sort.2bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
tst/sort.c:23: warning: missing return value
|
||||
tst/sort.c:30: warning: missing return value
|
||||
tst/sort.c:37: warning: missing return value
|
||||
tst/sort.c:41: warning: missing return value
|
||||
tst/sort.c:65: warning: missing return value
|
||||
tst/sort.c:23: warning: missing return value
|
||||
tst/sort.c:30: warning: missing return value
|
||||
tst/sort.c:37: warning: missing return value
|
||||
tst/sort.c:41: warning: missing return value
|
||||
tst/sort.c:65: warning: missing return value
|
||||
|
|
660
lcc/x86/linux/tst/sort.sbk
Normal file → Executable file
660
lcc/x86/linux/tst/sort.sbk
Normal file → Executable file
|
@ -1,330 +1,330 @@
|
|||
.data
|
||||
.globl in
|
||||
.align 4
|
||||
.type in,@object
|
||||
in:
|
||||
.long 10
|
||||
.long 32
|
||||
.long -1
|
||||
.long 567
|
||||
.long 3
|
||||
.long 18
|
||||
.long 1
|
||||
.long -51
|
||||
.long 789
|
||||
.long 0
|
||||
.size in,40
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
pushl $10
|
||||
pushl $in
|
||||
call sort
|
||||
addl $8,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC5
|
||||
.LC2:
|
||||
movl -4(%ebp),%edi
|
||||
pushl in(,%edi,4)
|
||||
call putd
|
||||
addl $4,%esp
|
||||
pushl $10
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
.LC3:
|
||||
incl -4(%ebp)
|
||||
.LC5:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $10,%edi
|
||||
jb .LC2
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf6:
|
||||
.size main,.Lf6-main
|
||||
.globl putd
|
||||
.align 16
|
||||
.type putd,@function
|
||||
putd:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
cmpl $0,20(%ebp)
|
||||
jge .LC8
|
||||
pushl $45
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
negl 20(%ebp)
|
||||
.LC8:
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
cmpl $0,%eax
|
||||
je .LC10
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
call putd
|
||||
addl $4,%esp
|
||||
.LC10:
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
leal 48(%edx),%edi
|
||||
pushl %edi
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC7:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf12:
|
||||
.size putd,.Lf12-putd
|
||||
.globl sort
|
||||
.align 16
|
||||
.type sort,@function
|
||||
sort:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 24(%ebp),%edi
|
||||
subl $1,%edi
|
||||
movl %edi,24(%ebp)
|
||||
pushl %edi
|
||||
pushl $0
|
||||
movl 20(%ebp),%edi
|
||||
movl %edi,xx
|
||||
pushl %edi
|
||||
call quick
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC13:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf14:
|
||||
.size sort,.Lf14-sort
|
||||
.globl quick
|
||||
.align 16
|
||||
.type quick,@function
|
||||
quick:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC16
|
||||
jmp .LC15
|
||||
.LC16:
|
||||
pushl 28(%ebp)
|
||||
pushl 24(%ebp)
|
||||
pushl 20(%ebp)
|
||||
call partition
|
||||
addl $12,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
subl $1,%edi
|
||||
pushl %edi
|
||||
pushl 24(%ebp)
|
||||
pushl 20(%ebp)
|
||||
call quick
|
||||
addl $12,%esp
|
||||
pushl 28(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call quick
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC15:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf18:
|
||||
.size quick,.Lf18-quick
|
||||
.globl partition
|
||||
.align 16
|
||||
.type partition,@function
|
||||
partition:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
incl 28(%ebp)
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl (%esi,%edi,4),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
incl 24(%ebp)
|
||||
jmp .LC24
|
||||
.LC23:
|
||||
incl 24(%ebp)
|
||||
.LC24:
|
||||
movl 24(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl -4(%ebp),%ebx
|
||||
cmpl %ebx,(%esi,%edi,4)
|
||||
jl .LC23
|
||||
decl 28(%ebp)
|
||||
jmp .LC27
|
||||
.LC26:
|
||||
decl 28(%ebp)
|
||||
.LC27:
|
||||
movl 28(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl -4(%ebp),%ebx
|
||||
cmpl %ebx,(%esi,%edi,4)
|
||||
jg .LC26
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC29
|
||||
movl 20(%ebp),%edi
|
||||
movl 28(%ebp),%esi
|
||||
leal (%edi,%esi,4),%esi
|
||||
pushl %esi
|
||||
movl 24(%ebp),%esi
|
||||
leal (%edi,%esi,4),%edi
|
||||
pushl %edi
|
||||
call exchange
|
||||
addl $8,%esp
|
||||
.LC29:
|
||||
.LC21:
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC20
|
||||
movl 20(%ebp),%edi
|
||||
movl 28(%ebp),%esi
|
||||
leal (%edi,%esi,4),%esi
|
||||
pushl %esi
|
||||
movl -8(%ebp),%esi
|
||||
leal (%edi,%esi,4),%edi
|
||||
pushl %edi
|
||||
call exchange
|
||||
addl $8,%esp
|
||||
movl 28(%ebp),%eax
|
||||
.LC19:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf31:
|
||||
.size partition,.Lf31-partition
|
||||
.globl exchange
|
||||
.align 16
|
||||
.type exchange,@function
|
||||
exchange:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl xx,%edi
|
||||
movl $4,%esi
|
||||
movl 24(%ebp),%ebx
|
||||
subl %edi,%ebx
|
||||
movl %ebx,%eax
|
||||
movl %esi,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
movl 20(%ebp),%ebx
|
||||
subl %edi,%ebx
|
||||
movl %ebx,%eax
|
||||
movl %esi,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
pushl $.LC33
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
movl %esi,-4(%ebp)
|
||||
movl 24(%ebp),%esi
|
||||
movl (,%esi),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 24(%ebp),%edi
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC32:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf34:
|
||||
.size exchange,.Lf34-exchange
|
||||
.bss
|
||||
.globl xx
|
||||
.align 4
|
||||
.type xx,@object
|
||||
.size xx,4
|
||||
.comm xx,4
|
||||
.data
|
||||
.align 1
|
||||
.LC33:
|
||||
.byte 101
|
||||
.byte 120
|
||||
.byte 99
|
||||
.byte 104
|
||||
.byte 97
|
||||
.byte 110
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 40
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 41
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.data
|
||||
.globl in
|
||||
.align 4
|
||||
.type in,@object
|
||||
in:
|
||||
.long 10
|
||||
.long 32
|
||||
.long -1
|
||||
.long 567
|
||||
.long 3
|
||||
.long 18
|
||||
.long 1
|
||||
.long -51
|
||||
.long 789
|
||||
.long 0
|
||||
.size in,40
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
pushl $10
|
||||
pushl $in
|
||||
call sort
|
||||
addl $8,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC5
|
||||
.LC2:
|
||||
movl -4(%ebp),%edi
|
||||
pushl in(,%edi,4)
|
||||
call putd
|
||||
addl $4,%esp
|
||||
pushl $10
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
.LC3:
|
||||
incl -4(%ebp)
|
||||
.LC5:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $10,%edi
|
||||
jb .LC2
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf6:
|
||||
.size main,.Lf6-main
|
||||
.globl putd
|
||||
.align 16
|
||||
.type putd,@function
|
||||
putd:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
cmpl $0,20(%ebp)
|
||||
jge .LC8
|
||||
pushl $45
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
negl 20(%ebp)
|
||||
.LC8:
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
cmpl $0,%eax
|
||||
je .LC10
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
call putd
|
||||
addl $4,%esp
|
||||
.LC10:
|
||||
movl 20(%ebp),%eax
|
||||
movl $10,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
leal 48(%edx),%edi
|
||||
pushl %edi
|
||||
call putchar
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC7:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf12:
|
||||
.size putd,.Lf12-putd
|
||||
.globl sort
|
||||
.align 16
|
||||
.type sort,@function
|
||||
sort:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 24(%ebp),%edi
|
||||
subl $1,%edi
|
||||
movl %edi,24(%ebp)
|
||||
pushl %edi
|
||||
pushl $0
|
||||
movl 20(%ebp),%edi
|
||||
movl %edi,xx
|
||||
pushl %edi
|
||||
call quick
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC13:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf14:
|
||||
.size sort,.Lf14-sort
|
||||
.globl quick
|
||||
.align 16
|
||||
.type quick,@function
|
||||
quick:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC16
|
||||
jmp .LC15
|
||||
.LC16:
|
||||
pushl 28(%ebp)
|
||||
pushl 24(%ebp)
|
||||
pushl 20(%ebp)
|
||||
call partition
|
||||
addl $12,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
subl $1,%edi
|
||||
pushl %edi
|
||||
pushl 24(%ebp)
|
||||
pushl 20(%ebp)
|
||||
call quick
|
||||
addl $12,%esp
|
||||
pushl 28(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call quick
|
||||
addl $12,%esp
|
||||
movl $0,%eax
|
||||
.LC15:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf18:
|
||||
.size quick,.Lf18-quick
|
||||
.globl partition
|
||||
.align 16
|
||||
.type partition,@function
|
||||
partition:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
incl 28(%ebp)
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl (%esi,%edi,4),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
incl 24(%ebp)
|
||||
jmp .LC24
|
||||
.LC23:
|
||||
incl 24(%ebp)
|
||||
.LC24:
|
||||
movl 24(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl -4(%ebp),%ebx
|
||||
cmpl %ebx,(%esi,%edi,4)
|
||||
jl .LC23
|
||||
decl 28(%ebp)
|
||||
jmp .LC27
|
||||
.LC26:
|
||||
decl 28(%ebp)
|
||||
.LC27:
|
||||
movl 28(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
movl -4(%ebp),%ebx
|
||||
cmpl %ebx,(%esi,%edi,4)
|
||||
jg .LC26
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC29
|
||||
movl 20(%ebp),%edi
|
||||
movl 28(%ebp),%esi
|
||||
leal (%edi,%esi,4),%esi
|
||||
pushl %esi
|
||||
movl 24(%ebp),%esi
|
||||
leal (%edi,%esi,4),%edi
|
||||
pushl %edi
|
||||
call exchange
|
||||
addl $8,%esp
|
||||
.LC29:
|
||||
.LC21:
|
||||
movl 28(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC20
|
||||
movl 20(%ebp),%edi
|
||||
movl 28(%ebp),%esi
|
||||
leal (%edi,%esi,4),%esi
|
||||
pushl %esi
|
||||
movl -8(%ebp),%esi
|
||||
leal (%edi,%esi,4),%edi
|
||||
pushl %edi
|
||||
call exchange
|
||||
addl $8,%esp
|
||||
movl 28(%ebp),%eax
|
||||
.LC19:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf31:
|
||||
.size partition,.Lf31-partition
|
||||
.globl exchange
|
||||
.align 16
|
||||
.type exchange,@function
|
||||
exchange:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl xx,%edi
|
||||
movl $4,%esi
|
||||
movl 24(%ebp),%ebx
|
||||
subl %edi,%ebx
|
||||
movl %ebx,%eax
|
||||
movl %esi,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
movl 20(%ebp),%ebx
|
||||
subl %edi,%ebx
|
||||
movl %ebx,%eax
|
||||
movl %esi,%ecx
|
||||
cdq
|
||||
idivl %ecx
|
||||
pushl %eax
|
||||
pushl $.LC33
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl 20(%ebp),%edi
|
||||
movl (,%edi),%esi
|
||||
movl %esi,-4(%ebp)
|
||||
movl 24(%ebp),%esi
|
||||
movl (,%esi),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl 24(%ebp),%edi
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC32:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf34:
|
||||
.size exchange,.Lf34-exchange
|
||||
.bss
|
||||
.globl xx
|
||||
.align 4
|
||||
.type xx,@object
|
||||
.size xx,4
|
||||
.comm xx,4
|
||||
.data
|
||||
.align 1
|
||||
.LC33:
|
||||
.byte 101
|
||||
.byte 120
|
||||
.byte 99
|
||||
.byte 104
|
||||
.byte 97
|
||||
.byte 110
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 40
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 41
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
0
lcc/x86/linux/tst/spill.1bk
Normal file → Executable file
0
lcc/x86/linux/tst/spill.1bk
Normal file → Executable file
12
lcc/x86/linux/tst/spill.2bk
Normal file → Executable file
12
lcc/x86/linux/tst/spill.2bk
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
tst/spill.c:1: warning: missing return value
|
||||
tst/spill.c:3: warning: missing return value
|
||||
tst/spill.c:5: warning: missing return value
|
||||
tst/spill.c:7: warning: missing return value
|
||||
tst/spill.c:9: warning: missing return value
|
||||
tst/spill.c:17: warning: missing return value
|
||||
tst/spill.c:1: warning: missing return value
|
||||
tst/spill.c:3: warning: missing return value
|
||||
tst/spill.c:5: warning: missing return value
|
||||
tst/spill.c:7: warning: missing return value
|
||||
tst/spill.c:9: warning: missing return value
|
||||
tst/spill.c:17: warning: missing return value
|
||||
|
|
564
lcc/x86/linux/tst/spill.sbk
Normal file → Executable file
564
lcc/x86/linux/tst/spill.sbk
Normal file → Executable file
|
@ -1,282 +1,282 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf2:
|
||||
.size main,.Lf2-main
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
call f
|
||||
movl %eax,%edi
|
||||
call f
|
||||
leal (%eax,%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf4:
|
||||
.size f,.Lf4-f
|
||||
.globl f2
|
||||
.align 16
|
||||
.type f2,@function
|
||||
f2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
call f
|
||||
movl %eax,%edi
|
||||
cmpl $0,20(%ebp)
|
||||
je .LC7
|
||||
call f
|
||||
movl %eax,%esi
|
||||
movl %esi,-4(%ebp)
|
||||
jmp .LC8
|
||||
.LC7:
|
||||
movl $1,-4(%ebp)
|
||||
.LC8:
|
||||
movl -4(%ebp),%esi
|
||||
leal (%esi,%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movl $0,%eax
|
||||
.LC5:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf9:
|
||||
.size f2,.Lf9-f2
|
||||
.globl f3
|
||||
.align 16
|
||||
.type f3,@function
|
||||
f3:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $44,%esp
|
||||
movl $0,-4(%ebp)
|
||||
movl $0,-8(%ebp)
|
||||
movl $0,-12(%ebp)
|
||||
movl $0,-16(%ebp)
|
||||
movl $0,-20(%ebp)
|
||||
movl $0,-24(%ebp)
|
||||
movl $0,-28(%ebp)
|
||||
movl $0,-32(%ebp)
|
||||
movl $0,-36(%ebp)
|
||||
movl $0,-40(%ebp)
|
||||
movl 24(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,24(%ebp)
|
||||
cmpl $0,20(%ebp)
|
||||
je .LC12
|
||||
call f
|
||||
movl %eax,%esi
|
||||
movl %esi,-44(%ebp)
|
||||
jmp .LC13
|
||||
.LC12:
|
||||
movl $0,-44(%ebp)
|
||||
.LC13:
|
||||
movl -44(%ebp),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC10:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf14:
|
||||
.size f3,.Lf14-f3
|
||||
.globl f4
|
||||
.align 16
|
||||
.type f4,@function
|
||||
f4:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $52,%esp
|
||||
movl $0,-4(%ebp)
|
||||
movl $0,-8(%ebp)
|
||||
movl $0,-12(%ebp)
|
||||
movl $0,-16(%ebp)
|
||||
movl $0,-20(%ebp)
|
||||
movl $0,-24(%ebp)
|
||||
movl i,%edi
|
||||
leal (,%edi,8),%esi
|
||||
fldl a(%esi)
|
||||
fstpl -36(%ebp)
|
||||
fldl b(%esi)
|
||||
fstpl -44(%ebp)
|
||||
fldl -36(%ebp)
|
||||
faddl -44(%ebp)
|
||||
fldl .LC19
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC17
|
||||
cmpl $0,%edi
|
||||
je .LC17
|
||||
fldl -36(%ebp)
|
||||
fsubl -44(%ebp)
|
||||
fldl .LC19
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC17
|
||||
movl $1,-28(%ebp)
|
||||
jmp .LC18
|
||||
.LC17:
|
||||
movl $0,-28(%ebp)
|
||||
.LC18:
|
||||
movl -28(%ebp),%edi
|
||||
movl %edi,i
|
||||
movl $0,%eax
|
||||
.LC15:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf20:
|
||||
.size f4,.Lf20-f4
|
||||
.globl f5
|
||||
.align 16
|
||||
.type f5,@function
|
||||
f5:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl k,%edi
|
||||
movl m,%esi
|
||||
movl A,%ebx
|
||||
movl %edi,%edx
|
||||
imull %esi,%edx
|
||||
leal (%ebx,%edx,8),%edx
|
||||
movl j,%ecx
|
||||
movl %ecx,%eax
|
||||
imull %esi,%eax
|
||||
leal (%ebx,%eax,8),%esi
|
||||
movl n,%ebx
|
||||
movl B,%eax
|
||||
imull %ebx,%edi
|
||||
leal (%eax,%edi,8),%edi
|
||||
imull %ebx,%ecx
|
||||
leal (%eax,%ecx,8),%ebx
|
||||
fldl (,%edx)
|
||||
fmull (,%esi)
|
||||
fldl (,%edi)
|
||||
fmull (,%ebx)
|
||||
faddp %st(1),%st
|
||||
fstpl x
|
||||
fldl (,%edx)
|
||||
fmull (,%ebx)
|
||||
fldl (,%edi)
|
||||
fmull (,%esi)
|
||||
fsubp %st(1),%st
|
||||
fstpl x
|
||||
movl $0,%eax
|
||||
.LC21:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf22:
|
||||
.size f5,.Lf22-f5
|
||||
.bss
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,8
|
||||
.comm x,8
|
||||
.globl B
|
||||
.align 4
|
||||
.type B,@object
|
||||
.size B,4
|
||||
.comm B,4
|
||||
.globl A
|
||||
.align 4
|
||||
.type A,@object
|
||||
.size A,4
|
||||
.comm A,4
|
||||
.globl n
|
||||
.align 4
|
||||
.type n,@object
|
||||
.size n,4
|
||||
.comm n,4
|
||||
.globl m
|
||||
.align 4
|
||||
.type m,@object
|
||||
.size m,4
|
||||
.comm m,4
|
||||
.globl k
|
||||
.align 4
|
||||
.type k,@object
|
||||
.size k,4
|
||||
.comm k,4
|
||||
.globl j
|
||||
.align 4
|
||||
.type j,@object
|
||||
.size j,4
|
||||
.comm j,4
|
||||
.globl i
|
||||
.align 4
|
||||
.type i,@object
|
||||
.size i,4
|
||||
.comm i,4
|
||||
.globl b
|
||||
.align 4
|
||||
.type b,@object
|
||||
.size b,80
|
||||
.comm b,80
|
||||
.globl a
|
||||
.align 4
|
||||
.type a,@object
|
||||
.size a,80
|
||||
.comm a,80
|
||||
.data
|
||||
.align 4
|
||||
.LC19:
|
||||
.long 0
|
||||
.long 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf2:
|
||||
.size main,.Lf2-main
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
call f
|
||||
movl %eax,%edi
|
||||
call f
|
||||
leal (%eax,%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf4:
|
||||
.size f,.Lf4-f
|
||||
.globl f2
|
||||
.align 16
|
||||
.type f2,@function
|
||||
f2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
call f
|
||||
movl %eax,%edi
|
||||
cmpl $0,20(%ebp)
|
||||
je .LC7
|
||||
call f
|
||||
movl %eax,%esi
|
||||
movl %esi,-4(%ebp)
|
||||
jmp .LC8
|
||||
.LC7:
|
||||
movl $1,-4(%ebp)
|
||||
.LC8:
|
||||
movl -4(%ebp),%esi
|
||||
leal (%esi,%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movl $0,%eax
|
||||
.LC5:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf9:
|
||||
.size f2,.Lf9-f2
|
||||
.globl f3
|
||||
.align 16
|
||||
.type f3,@function
|
||||
f3:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $44,%esp
|
||||
movl $0,-4(%ebp)
|
||||
movl $0,-8(%ebp)
|
||||
movl $0,-12(%ebp)
|
||||
movl $0,-16(%ebp)
|
||||
movl $0,-20(%ebp)
|
||||
movl $0,-24(%ebp)
|
||||
movl $0,-28(%ebp)
|
||||
movl $0,-32(%ebp)
|
||||
movl $0,-36(%ebp)
|
||||
movl $0,-40(%ebp)
|
||||
movl 24(%ebp),%edi
|
||||
leal 4(%edi),%esi
|
||||
movl %esi,24(%ebp)
|
||||
cmpl $0,20(%ebp)
|
||||
je .LC12
|
||||
call f
|
||||
movl %eax,%esi
|
||||
movl %esi,-44(%ebp)
|
||||
jmp .LC13
|
||||
.LC12:
|
||||
movl $0,-44(%ebp)
|
||||
.LC13:
|
||||
movl -44(%ebp),%esi
|
||||
movl %esi,(,%edi)
|
||||
movl $0,%eax
|
||||
.LC10:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf14:
|
||||
.size f3,.Lf14-f3
|
||||
.globl f4
|
||||
.align 16
|
||||
.type f4,@function
|
||||
f4:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $52,%esp
|
||||
movl $0,-4(%ebp)
|
||||
movl $0,-8(%ebp)
|
||||
movl $0,-12(%ebp)
|
||||
movl $0,-16(%ebp)
|
||||
movl $0,-20(%ebp)
|
||||
movl $0,-24(%ebp)
|
||||
movl i,%edi
|
||||
leal (,%edi,8),%esi
|
||||
fldl a(%esi)
|
||||
fstpl -36(%ebp)
|
||||
fldl b(%esi)
|
||||
fstpl -44(%ebp)
|
||||
fldl -36(%ebp)
|
||||
faddl -44(%ebp)
|
||||
fldl .LC19
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC17
|
||||
cmpl $0,%edi
|
||||
je .LC17
|
||||
fldl -36(%ebp)
|
||||
fsubl -44(%ebp)
|
||||
fldl .LC19
|
||||
fcompp
|
||||
fstsw %ax
|
||||
sahf
|
||||
je .LC17
|
||||
movl $1,-28(%ebp)
|
||||
jmp .LC18
|
||||
.LC17:
|
||||
movl $0,-28(%ebp)
|
||||
.LC18:
|
||||
movl -28(%ebp),%edi
|
||||
movl %edi,i
|
||||
movl $0,%eax
|
||||
.LC15:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf20:
|
||||
.size f4,.Lf20-f4
|
||||
.globl f5
|
||||
.align 16
|
||||
.type f5,@function
|
||||
f5:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl k,%edi
|
||||
movl m,%esi
|
||||
movl A,%ebx
|
||||
movl %edi,%edx
|
||||
imull %esi,%edx
|
||||
leal (%ebx,%edx,8),%edx
|
||||
movl j,%ecx
|
||||
movl %ecx,%eax
|
||||
imull %esi,%eax
|
||||
leal (%ebx,%eax,8),%esi
|
||||
movl n,%ebx
|
||||
movl B,%eax
|
||||
imull %ebx,%edi
|
||||
leal (%eax,%edi,8),%edi
|
||||
imull %ebx,%ecx
|
||||
leal (%eax,%ecx,8),%ebx
|
||||
fldl (,%edx)
|
||||
fmull (,%esi)
|
||||
fldl (,%edi)
|
||||
fmull (,%ebx)
|
||||
faddp %st(1),%st
|
||||
fstpl x
|
||||
fldl (,%edx)
|
||||
fmull (,%ebx)
|
||||
fldl (,%edi)
|
||||
fmull (,%esi)
|
||||
fsubp %st(1),%st
|
||||
fstpl x
|
||||
movl $0,%eax
|
||||
.LC21:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf22:
|
||||
.size f5,.Lf22-f5
|
||||
.bss
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,8
|
||||
.comm x,8
|
||||
.globl B
|
||||
.align 4
|
||||
.type B,@object
|
||||
.size B,4
|
||||
.comm B,4
|
||||
.globl A
|
||||
.align 4
|
||||
.type A,@object
|
||||
.size A,4
|
||||
.comm A,4
|
||||
.globl n
|
||||
.align 4
|
||||
.type n,@object
|
||||
.size n,4
|
||||
.comm n,4
|
||||
.globl m
|
||||
.align 4
|
||||
.type m,@object
|
||||
.size m,4
|
||||
.comm m,4
|
||||
.globl k
|
||||
.align 4
|
||||
.type k,@object
|
||||
.size k,4
|
||||
.comm k,4
|
||||
.globl j
|
||||
.align 4
|
||||
.type j,@object
|
||||
.size j,4
|
||||
.comm j,4
|
||||
.globl i
|
||||
.align 4
|
||||
.type i,@object
|
||||
.size i,4
|
||||
.comm i,4
|
||||
.globl b
|
||||
.align 4
|
||||
.type b,@object
|
||||
.size b,80
|
||||
.comm b,80
|
||||
.globl a
|
||||
.align 4
|
||||
.type a,@object
|
||||
.size a,80
|
||||
.comm a,80
|
||||
.data
|
||||
.align 4
|
||||
.LC19:
|
||||
.long 0
|
||||
.long 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
12
lcc/x86/linux/tst/stdarg.1bk
Normal file → Executable file
12
lcc/x86/linux/tst/stdarg.1bk
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
test 1
|
||||
test 2
|
||||
test 3
|
||||
test 4
|
||||
test 5.000000
|
||||
{1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
|
||||
test 1
|
||||
test 2
|
||||
test 3
|
||||
test 4
|
||||
test 5.000000
|
||||
{1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
|
||||
|
|
2
lcc/x86/linux/tst/stdarg.2bk
Normal file → Executable file
2
lcc/x86/linux/tst/stdarg.2bk
Normal file → Executable file
|
@ -1 +1 @@
|
|||
tst/stdarg.c:51: warning: missing return value
|
||||
tst/stdarg.c:51: warning: missing return value
|
||||
|
|
790
lcc/x86/linux/tst/stdarg.sbk
Normal file → Executable file
790
lcc/x86/linux/tst/stdarg.sbk
Normal file → Executable file
|
@ -1,395 +1,395 @@
|
|||
.data
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,16
|
||||
x:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.long 4
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
pushl $.LC2
|
||||
call print
|
||||
addl $4,%esp
|
||||
pushl $.LC4
|
||||
pushl $.LC3
|
||||
call print
|
||||
addl $8,%esp
|
||||
pushl $10
|
||||
pushl $3
|
||||
pushl $.LC5
|
||||
call print
|
||||
addl $12,%esp
|
||||
pushl $10
|
||||
pushl $4
|
||||
pushl $.LC8
|
||||
pushl $.LC7
|
||||
pushl $.LC6
|
||||
call print
|
||||
addl $20,%esp
|
||||
pushl $10
|
||||
fldl .LC10
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC8
|
||||
pushl $.LC7
|
||||
pushl $.LC9
|
||||
call print
|
||||
addl $24,%esp
|
||||
leal x,%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl %edi,%esi
|
||||
movl %esi,-4(%ebp)
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl $.LC11
|
||||
call print
|
||||
addl $100,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf12:
|
||||
.size main,.Lf12-main
|
||||
.globl print
|
||||
.align 16
|
||||
.type print,@function
|
||||
print:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $28,%esp
|
||||
leal 24(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC19
|
||||
.LC16:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $37,%edi
|
||||
jne .LC20
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movsbl (,%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
cmpl $115,%edi
|
||||
je .LC36
|
||||
cmpl $115,%edi
|
||||
jg .LC41
|
||||
.LC40:
|
||||
movl -8(%ebp),%edi
|
||||
cmpl $98,%edi
|
||||
jl .LC22
|
||||
cmpl $102,%edi
|
||||
jg .LC22
|
||||
jmp *.LC42-392(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC42:
|
||||
.long .LC25
|
||||
.long .LC30
|
||||
.long .LC32
|
||||
.long .LC22
|
||||
.long .LC38
|
||||
.text
|
||||
.LC41:
|
||||
cmpl $119,-8(%ebp)
|
||||
je .LC34
|
||||
jmp .LC22
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
leal 16(%edi),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
movl %edi,-4(%ebp)
|
||||
leal -24(%ebp),%edi
|
||||
movl -28(%ebp),%esi
|
||||
leal -16(%esi),%esi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl -12(%ebp)
|
||||
pushl -16(%ebp)
|
||||
pushl -20(%ebp)
|
||||
pushl -24(%ebp)
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $20,%esp
|
||||
jmp .LC21
|
||||
.LC30:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movsbl -4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC32:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
pushl -4(%edi)
|
||||
pushl $.LC33
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC34:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movswl -4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC35
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC36:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
pushl -4(%edi)
|
||||
pushl $.LC37
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC38:
|
||||
movl -4(%ebp),%edi
|
||||
leal 8(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
fldl -8(%edi)
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC39
|
||||
call printf
|
||||
addl $12,%esp
|
||||
jmp .LC21
|
||||
.LC22:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC21:
|
||||
.LC17:
|
||||
incl 20(%ebp)
|
||||
.LC19:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC16
|
||||
movl $0,%eax
|
||||
.LC13:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf44:
|
||||
.size print,.Lf44-print
|
||||
.data
|
||||
.align 1
|
||||
.LC39:
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC37:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC35:
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC33:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC31:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 123
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 125
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC11:
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 4
|
||||
.LC10:
|
||||
.long 0
|
||||
.long 1075052544
|
||||
.align 1
|
||||
.LC9:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC8:
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC6:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 119
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC5:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 50
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC3:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC2:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 49
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.data
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,16
|
||||
x:
|
||||
.long 1
|
||||
.long 2
|
||||
.long 3
|
||||
.long 4
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
pushl $.LC2
|
||||
call print
|
||||
addl $4,%esp
|
||||
pushl $.LC4
|
||||
pushl $.LC3
|
||||
call print
|
||||
addl $8,%esp
|
||||
pushl $10
|
||||
pushl $3
|
||||
pushl $.LC5
|
||||
call print
|
||||
addl $12,%esp
|
||||
pushl $10
|
||||
pushl $4
|
||||
pushl $.LC8
|
||||
pushl $.LC7
|
||||
pushl $.LC6
|
||||
call print
|
||||
addl $20,%esp
|
||||
pushl $10
|
||||
fldl .LC10
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC8
|
||||
pushl $.LC7
|
||||
pushl $.LC9
|
||||
call print
|
||||
addl $24,%esp
|
||||
leal x,%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl %edi,%esi
|
||||
movl %esi,-4(%ebp)
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
movl -8(%ebp),%edi
|
||||
movl %edi,%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl $.LC11
|
||||
call print
|
||||
addl $100,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf12:
|
||||
.size main,.Lf12-main
|
||||
.globl print
|
||||
.align 16
|
||||
.type print,@function
|
||||
print:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $28,%esp
|
||||
leal 24(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC19
|
||||
.LC16:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $37,%edi
|
||||
jne .LC20
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%edi
|
||||
movl %edi,20(%ebp)
|
||||
movsbl (,%edi),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl -8(%ebp),%edi
|
||||
cmpl $115,%edi
|
||||
je .LC36
|
||||
cmpl $115,%edi
|
||||
jg .LC41
|
||||
.LC40:
|
||||
movl -8(%ebp),%edi
|
||||
cmpl $98,%edi
|
||||
jl .LC22
|
||||
cmpl $102,%edi
|
||||
jg .LC22
|
||||
jmp *.LC42-392(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC42:
|
||||
.long .LC25
|
||||
.long .LC30
|
||||
.long .LC32
|
||||
.long .LC22
|
||||
.long .LC38
|
||||
.text
|
||||
.LC41:
|
||||
cmpl $119,-8(%ebp)
|
||||
je .LC34
|
||||
jmp .LC22
|
||||
.LC25:
|
||||
movl -4(%ebp),%edi
|
||||
leal 16(%edi),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
movl %edi,-4(%ebp)
|
||||
leal -24(%ebp),%edi
|
||||
movl -28(%ebp),%esi
|
||||
leal -16(%esi),%esi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl -12(%ebp)
|
||||
pushl -16(%ebp)
|
||||
pushl -20(%ebp)
|
||||
pushl -24(%ebp)
|
||||
pushl $.LC26
|
||||
call printf
|
||||
addl $20,%esp
|
||||
jmp .LC21
|
||||
.LC30:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movsbl -4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC32:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
pushl -4(%edi)
|
||||
pushl $.LC33
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC34:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movswl -4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC35
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC36:
|
||||
movl -4(%ebp),%edi
|
||||
leal 4(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
pushl -4(%edi)
|
||||
pushl $.LC37
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC38:
|
||||
movl -4(%ebp),%edi
|
||||
leal 8(%edi),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
fldl -8(%edi)
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl $.LC39
|
||||
call printf
|
||||
addl $12,%esp
|
||||
jmp .LC21
|
||||
.LC22:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC21
|
||||
.LC20:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC31
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC21:
|
||||
.LC17:
|
||||
incl 20(%ebp)
|
||||
.LC19:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC16
|
||||
movl $0,%eax
|
||||
.LC13:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf44:
|
||||
.size print,.Lf44-print
|
||||
.data
|
||||
.align 1
|
||||
.LC39:
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC37:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC35:
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC33:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC31:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC26:
|
||||
.byte 123
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 125
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC11:
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 98
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 4
|
||||
.LC10:
|
||||
.long 0
|
||||
.long 1075052544
|
||||
.align 1
|
||||
.LC9:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC8:
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC6:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 119
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC5:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC4:
|
||||
.byte 50
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC3:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC2:
|
||||
.byte 116
|
||||
.byte 101
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 49
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
10
lcc/x86/linux/tst/struct.1bk
Normal file → Executable file
10
lcc/x86/linux/tst/struct.1bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
(-1,-1) is not within [10,10; 310,310]
|
||||
(1,1) is not within [10,10; 310,310]
|
||||
(20,300) is within [10,10; 310,310]
|
||||
(500,400) is not within [10,10; 310,310]
|
||||
ab
|
||||
(-1,-1) is not within [10,10; 310,310]
|
||||
(1,1) is not within [10,10; 310,310]
|
||||
(20,300) is within [10,10; 310,310]
|
||||
(500,400) is not within [10,10; 310,310]
|
||||
ab
|
||||
|
|
4
lcc/x86/linux/tst/struct.2bk
Normal file → Executable file
4
lcc/x86/linux/tst/struct.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/struct.c:49: warning: missing return value
|
||||
tst/struct.c:68: warning: missing return value
|
||||
tst/struct.c:49: warning: missing return value
|
||||
tst/struct.c:68: warning: missing return value
|
||||
|
|
954
lcc/x86/linux/tst/struct.sbk
Normal file → Executable file
954
lcc/x86/linux/tst/struct.sbk
Normal file → Executable file
|
@ -1,477 +1,477 @@
|
|||
.globl addpoint
|
||||
.text
|
||||
.align 16
|
||||
.type addpoint,@function
|
||||
addpoint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 32(%ebp),%edi
|
||||
addl %edi,24(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
addl %edi,28(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal 24(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf5:
|
||||
.size addpoint,.Lf5-addpoint
|
||||
.globl canonrect
|
||||
.align 16
|
||||
.type canonrect,@function
|
||||
canonrect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $32,%esp
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC11
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-20(%ebp)
|
||||
jmp .LC12
|
||||
.LC11:
|
||||
movl 32(%ebp),%edi
|
||||
movl %edi,-20(%ebp)
|
||||
.LC12:
|
||||
movl -20(%ebp),%edi
|
||||
movl %edi,-16(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
cmpl %edi,28(%ebp)
|
||||
jge .LC21
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-24(%ebp)
|
||||
jmp .LC22
|
||||
.LC21:
|
||||
movl 36(%ebp),%edi
|
||||
movl %edi,-24(%ebp)
|
||||
.LC22:
|
||||
movl -24(%ebp),%edi
|
||||
movl %edi,-12(%ebp)
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jle .LC27
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
jmp .LC28
|
||||
.LC27:
|
||||
movl 32(%ebp),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
.LC28:
|
||||
movl -28(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
cmpl %edi,28(%ebp)
|
||||
jle .LC38
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-32(%ebp)
|
||||
jmp .LC39
|
||||
.LC38:
|
||||
movl 36(%ebp),%edi
|
||||
movl %edi,-32(%ebp)
|
||||
.LC39:
|
||||
movl -32(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal -16(%ebp),%esi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC6:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf40:
|
||||
.size canonrect,.Lf40-canonrect
|
||||
.globl makepoint
|
||||
.align 16
|
||||
.type makepoint,@function
|
||||
makepoint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal -8(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC41:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf44:
|
||||
.size makepoint,.Lf44-makepoint
|
||||
.globl makerect
|
||||
.align 16
|
||||
.type makerect,@function
|
||||
makerect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $16,%esp
|
||||
leal -16(%ebp),%edi
|
||||
leal 24(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -8(%ebp),%edi
|
||||
leal 32(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -16(%ebp),%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl 20(%ebp)
|
||||
call canonrect
|
||||
addl $20,%esp
|
||||
.LC45:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf48:
|
||||
.size makerect,.Lf48-makerect
|
||||
.globl ptinrect
|
||||
.align 16
|
||||
.type ptinrect,@function
|
||||
ptinrect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl 28(%ebp),%edi
|
||||
jl .LC57
|
||||
cmpl 36(%ebp),%edi
|
||||
jge .LC57
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC57
|
||||
movl 40(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC57
|
||||
movl $1,-4(%ebp)
|
||||
jmp .LC58
|
||||
.LC57:
|
||||
movl $0,-4(%ebp)
|
||||
.LC58:
|
||||
movl -4(%ebp),%eax
|
||||
.LC49:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf59:
|
||||
.size ptinrect,.Lf59-ptinrect
|
||||
.data
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,4
|
||||
y:
|
||||
.byte 97
|
||||
.byte 98
|
||||
.byte 0
|
||||
.space 1
|
||||
.globl odd
|
||||
.text
|
||||
.align 16
|
||||
.type odd,@function
|
||||
odd:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
leal -4(%ebp),%edi
|
||||
leal 20(%ebp),%esi
|
||||
movl $4,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -4(%ebp),%edi
|
||||
pushl %edi
|
||||
pushl $.LC61
|
||||
call printf
|
||||
addl $8,%esp
|
||||
movl $0,%eax
|
||||
.LC60:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf62:
|
||||
.size odd,.Lf62-odd
|
||||
.data
|
||||
.align 4
|
||||
.LC64:
|
||||
.long 0
|
||||
.long 0
|
||||
.align 4
|
||||
.LC65:
|
||||
.long 320
|
||||
.long 320
|
||||
.align 4
|
||||
.LC66:
|
||||
.long -1
|
||||
.long -1
|
||||
.long 1
|
||||
.long 1
|
||||
.long 20
|
||||
.long 300
|
||||
.long 500
|
||||
.long 400
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $108,%esp
|
||||
leal -68(%ebp),%edi
|
||||
leal .LC64,%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -76(%ebp),%edi
|
||||
leal .LC65,%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -36(%ebp),%edi
|
||||
leal .LC66,%esi
|
||||
movl $32,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl $-10
|
||||
pushl $-10
|
||||
leal -84(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
leal -84(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -76(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -92(%ebp),%edi
|
||||
pushl %edi
|
||||
call addpoint
|
||||
addl $20,%esp
|
||||
pushl $10
|
||||
pushl $10
|
||||
leal -100(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
leal -100(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -68(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -108(%ebp),%edi
|
||||
pushl %edi
|
||||
call addpoint
|
||||
addl $20,%esp
|
||||
leal -108(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -92(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -52(%ebp),%edi
|
||||
pushl %edi
|
||||
call makerect
|
||||
addl $20,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC70
|
||||
.LC67:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,8),%edi
|
||||
leal -32(%ebp),%esi
|
||||
pushl (%esi,%edi)
|
||||
leal -36(%ebp),%esi
|
||||
pushl (%esi,%edi)
|
||||
leal -60(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
pushl -56(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
leal -36(%ebp),%esi
|
||||
pushl (%esi,%edi,8)
|
||||
pushl $.LC71
|
||||
call printf
|
||||
addl $12,%esp
|
||||
leal -52(%ebp),%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -60(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
call ptinrect
|
||||
addl $24,%esp
|
||||
cmpl $0,%eax
|
||||
jne .LC74
|
||||
pushl $.LC76
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC74:
|
||||
pushl -40(%ebp)
|
||||
pushl -44(%ebp)
|
||||
pushl -48(%ebp)
|
||||
pushl -52(%ebp)
|
||||
pushl $.LC77
|
||||
call printf
|
||||
addl $20,%esp
|
||||
.LC68:
|
||||
incl -4(%ebp)
|
||||
.LC70:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $4,%edi
|
||||
jb .LC67
|
||||
leal y,%esi
|
||||
subl $4,%esp
|
||||
movl %esp,%edi
|
||||
movl $4,%ecx
|
||||
rep
|
||||
movsb
|
||||
call odd
|
||||
addl $4,%esp
|
||||
pushl $0
|
||||
call exit
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC63:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf82:
|
||||
.size main,.Lf82-main
|
||||
.data
|
||||
.align 1
|
||||
.LC77:
|
||||
.byte 119
|
||||
.byte 105
|
||||
.byte 116
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 110
|
||||
.byte 32
|
||||
.byte 91
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 59
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 93
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC76:
|
||||
.byte 110
|
||||
.byte 111
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC71:
|
||||
.byte 40
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 41
|
||||
.byte 32
|
||||
.byte 105
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC61:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl addpoint
|
||||
.text
|
||||
.align 16
|
||||
.type addpoint,@function
|
||||
addpoint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 32(%ebp),%edi
|
||||
addl %edi,24(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
addl %edi,28(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal 24(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf5:
|
||||
.size addpoint,.Lf5-addpoint
|
||||
.globl canonrect
|
||||
.align 16
|
||||
.type canonrect,@function
|
||||
canonrect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $32,%esp
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC11
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-20(%ebp)
|
||||
jmp .LC12
|
||||
.LC11:
|
||||
movl 32(%ebp),%edi
|
||||
movl %edi,-20(%ebp)
|
||||
.LC12:
|
||||
movl -20(%ebp),%edi
|
||||
movl %edi,-16(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
cmpl %edi,28(%ebp)
|
||||
jge .LC21
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-24(%ebp)
|
||||
jmp .LC22
|
||||
.LC21:
|
||||
movl 36(%ebp),%edi
|
||||
movl %edi,-24(%ebp)
|
||||
.LC22:
|
||||
movl -24(%ebp),%edi
|
||||
movl %edi,-12(%ebp)
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jle .LC27
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
jmp .LC28
|
||||
.LC27:
|
||||
movl 32(%ebp),%edi
|
||||
movl %edi,-28(%ebp)
|
||||
.LC28:
|
||||
movl -28(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl 36(%ebp),%edi
|
||||
cmpl %edi,28(%ebp)
|
||||
jle .LC38
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-32(%ebp)
|
||||
jmp .LC39
|
||||
.LC38:
|
||||
movl 36(%ebp),%edi
|
||||
movl %edi,-32(%ebp)
|
||||
.LC39:
|
||||
movl -32(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal -16(%ebp),%esi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC6:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf40:
|
||||
.size canonrect,.Lf40-canonrect
|
||||
.globl makepoint
|
||||
.align 16
|
||||
.type makepoint,@function
|
||||
makepoint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
movl 28(%ebp),%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl 20(%ebp),%edi
|
||||
leal -8(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
.LC41:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf44:
|
||||
.size makepoint,.Lf44-makepoint
|
||||
.globl makerect
|
||||
.align 16
|
||||
.type makerect,@function
|
||||
makerect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $16,%esp
|
||||
leal -16(%ebp),%edi
|
||||
leal 24(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -8(%ebp),%edi
|
||||
leal 32(%ebp),%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -16(%ebp),%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl 20(%ebp)
|
||||
call canonrect
|
||||
addl $20,%esp
|
||||
.LC45:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf48:
|
||||
.size makerect,.Lf48-makerect
|
||||
.globl ptinrect
|
||||
.align 16
|
||||
.type ptinrect,@function
|
||||
ptinrect:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl 28(%ebp),%edi
|
||||
jl .LC57
|
||||
cmpl 36(%ebp),%edi
|
||||
jge .LC57
|
||||
movl 32(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jl .LC57
|
||||
movl 40(%ebp),%edi
|
||||
cmpl %edi,24(%ebp)
|
||||
jge .LC57
|
||||
movl $1,-4(%ebp)
|
||||
jmp .LC58
|
||||
.LC57:
|
||||
movl $0,-4(%ebp)
|
||||
.LC58:
|
||||
movl -4(%ebp),%eax
|
||||
.LC49:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf59:
|
||||
.size ptinrect,.Lf59-ptinrect
|
||||
.data
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,4
|
||||
y:
|
||||
.byte 97
|
||||
.byte 98
|
||||
.byte 0
|
||||
.space 1
|
||||
.globl odd
|
||||
.text
|
||||
.align 16
|
||||
.type odd,@function
|
||||
odd:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
leal -4(%ebp),%edi
|
||||
leal 20(%ebp),%esi
|
||||
movl $4,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -4(%ebp),%edi
|
||||
pushl %edi
|
||||
pushl $.LC61
|
||||
call printf
|
||||
addl $8,%esp
|
||||
movl $0,%eax
|
||||
.LC60:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf62:
|
||||
.size odd,.Lf62-odd
|
||||
.data
|
||||
.align 4
|
||||
.LC64:
|
||||
.long 0
|
||||
.long 0
|
||||
.align 4
|
||||
.LC65:
|
||||
.long 320
|
||||
.long 320
|
||||
.align 4
|
||||
.LC66:
|
||||
.long -1
|
||||
.long -1
|
||||
.long 1
|
||||
.long 1
|
||||
.long 20
|
||||
.long 300
|
||||
.long 500
|
||||
.long 400
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $108,%esp
|
||||
leal -68(%ebp),%edi
|
||||
leal .LC64,%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -76(%ebp),%edi
|
||||
leal .LC65,%esi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -36(%ebp),%edi
|
||||
leal .LC66,%esi
|
||||
movl $32,%ecx
|
||||
rep
|
||||
movsb
|
||||
pushl $-10
|
||||
pushl $-10
|
||||
leal -84(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
leal -84(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -76(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -92(%ebp),%edi
|
||||
pushl %edi
|
||||
call addpoint
|
||||
addl $20,%esp
|
||||
pushl $10
|
||||
pushl $10
|
||||
leal -100(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
leal -100(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -68(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -108(%ebp),%edi
|
||||
pushl %edi
|
||||
call addpoint
|
||||
addl $20,%esp
|
||||
leal -108(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -92(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -52(%ebp),%edi
|
||||
pushl %edi
|
||||
call makerect
|
||||
addl $20,%esp
|
||||
movl $0,-4(%ebp)
|
||||
jmp .LC70
|
||||
.LC67:
|
||||
movl -4(%ebp),%edi
|
||||
leal (,%edi,8),%edi
|
||||
leal -32(%ebp),%esi
|
||||
pushl (%esi,%edi)
|
||||
leal -36(%ebp),%esi
|
||||
pushl (%esi,%edi)
|
||||
leal -60(%ebp),%edi
|
||||
pushl %edi
|
||||
call makepoint
|
||||
addl $12,%esp
|
||||
pushl -56(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
leal -36(%ebp),%esi
|
||||
pushl (%esi,%edi,8)
|
||||
pushl $.LC71
|
||||
call printf
|
||||
addl $12,%esp
|
||||
leal -52(%ebp),%esi
|
||||
subl $16,%esp
|
||||
movl %esp,%edi
|
||||
movl $16,%ecx
|
||||
rep
|
||||
movsb
|
||||
leal -60(%ebp),%esi
|
||||
subl $8,%esp
|
||||
movl %esp,%edi
|
||||
movl $8,%ecx
|
||||
rep
|
||||
movsb
|
||||
call ptinrect
|
||||
addl $24,%esp
|
||||
cmpl $0,%eax
|
||||
jne .LC74
|
||||
pushl $.LC76
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC74:
|
||||
pushl -40(%ebp)
|
||||
pushl -44(%ebp)
|
||||
pushl -48(%ebp)
|
||||
pushl -52(%ebp)
|
||||
pushl $.LC77
|
||||
call printf
|
||||
addl $20,%esp
|
||||
.LC68:
|
||||
incl -4(%ebp)
|
||||
.LC70:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $4,%edi
|
||||
jb .LC67
|
||||
leal y,%esi
|
||||
subl $4,%esp
|
||||
movl %esp,%edi
|
||||
movl $4,%ecx
|
||||
rep
|
||||
movsb
|
||||
call odd
|
||||
addl $4,%esp
|
||||
pushl $0
|
||||
call exit
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC63:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf82:
|
||||
.size main,.Lf82-main
|
||||
.data
|
||||
.align 1
|
||||
.LC77:
|
||||
.byte 119
|
||||
.byte 105
|
||||
.byte 116
|
||||
.byte 104
|
||||
.byte 105
|
||||
.byte 110
|
||||
.byte 32
|
||||
.byte 91
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 59
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 93
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC76:
|
||||
.byte 110
|
||||
.byte 111
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC71:
|
||||
.byte 40
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 44
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 41
|
||||
.byte 32
|
||||
.byte 105
|
||||
.byte 115
|
||||
.byte 32
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC61:
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
152
lcc/x86/linux/tst/switch.1bk
Normal file → Executable file
152
lcc/x86/linux/tst/switch.1bk
Normal file → Executable file
|
@ -1,76 +1,76 @@
|
|||
b = 0x8
|
||||
f = 0xc
|
||||
n = 0xa
|
||||
r = 0xd
|
||||
t = 0x9
|
||||
v = 0xb
|
||||
x = 0x78
|
||||
f:
|
||||
x = 0
|
||||
x = 1
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 7
|
||||
x = 8
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 16
|
||||
x = 17
|
||||
x = 18
|
||||
x = 19
|
||||
x = 20
|
||||
g:
|
||||
1 1
|
||||
1 2
|
||||
2 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
d 6
|
||||
3 7
|
||||
d 7
|
||||
3 8
|
||||
d 8
|
||||
d 9
|
||||
d 10
|
||||
h:
|
||||
i = 8
|
||||
i = 16
|
||||
i = 120
|
||||
i = 128
|
||||
i = 248
|
||||
i = 264
|
||||
i = 272
|
||||
i = 280
|
||||
i = 288
|
||||
i = 296
|
||||
i = 304
|
||||
i = 312
|
||||
488 defaults
|
||||
x = 0x1000000
|
||||
x = 0x2000000
|
||||
x = 0x3000000
|
||||
x = 0x4000000
|
||||
x = 0x5000000
|
||||
x = 0x6000000 (default)
|
||||
x = 0x7000000 (default)
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
b = 0x8
|
||||
f = 0xc
|
||||
n = 0xa
|
||||
r = 0xd
|
||||
t = 0x9
|
||||
v = 0xb
|
||||
x = 0x78
|
||||
f:
|
||||
x = 0
|
||||
x = 1
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 7
|
||||
x = 8
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 16
|
||||
x = 17
|
||||
x = 18
|
||||
x = 19
|
||||
x = 20
|
||||
g:
|
||||
1 1
|
||||
1 2
|
||||
2 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
d 6
|
||||
3 7
|
||||
d 7
|
||||
3 8
|
||||
d 8
|
||||
d 9
|
||||
d 10
|
||||
h:
|
||||
i = 8
|
||||
i = 16
|
||||
i = 120
|
||||
i = 128
|
||||
i = 248
|
||||
i = 264
|
||||
i = 272
|
||||
i = 280
|
||||
i = 288
|
||||
i = 296
|
||||
i = 304
|
||||
i = 312
|
||||
488 defaults
|
||||
x = 0x1000000
|
||||
x = 0x2000000
|
||||
x = 0x3000000
|
||||
x = 0x4000000
|
||||
x = 0x5000000
|
||||
x = 0x6000000 (default)
|
||||
x = 0x7000000 (default)
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
|
10
lcc/x86/linux/tst/switch.2bk
Normal file → Executable file
10
lcc/x86/linux/tst/switch.2bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
tst/switch.c:55: warning: missing return value
|
||||
tst/switch.c:73: warning: missing return value
|
||||
tst/switch.c:97: warning: missing return value
|
||||
tst/switch.c:112: warning: missing return value
|
||||
tst/switch.c:137: warning: missing return value
|
||||
tst/switch.c:55: warning: missing return value
|
||||
tst/switch.c:73: warning: missing return value
|
||||
tst/switch.c:97: warning: missing return value
|
||||
tst/switch.c:112: warning: missing return value
|
||||
tst/switch.c:137: warning: missing return value
|
||||
|
|
1798
lcc/x86/linux/tst/switch.sbk
Normal file → Executable file
1798
lcc/x86/linux/tst/switch.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
148
lcc/x86/linux/tst/wf1.1bk
Normal file → Executable file
148
lcc/x86/linux/tst/wf1.1bk
Normal file → Executable file
|
@ -1,74 +1,74 @@
|
|||
5 a
|
||||
2 and
|
||||
5 buf
|
||||
16 c
|
||||
8 char
|
||||
1 compare
|
||||
4 cond
|
||||
5 count
|
||||
1 d
|
||||
1 die
|
||||
3 else
|
||||
1 entry
|
||||
1 eof
|
||||
4 err
|
||||
1 error
|
||||
1 exit
|
||||
1 folded
|
||||
1 for
|
||||
1 free
|
||||
1 frequencies
|
||||
1 frequency
|
||||
1 get
|
||||
2 getchar
|
||||
3 getword
|
||||
14 if
|
||||
2 in
|
||||
1 index
|
||||
1 input
|
||||
1 install
|
||||
8 int
|
||||
1 into
|
||||
1 is
|
||||
4 isletter
|
||||
1 it
|
||||
1 itself
|
||||
5 left
|
||||
1 letter
|
||||
7 lookup
|
||||
1 main
|
||||
2 malloc
|
||||
1 message
|
||||
2 n
|
||||
1 necessary
|
||||
12 next
|
||||
9 node
|
||||
4 of
|
||||
1 on
|
||||
1 or
|
||||
1 otherwise
|
||||
2 out
|
||||
8 p
|
||||
3 print
|
||||
2 printf
|
||||
16 return
|
||||
5 right
|
||||
4 root
|
||||
25 s
|
||||
2 storage
|
||||
3 strcmp
|
||||
1 strcpy
|
||||
1 strlen
|
||||
8 struct
|
||||
1 structures
|
||||
2 subtree
|
||||
1 t
|
||||
5 tprint
|
||||
9 tree
|
||||
1 uses
|
||||
1 version
|
||||
1 wf
|
||||
3 while
|
||||
21 word
|
||||
9 words
|
||||
2 z
|
||||
5 a
|
||||
2 and
|
||||
5 buf
|
||||
16 c
|
||||
8 char
|
||||
1 compare
|
||||
4 cond
|
||||
5 count
|
||||
1 d
|
||||
1 die
|
||||
3 else
|
||||
1 entry
|
||||
1 eof
|
||||
4 err
|
||||
1 error
|
||||
1 exit
|
||||
1 folded
|
||||
1 for
|
||||
1 free
|
||||
1 frequencies
|
||||
1 frequency
|
||||
1 get
|
||||
2 getchar
|
||||
3 getword
|
||||
14 if
|
||||
2 in
|
||||
1 index
|
||||
1 input
|
||||
1 install
|
||||
8 int
|
||||
1 into
|
||||
1 is
|
||||
4 isletter
|
||||
1 it
|
||||
1 itself
|
||||
5 left
|
||||
1 letter
|
||||
7 lookup
|
||||
1 main
|
||||
2 malloc
|
||||
1 message
|
||||
2 n
|
||||
1 necessary
|
||||
12 next
|
||||
9 node
|
||||
4 of
|
||||
1 on
|
||||
1 or
|
||||
1 otherwise
|
||||
2 out
|
||||
8 p
|
||||
3 print
|
||||
2 printf
|
||||
16 return
|
||||
5 right
|
||||
4 root
|
||||
25 s
|
||||
2 storage
|
||||
3 strcmp
|
||||
1 strcpy
|
||||
1 strlen
|
||||
8 struct
|
||||
1 structures
|
||||
2 subtree
|
||||
1 t
|
||||
5 tprint
|
||||
9 tree
|
||||
1 uses
|
||||
1 version
|
||||
1 wf
|
||||
3 while
|
||||
21 word
|
||||
9 words
|
||||
2 z
|
||||
|
|
4
lcc/x86/linux/tst/wf1.2bk
Normal file → Executable file
4
lcc/x86/linux/tst/wf1.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/wf1.c:29: warning: missing return value
|
||||
tst/wf1.c:87: warning: missing return value
|
||||
tst/wf1.c:29: warning: missing return value
|
||||
tst/wf1.c:87: warning: missing return value
|
||||
|
|
874
lcc/x86/linux/tst/wf1.sbk
Normal file → Executable file
874
lcc/x86/linux/tst/wf1.sbk
Normal file → Executable file
|
@ -1,437 +1,437 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $24,%esp
|
||||
movl $0,-24(%ebp)
|
||||
movl $0,next
|
||||
jmp .LC3
|
||||
.LC2:
|
||||
leal -24(%ebp),%edi
|
||||
pushl %edi
|
||||
leal -20(%ebp),%edi
|
||||
pushl %edi
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
incl (,%eax)
|
||||
.LC3:
|
||||
leal -20(%ebp),%edi
|
||||
pushl %edi
|
||||
call getword
|
||||
addl $4,%esp
|
||||
cmpl $0,%eax
|
||||
jne .LC2
|
||||
pushl -24(%ebp)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf5:
|
||||
.size main,.Lf5-main
|
||||
.globl err
|
||||
.align 16
|
||||
.type err,@function
|
||||
err:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC7
|
||||
call printf
|
||||
addl $8,%esp
|
||||
pushl $1
|
||||
call exit
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC6:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf8:
|
||||
.size err,.Lf8-err
|
||||
.globl getword
|
||||
.align 16
|
||||
.type getword,@function
|
||||
getword:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
.LC10:
|
||||
.LC11:
|
||||
call getchar
|
||||
movl %eax,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
cmpl $-1,%edi
|
||||
je .LC13
|
||||
pushl -4(%ebp)
|
||||
call isletter
|
||||
addl $4,%esp
|
||||
cmpl $0,%eax
|
||||
je .LC10
|
||||
.LC13:
|
||||
movl 20(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC17
|
||||
.LC14:
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,(,%edi)
|
||||
.LC15:
|
||||
call getchar
|
||||
movl %eax,-4(%ebp)
|
||||
.LC17:
|
||||
pushl -4(%ebp)
|
||||
call isletter
|
||||
addl $4,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
cmpl $0,%eax
|
||||
jne .LC14
|
||||
movl -8(%ebp),%edi
|
||||
movb $0,(,%edi)
|
||||
movl -8(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
cmpl %esi,%edi
|
||||
jbe .LC18
|
||||
movl $1,%eax
|
||||
jmp .LC9
|
||||
.LC18:
|
||||
movl $0,%eax
|
||||
.LC9:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf20:
|
||||
.size getword,.Lf20-getword
|
||||
.globl isletter
|
||||
.align 16
|
||||
.type isletter,@function
|
||||
isletter:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $65,%edi
|
||||
jl .LC22
|
||||
cmpl $90,%edi
|
||||
jg .LC22
|
||||
addl $32,20(%ebp)
|
||||
.LC22:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $97,%edi
|
||||
jl .LC24
|
||||
cmpl $122,%edi
|
||||
jg .LC24
|
||||
movl 20(%ebp),%eax
|
||||
jmp .LC21
|
||||
.LC24:
|
||||
movl $0,%eax
|
||||
.LC21:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf26:
|
||||
.size isletter,.Lf26-isletter
|
||||
.globl lookup
|
||||
.align 16
|
||||
.type lookup,@function
|
||||
lookup:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
je .LC28
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
pushl 12(%edi)
|
||||
pushl 20(%ebp)
|
||||
call strcmp
|
||||
addl $8,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
cmpl $0,-4(%ebp)
|
||||
jge .LC30
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
leal 4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
movl %eax,%edi
|
||||
jmp .LC27
|
||||
.LC30:
|
||||
cmpl $0,-4(%ebp)
|
||||
jle .LC32
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
leal 8(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
movl %eax,%edi
|
||||
jmp .LC27
|
||||
.LC32:
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%eax
|
||||
jmp .LC27
|
||||
.LC28:
|
||||
cmpl $2000,next
|
||||
jl .LC34
|
||||
pushl $.LC36
|
||||
call err
|
||||
addl $4,%esp
|
||||
.LC34:
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl $0,words(%edi)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl $0,words+8(%edi)
|
||||
movl $0,words+4(%edi)
|
||||
pushl 20(%ebp)
|
||||
call strlen
|
||||
addl $4,%esp
|
||||
leal 1(%eax),%edi
|
||||
pushl %edi
|
||||
call malloc
|
||||
addl $4,%esp
|
||||
movl next,%esi
|
||||
sall $4,%esi
|
||||
movl %eax,words+12(%esi)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl words+12(%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC40
|
||||
pushl $.LC43
|
||||
call err
|
||||
addl $4,%esp
|
||||
.LC40:
|
||||
pushl 20(%ebp)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
pushl words+12(%edi)
|
||||
call strcpy
|
||||
addl $8,%esp
|
||||
movl next,%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,next
|
||||
sall $4,%edi
|
||||
leal words(%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movl %edi,(,%esi)
|
||||
movl %edi,%eax
|
||||
.LC27:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf45:
|
||||
.size lookup,.Lf45-lookup
|
||||
.globl tprint
|
||||
.align 16
|
||||
.type tprint,@function
|
||||
tprint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $0,%edi
|
||||
je .LC47
|
||||
movl 20(%ebp),%edi
|
||||
pushl 4(%edi)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
movl 20(%ebp),%edi
|
||||
pushl 12(%edi)
|
||||
pushl (,%edi)
|
||||
pushl $.LC49
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl 20(%ebp),%edi
|
||||
pushl 8(%edi)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
.LC47:
|
||||
movl $0,%eax
|
||||
.LC46:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf50:
|
||||
.size tprint,.Lf50-tprint
|
||||
.globl strcmp
|
||||
.align 16
|
||||
.type strcmp,@function
|
||||
strcmp:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
jmp .LC53
|
||||
.LC52:
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,20(%ebp)
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC55
|
||||
movl $0,%eax
|
||||
jmp .LC51
|
||||
.LC55:
|
||||
incl 24(%ebp)
|
||||
.LC53:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movsbl (,%esi),%esi
|
||||
cmpl %esi,%edi
|
||||
je .LC52
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC57
|
||||
movl $-1,%eax
|
||||
jmp .LC51
|
||||
.LC57:
|
||||
movl 24(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC59
|
||||
movl $1,%eax
|
||||
jmp .LC51
|
||||
.LC59:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movsbl (,%esi),%esi
|
||||
movl %edi,%eax
|
||||
subl %esi,%eax
|
||||
.LC51:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf61:
|
||||
.size strcmp,.Lf61-strcmp
|
||||
.bss
|
||||
.globl next
|
||||
.align 4
|
||||
.type next,@object
|
||||
.size next,4
|
||||
.comm next,4
|
||||
.globl words
|
||||
.align 4
|
||||
.type words,@object
|
||||
.size words,32000
|
||||
.comm words,32000
|
||||
.data
|
||||
.align 1
|
||||
.LC49:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC43:
|
||||
.byte 111
|
||||
.byte 117
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 111
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 119
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 97
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC36:
|
||||
.byte 111
|
||||
.byte 117
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 111
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 110
|
||||
.byte 111
|
||||
.byte 100
|
||||
.byte 101
|
||||
.byte 32
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 97
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 63
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $24,%esp
|
||||
movl $0,-24(%ebp)
|
||||
movl $0,next
|
||||
jmp .LC3
|
||||
.LC2:
|
||||
leal -24(%ebp),%edi
|
||||
pushl %edi
|
||||
leal -20(%ebp),%edi
|
||||
pushl %edi
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
incl (,%eax)
|
||||
.LC3:
|
||||
leal -20(%ebp),%edi
|
||||
pushl %edi
|
||||
call getword
|
||||
addl $4,%esp
|
||||
cmpl $0,%eax
|
||||
jne .LC2
|
||||
pushl -24(%ebp)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf5:
|
||||
.size main,.Lf5-main
|
||||
.globl err
|
||||
.align 16
|
||||
.type err,@function
|
||||
err:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC7
|
||||
call printf
|
||||
addl $8,%esp
|
||||
pushl $1
|
||||
call exit
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC6:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf8:
|
||||
.size err,.Lf8-err
|
||||
.globl getword
|
||||
.align 16
|
||||
.type getword,@function
|
||||
getword:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
.LC10:
|
||||
.LC11:
|
||||
call getchar
|
||||
movl %eax,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
cmpl $-1,%edi
|
||||
je .LC13
|
||||
pushl -4(%ebp)
|
||||
call isletter
|
||||
addl $4,%esp
|
||||
cmpl $0,%eax
|
||||
je .LC10
|
||||
.LC13:
|
||||
movl 20(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC17
|
||||
.LC14:
|
||||
movl -8(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,-8(%ebp)
|
||||
movl -4(%ebp),%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,(,%edi)
|
||||
.LC15:
|
||||
call getchar
|
||||
movl %eax,-4(%ebp)
|
||||
.LC17:
|
||||
pushl -4(%ebp)
|
||||
call isletter
|
||||
addl $4,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
cmpl $0,%eax
|
||||
jne .LC14
|
||||
movl -8(%ebp),%edi
|
||||
movb $0,(,%edi)
|
||||
movl -8(%ebp),%edi
|
||||
movl 20(%ebp),%esi
|
||||
cmpl %esi,%edi
|
||||
jbe .LC18
|
||||
movl $1,%eax
|
||||
jmp .LC9
|
||||
.LC18:
|
||||
movl $0,%eax
|
||||
.LC9:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf20:
|
||||
.size getword,.Lf20-getword
|
||||
.globl isletter
|
||||
.align 16
|
||||
.type isletter,@function
|
||||
isletter:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $65,%edi
|
||||
jl .LC22
|
||||
cmpl $90,%edi
|
||||
jg .LC22
|
||||
addl $32,20(%ebp)
|
||||
.LC22:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $97,%edi
|
||||
jl .LC24
|
||||
cmpl $122,%edi
|
||||
jg .LC24
|
||||
movl 20(%ebp),%eax
|
||||
jmp .LC21
|
||||
.LC24:
|
||||
movl $0,%eax
|
||||
.LC21:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf26:
|
||||
.size isletter,.Lf26-isletter
|
||||
.globl lookup
|
||||
.align 16
|
||||
.type lookup,@function
|
||||
lookup:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
je .LC28
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
pushl 12(%edi)
|
||||
pushl 20(%ebp)
|
||||
call strcmp
|
||||
addl $8,%esp
|
||||
movl %eax,-4(%ebp)
|
||||
cmpl $0,-4(%ebp)
|
||||
jge .LC30
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
leal 4(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
movl %eax,%edi
|
||||
jmp .LC27
|
||||
.LC30:
|
||||
cmpl $0,-4(%ebp)
|
||||
jle .LC32
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%edi
|
||||
leal 8(%edi),%edi
|
||||
pushl %edi
|
||||
pushl 20(%ebp)
|
||||
call lookup
|
||||
addl $8,%esp
|
||||
movl %eax,%edi
|
||||
jmp .LC27
|
||||
.LC32:
|
||||
movl 24(%ebp),%edi
|
||||
movl (,%edi),%eax
|
||||
jmp .LC27
|
||||
.LC28:
|
||||
cmpl $2000,next
|
||||
jl .LC34
|
||||
pushl $.LC36
|
||||
call err
|
||||
addl $4,%esp
|
||||
.LC34:
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl $0,words(%edi)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl $0,words+8(%edi)
|
||||
movl $0,words+4(%edi)
|
||||
pushl 20(%ebp)
|
||||
call strlen
|
||||
addl $4,%esp
|
||||
leal 1(%eax),%edi
|
||||
pushl %edi
|
||||
call malloc
|
||||
addl $4,%esp
|
||||
movl next,%esi
|
||||
sall $4,%esi
|
||||
movl %eax,words+12(%esi)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
movl words+12(%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC40
|
||||
pushl $.LC43
|
||||
call err
|
||||
addl $4,%esp
|
||||
.LC40:
|
||||
pushl 20(%ebp)
|
||||
movl next,%edi
|
||||
sall $4,%edi
|
||||
pushl words+12(%edi)
|
||||
call strcpy
|
||||
addl $8,%esp
|
||||
movl next,%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,next
|
||||
sall $4,%edi
|
||||
leal words(%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movl %edi,(,%esi)
|
||||
movl %edi,%eax
|
||||
.LC27:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf45:
|
||||
.size lookup,.Lf45-lookup
|
||||
.globl tprint
|
||||
.align 16
|
||||
.type tprint,@function
|
||||
tprint:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $0,%edi
|
||||
je .LC47
|
||||
movl 20(%ebp),%edi
|
||||
pushl 4(%edi)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
movl 20(%ebp),%edi
|
||||
pushl 12(%edi)
|
||||
pushl (,%edi)
|
||||
pushl $.LC49
|
||||
call printf
|
||||
addl $12,%esp
|
||||
movl 20(%ebp),%edi
|
||||
pushl 8(%edi)
|
||||
call tprint
|
||||
addl $4,%esp
|
||||
.LC47:
|
||||
movl $0,%eax
|
||||
.LC46:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf50:
|
||||
.size tprint,.Lf50-tprint
|
||||
.globl strcmp
|
||||
.align 16
|
||||
.type strcmp,@function
|
||||
strcmp:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
jmp .LC53
|
||||
.LC52:
|
||||
movl 20(%ebp),%edi
|
||||
leal 1(%edi),%esi
|
||||
movl %esi,20(%ebp)
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC55
|
||||
movl $0,%eax
|
||||
jmp .LC51
|
||||
.LC55:
|
||||
incl 24(%ebp)
|
||||
.LC53:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movsbl (,%esi),%esi
|
||||
cmpl %esi,%edi
|
||||
je .LC52
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC57
|
||||
movl $-1,%eax
|
||||
jmp .LC51
|
||||
.LC57:
|
||||
movl 24(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC59
|
||||
movl $1,%eax
|
||||
jmp .LC51
|
||||
.LC59:
|
||||
movl 20(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
movl 24(%ebp),%esi
|
||||
movsbl (,%esi),%esi
|
||||
movl %edi,%eax
|
||||
subl %esi,%eax
|
||||
.LC51:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf61:
|
||||
.size strcmp,.Lf61-strcmp
|
||||
.bss
|
||||
.globl next
|
||||
.align 4
|
||||
.type next,@object
|
||||
.size next,4
|
||||
.comm next,4
|
||||
.globl words
|
||||
.align 4
|
||||
.type words,@object
|
||||
.size words,32000
|
||||
.comm words,32000
|
||||
.data
|
||||
.align 1
|
||||
.LC49:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 9
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC43:
|
||||
.byte 111
|
||||
.byte 117
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 111
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 119
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 97
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC36:
|
||||
.byte 111
|
||||
.byte 117
|
||||
.byte 116
|
||||
.byte 32
|
||||
.byte 111
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 110
|
||||
.byte 111
|
||||
.byte 100
|
||||
.byte 101
|
||||
.byte 32
|
||||
.byte 115
|
||||
.byte 116
|
||||
.byte 111
|
||||
.byte 114
|
||||
.byte 97
|
||||
.byte 103
|
||||
.byte 101
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 63
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
||||
|
|
20
lcc/x86/linux/tst/yacc.1bk
Normal file → Executable file
20
lcc/x86/linux/tst/yacc.1bk
Normal file → Executable file
|
@ -1,10 +1,10 @@
|
|||
a
|
||||
b
|
||||
load
|
||||
negate
|
||||
push 5
|
||||
c
|
||||
load
|
||||
multiply
|
||||
add
|
||||
store
|
||||
a
|
||||
b
|
||||
load
|
||||
negate
|
||||
push 5
|
||||
c
|
||||
load
|
||||
multiply
|
||||
add
|
||||
store
|
||||
|
|
6
lcc/x86/linux/tst/yacc.2bk
Normal file → Executable file
6
lcc/x86/linux/tst/yacc.2bk
Normal file → Executable file
|
@ -1,3 +1,3 @@
|
|||
tst/yacc.c:345: warning: missing return value
|
||||
tst/yacc.c:349: warning: missing return value
|
||||
tst/yacc.c:359: warning: missing return value
|
||||
tst/yacc.c:345: warning: missing return value
|
||||
tst/yacc.c:349: warning: missing return value
|
||||
tst/yacc.c:359: warning: missing return value
|
||||
|
|
5052
lcc/x86/linux/tst/yacc.sbk
Normal file → Executable file
5052
lcc/x86/linux/tst/yacc.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
184
lcc/x86/win32/tst/8q.1bk
Normal file → Executable file
184
lcc/x86/win32/tst/8q.1bk
Normal file → Executable file
|
@ -1,92 +1,92 @@
|
|||
1 5 8 6 3 7 2 4
|
||||
1 6 8 3 7 4 2 5
|
||||
1 7 4 6 8 2 5 3
|
||||
1 7 5 8 2 4 6 3
|
||||
2 4 6 8 3 1 7 5
|
||||
2 5 7 1 3 8 6 4
|
||||
2 5 7 4 1 8 6 3
|
||||
2 6 1 7 4 8 3 5
|
||||
2 6 8 3 1 4 7 5
|
||||
2 7 3 6 8 5 1 4
|
||||
2 7 5 8 1 4 6 3
|
||||
2 8 6 1 3 5 7 4
|
||||
3 1 7 5 8 2 4 6
|
||||
3 5 2 8 1 7 4 6
|
||||
3 5 2 8 6 4 7 1
|
||||
3 5 7 1 4 2 8 6
|
||||
3 5 8 4 1 7 2 6
|
||||
3 6 2 5 8 1 7 4
|
||||
3 6 2 7 1 4 8 5
|
||||
3 6 2 7 5 1 8 4
|
||||
3 6 4 1 8 5 7 2
|
||||
3 6 4 2 8 5 7 1
|
||||
3 6 8 1 4 7 5 2
|
||||
3 6 8 1 5 7 2 4
|
||||
3 6 8 2 4 1 7 5
|
||||
3 7 2 8 5 1 4 6
|
||||
3 7 2 8 6 4 1 5
|
||||
3 8 4 7 1 6 2 5
|
||||
4 1 5 8 2 7 3 6
|
||||
4 1 5 8 6 3 7 2
|
||||
4 2 5 8 6 1 3 7
|
||||
4 2 7 3 6 8 1 5
|
||||
4 2 7 3 6 8 5 1
|
||||
4 2 7 5 1 8 6 3
|
||||
4 2 8 5 7 1 3 6
|
||||
4 2 8 6 1 3 5 7
|
||||
4 6 1 5 2 8 3 7
|
||||
4 6 8 2 7 1 3 5
|
||||
4 6 8 3 1 7 5 2
|
||||
4 7 1 8 5 2 6 3
|
||||
4 7 3 8 2 5 1 6
|
||||
4 7 5 2 6 1 3 8
|
||||
4 7 5 3 1 6 8 2
|
||||
4 8 1 3 6 2 7 5
|
||||
4 8 1 5 7 2 6 3
|
||||
4 8 5 3 1 7 2 6
|
||||
5 1 4 6 8 2 7 3
|
||||
5 1 8 4 2 7 3 6
|
||||
5 1 8 6 3 7 2 4
|
||||
5 2 4 6 8 3 1 7
|
||||
5 2 4 7 3 8 6 1
|
||||
5 2 6 1 7 4 8 3
|
||||
5 2 8 1 4 7 3 6
|
||||
5 3 1 6 8 2 4 7
|
||||
5 3 1 7 2 8 6 4
|
||||
5 3 8 4 7 1 6 2
|
||||
5 7 1 3 8 6 4 2
|
||||
5 7 1 4 2 8 6 3
|
||||
5 7 2 4 8 1 3 6
|
||||
5 7 2 6 3 1 4 8
|
||||
5 7 2 6 3 1 8 4
|
||||
5 7 4 1 3 8 6 2
|
||||
5 8 4 1 3 6 2 7
|
||||
5 8 4 1 7 2 6 3
|
||||
6 1 5 2 8 3 7 4
|
||||
6 2 7 1 3 5 8 4
|
||||
6 2 7 1 4 8 5 3
|
||||
6 3 1 7 5 8 2 4
|
||||
6 3 1 8 4 2 7 5
|
||||
6 3 1 8 5 2 4 7
|
||||
6 3 5 7 1 4 2 8
|
||||
6 3 5 8 1 4 2 7
|
||||
6 3 7 2 4 8 1 5
|
||||
6 3 7 2 8 5 1 4
|
||||
6 3 7 4 1 8 2 5
|
||||
6 4 1 5 8 2 7 3
|
||||
6 4 2 8 5 7 1 3
|
||||
6 4 7 1 3 5 2 8
|
||||
6 4 7 1 8 2 5 3
|
||||
6 8 2 4 1 7 5 3
|
||||
7 1 3 8 6 4 2 5
|
||||
7 2 4 1 8 5 3 6
|
||||
7 2 6 3 1 4 8 5
|
||||
7 3 1 6 8 5 2 4
|
||||
7 3 8 2 5 1 6 4
|
||||
7 4 2 5 8 1 3 6
|
||||
7 4 2 8 6 1 3 5
|
||||
7 5 3 1 6 8 2 4
|
||||
8 2 4 1 7 5 3 6
|
||||
8 2 5 3 1 7 4 6
|
||||
8 3 1 6 2 5 7 4
|
||||
8 4 1 3 6 2 7 5
|
||||
1 5 8 6 3 7 2 4
|
||||
1 6 8 3 7 4 2 5
|
||||
1 7 4 6 8 2 5 3
|
||||
1 7 5 8 2 4 6 3
|
||||
2 4 6 8 3 1 7 5
|
||||
2 5 7 1 3 8 6 4
|
||||
2 5 7 4 1 8 6 3
|
||||
2 6 1 7 4 8 3 5
|
||||
2 6 8 3 1 4 7 5
|
||||
2 7 3 6 8 5 1 4
|
||||
2 7 5 8 1 4 6 3
|
||||
2 8 6 1 3 5 7 4
|
||||
3 1 7 5 8 2 4 6
|
||||
3 5 2 8 1 7 4 6
|
||||
3 5 2 8 6 4 7 1
|
||||
3 5 7 1 4 2 8 6
|
||||
3 5 8 4 1 7 2 6
|
||||
3 6 2 5 8 1 7 4
|
||||
3 6 2 7 1 4 8 5
|
||||
3 6 2 7 5 1 8 4
|
||||
3 6 4 1 8 5 7 2
|
||||
3 6 4 2 8 5 7 1
|
||||
3 6 8 1 4 7 5 2
|
||||
3 6 8 1 5 7 2 4
|
||||
3 6 8 2 4 1 7 5
|
||||
3 7 2 8 5 1 4 6
|
||||
3 7 2 8 6 4 1 5
|
||||
3 8 4 7 1 6 2 5
|
||||
4 1 5 8 2 7 3 6
|
||||
4 1 5 8 6 3 7 2
|
||||
4 2 5 8 6 1 3 7
|
||||
4 2 7 3 6 8 1 5
|
||||
4 2 7 3 6 8 5 1
|
||||
4 2 7 5 1 8 6 3
|
||||
4 2 8 5 7 1 3 6
|
||||
4 2 8 6 1 3 5 7
|
||||
4 6 1 5 2 8 3 7
|
||||
4 6 8 2 7 1 3 5
|
||||
4 6 8 3 1 7 5 2
|
||||
4 7 1 8 5 2 6 3
|
||||
4 7 3 8 2 5 1 6
|
||||
4 7 5 2 6 1 3 8
|
||||
4 7 5 3 1 6 8 2
|
||||
4 8 1 3 6 2 7 5
|
||||
4 8 1 5 7 2 6 3
|
||||
4 8 5 3 1 7 2 6
|
||||
5 1 4 6 8 2 7 3
|
||||
5 1 8 4 2 7 3 6
|
||||
5 1 8 6 3 7 2 4
|
||||
5 2 4 6 8 3 1 7
|
||||
5 2 4 7 3 8 6 1
|
||||
5 2 6 1 7 4 8 3
|
||||
5 2 8 1 4 7 3 6
|
||||
5 3 1 6 8 2 4 7
|
||||
5 3 1 7 2 8 6 4
|
||||
5 3 8 4 7 1 6 2
|
||||
5 7 1 3 8 6 4 2
|
||||
5 7 1 4 2 8 6 3
|
||||
5 7 2 4 8 1 3 6
|
||||
5 7 2 6 3 1 4 8
|
||||
5 7 2 6 3 1 8 4
|
||||
5 7 4 1 3 8 6 2
|
||||
5 8 4 1 3 6 2 7
|
||||
5 8 4 1 7 2 6 3
|
||||
6 1 5 2 8 3 7 4
|
||||
6 2 7 1 3 5 8 4
|
||||
6 2 7 1 4 8 5 3
|
||||
6 3 1 7 5 8 2 4
|
||||
6 3 1 8 4 2 7 5
|
||||
6 3 1 8 5 2 4 7
|
||||
6 3 5 7 1 4 2 8
|
||||
6 3 5 8 1 4 2 7
|
||||
6 3 7 2 4 8 1 5
|
||||
6 3 7 2 8 5 1 4
|
||||
6 3 7 4 1 8 2 5
|
||||
6 4 1 5 8 2 7 3
|
||||
6 4 2 8 5 7 1 3
|
||||
6 4 7 1 3 5 2 8
|
||||
6 4 7 1 8 2 5 3
|
||||
6 8 2 4 1 7 5 3
|
||||
7 1 3 8 6 4 2 5
|
||||
7 2 4 1 8 5 3 6
|
||||
7 2 6 3 1 4 8 5
|
||||
7 3 1 6 8 5 2 4
|
||||
7 3 8 2 5 1 6 4
|
||||
7 4 2 5 8 1 3 6
|
||||
7 4 2 8 6 1 3 5
|
||||
7 5 3 1 6 8 2 4
|
||||
8 2 4 1 7 5 3 6
|
||||
8 2 5 3 1 7 4 6
|
||||
8 3 1 6 2 5 7 4
|
||||
8 4 1 3 6 2 7 5
|
||||
|
|
4
lcc/x86/win32/tst/8q.2bk
Normal file → Executable file
4
lcc/x86/win32/tst/8q.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/8q.c:30: warning: missing return value
|
||||
tst/8q.c:39: warning: missing return value
|
||||
tst/8q.c:30: warning: missing return value
|
||||
tst/8q.c:39: warning: missing return value
|
||||
|
|
352
lcc/x86/win32/tst/8q.sbk
Normal file → Executable file
352
lcc/x86/win32/tst/8q.sbk
Normal file → Executable file
|
@ -1,176 +1,176 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L2:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*4]
|
||||
mov dword ptr (_down)[edi],1
|
||||
mov dword ptr (_up)[edi],1
|
||||
L3:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],15
|
||||
jl L2
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov dword ptr (_rows)[edi*4],1
|
||||
L7:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L6
|
||||
push 0
|
||||
call _queens
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _queens
|
||||
_queens:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L11:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp dword ptr (_rows)[edi*4],0
|
||||
je L15
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
cmp dword ptr (_up+28)[ebx*4],0
|
||||
je L15
|
||||
lea edi,[esi][edi]
|
||||
cmp dword ptr (_down)[edi*4],0
|
||||
je L15
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
lea ebx,[esi][edi]
|
||||
mov dword ptr (_down)[ebx*4],0
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
mov dword ptr (_up+28)[ebx*4],0
|
||||
mov dword ptr (_rows)[edi*4],0
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
mov dword ptr (_x)[edi*4],esi
|
||||
cmp dword ptr (20)[ebp],7
|
||||
jne L19
|
||||
call _print
|
||||
add esp,0
|
||||
jmp L20
|
||||
L19:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
push edi
|
||||
call _queens
|
||||
add esp,4
|
||||
L20:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
lea ebx,[esi][edi]
|
||||
mov dword ptr (_down)[ebx*4],1
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
mov dword ptr (_up+28)[ebx*4],1
|
||||
mov dword ptr (_rows)[edi*4],1
|
||||
L15:
|
||||
L12:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L11
|
||||
mov eax,0
|
||||
L10:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _print
|
||||
_print:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (_x)[edi*4]
|
||||
lea edi,(49)[edi]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L24:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L23
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L22:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 32 dup (0)
|
||||
public _rows
|
||||
align 4
|
||||
_rows label byte
|
||||
db 32 dup (0)
|
||||
public _down
|
||||
align 4
|
||||
_down label byte
|
||||
db 60 dup (0)
|
||||
public _up
|
||||
align 4
|
||||
_up label byte
|
||||
db 60 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L27 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 32
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L2:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*4]
|
||||
mov dword ptr (_down)[edi],1
|
||||
mov dword ptr (_up)[edi],1
|
||||
L3:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],15
|
||||
jl L2
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov dword ptr (_rows)[edi*4],1
|
||||
L7:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L6
|
||||
push 0
|
||||
call _queens
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _queens
|
||||
_queens:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L11:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp dword ptr (_rows)[edi*4],0
|
||||
je L15
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
cmp dword ptr (_up+28)[ebx*4],0
|
||||
je L15
|
||||
lea edi,[esi][edi]
|
||||
cmp dword ptr (_down)[edi*4],0
|
||||
je L15
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
lea ebx,[esi][edi]
|
||||
mov dword ptr (_down)[ebx*4],0
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
mov dword ptr (_up+28)[ebx*4],0
|
||||
mov dword ptr (_rows)[edi*4],0
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
mov dword ptr (_x)[edi*4],esi
|
||||
cmp dword ptr (20)[ebp],7
|
||||
jne L19
|
||||
call _print
|
||||
add esp,0
|
||||
jmp L20
|
||||
L19:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
push edi
|
||||
call _queens
|
||||
add esp,4
|
||||
L20:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
lea ebx,[esi][edi]
|
||||
mov dword ptr (_down)[ebx*4],1
|
||||
mov ebx,edi
|
||||
sub ebx,esi
|
||||
mov dword ptr (_up+28)[ebx*4],1
|
||||
mov dword ptr (_rows)[edi*4],1
|
||||
L15:
|
||||
L12:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L11
|
||||
mov eax,0
|
||||
L10:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _print
|
||||
_print:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (_x)[edi*4]
|
||||
lea edi,(49)[edi]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L24:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],8
|
||||
jl L23
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L22:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 32 dup (0)
|
||||
public _rows
|
||||
align 4
|
||||
_rows label byte
|
||||
db 32 dup (0)
|
||||
public _down
|
||||
align 4
|
||||
_down label byte
|
||||
db 60 dup (0)
|
||||
public _up
|
||||
align 4
|
||||
_up label byte
|
||||
db 60 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L27 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 32
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
8
lcc/x86/win32/tst/array.1bk
Normal file → Executable file
8
lcc/x86/win32/tst/array.1bk
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
|
||||
|
|
4
lcc/x86/win32/tst/array.2bk
Normal file → Executable file
4
lcc/x86/win32/tst/array.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/array.c:33: warning: missing return value
|
||||
tst/array.c:48: warning: missing return value
|
||||
tst/array.c:33: warning: missing return value
|
||||
tst/array.c:48: warning: missing return value
|
||||
|
|
480
lcc/x86/win32/tst/array.sbk
Normal file → Executable file
480
lcc/x86/win32/tst/array.sbk
Normal file → Executable file
|
@ -1,240 +1,240 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,60
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L2:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov ebx,esi
|
||||
sal ebx,4
|
||||
imul esi,esi,1000
|
||||
lea esi,[edi][esi]
|
||||
mov dword ptr (_x)[ebx][edi*4],esi
|
||||
L7:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L6
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sal esi,4
|
||||
lea esi,(_x)[esi]
|
||||
mov dword ptr (_y)[edi*4],esi
|
||||
L3:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L2
|
||||
call _f
|
||||
add esp,0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L10:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sal esi,4
|
||||
lea esi,(-60)[ebp][esi]
|
||||
mov dword ptr (-12)[ebp],esi
|
||||
mov dword ptr (_y)[edi*4],esi
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L14:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*4]
|
||||
mov esi,dword ptr (-12)[ebp]
|
||||
mov ebx,dword ptr (-8)[ebp]
|
||||
sal ebx,4
|
||||
mov ebx,dword ptr (_x)[ebx][edi]
|
||||
mov dword ptr [esi][edi],ebx
|
||||
L15:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L14
|
||||
L11:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L10
|
||||
lea edi,(_y)
|
||||
push edi
|
||||
lea edi,(-60)[ebp]
|
||||
push edi
|
||||
call _g
|
||||
add esp,8
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L19:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
sal esi,4
|
||||
mov edi,dword ptr (_x)[esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L24:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L23
|
||||
L20:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L19
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L29:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L33:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L34:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L33
|
||||
L30:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L29
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L18:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L38:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L42:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
sal esi,4
|
||||
mov ebx,dword ptr (20)[ebp]
|
||||
lea esi,[ebx][esi]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L43:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L42
|
||||
L39:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L38
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L46:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L50:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov ebx,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr [ebx][esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L51:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L50
|
||||
L47:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L46
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L37:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 12 dup (0)
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 48 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L27 label byte
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,60
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L2:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov ebx,esi
|
||||
sal ebx,4
|
||||
imul esi,esi,1000
|
||||
lea esi,[edi][esi]
|
||||
mov dword ptr (_x)[ebx][edi*4],esi
|
||||
L7:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L6
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sal esi,4
|
||||
lea esi,(_x)[esi]
|
||||
mov dword ptr (_y)[edi*4],esi
|
||||
L3:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L2
|
||||
call _f
|
||||
add esp,0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L10:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sal esi,4
|
||||
lea esi,(-60)[ebp][esi]
|
||||
mov dword ptr (-12)[ebp],esi
|
||||
mov dword ptr (_y)[edi*4],esi
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L14:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*4]
|
||||
mov esi,dword ptr (-12)[ebp]
|
||||
mov ebx,dword ptr (-8)[ebp]
|
||||
sal ebx,4
|
||||
mov ebx,dword ptr (_x)[ebx][edi]
|
||||
mov dword ptr [esi][edi],ebx
|
||||
L15:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L14
|
||||
L11:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L10
|
||||
lea edi,(_y)
|
||||
push edi
|
||||
lea edi,(-60)[ebp]
|
||||
push edi
|
||||
call _g
|
||||
add esp,8
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L19:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
sal esi,4
|
||||
mov edi,dword ptr (_x)[esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L24:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L23
|
||||
L20:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L19
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L29:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L33:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L34:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L33
|
||||
L30:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L29
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L18:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L38:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L42:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
sal esi,4
|
||||
mov ebx,dword ptr (20)[ebp]
|
||||
lea esi,[ebx][esi]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L43:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L42
|
||||
L39:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L38
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-8)[ebp],0
|
||||
L46:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L50:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov ebx,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr [ebx][esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L27)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L51:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],4
|
||||
jl L50
|
||||
L47:
|
||||
inc dword ptr (-8)[ebp]
|
||||
cmp dword ptr (-8)[ebp],3
|
||||
jl L46
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L37:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 12 dup (0)
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 48 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L27 label byte
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
102
lcc/x86/win32/tst/cf.1bk
Normal file → Executable file
102
lcc/x86/win32/tst/cf.1bk
Normal file → Executable file
|
@ -1,51 +1,51 @@
|
|||
char freq
|
||||
011 8.1
|
||||
012 6.1
|
||||
040 11.9
|
||||
! 0.2
|
||||
" 1.5
|
||||
% 0.6
|
||||
& 0.4
|
||||
' 0.4
|
||||
( 2.9
|
||||
) 2.9
|
||||
* 0.8
|
||||
+ 1.3
|
||||
, 1.3
|
||||
- 0.4
|
||||
. 0.6
|
||||
/ 1.0
|
||||
0 2.5
|
||||
1 1.9
|
||||
2 0.6
|
||||
3 0.2
|
||||
7 0.4
|
||||
8 0.2
|
||||
; 3.8
|
||||
< 0.8
|
||||
= 2.7
|
||||
> 0.2
|
||||
[ 1.5
|
||||
\ 0.8
|
||||
] 1.5
|
||||
a 3.1
|
||||
c 4.4
|
||||
e 2.3
|
||||
f 6.0
|
||||
g 1.3
|
||||
h 1.0
|
||||
i 5.0
|
||||
l 1.0
|
||||
m 0.2
|
||||
n 3.3
|
||||
o 2.1
|
||||
p 1.0
|
||||
q 0.4
|
||||
r 4.2
|
||||
s 0.6
|
||||
t 3.8
|
||||
u 1.2
|
||||
v 0.6
|
||||
w 0.2
|
||||
{ 0.6
|
||||
} 0.6
|
||||
char freq
|
||||
011 8.1
|
||||
012 6.1
|
||||
040 11.9
|
||||
! 0.2
|
||||
" 1.5
|
||||
% 0.6
|
||||
& 0.4
|
||||
' 0.4
|
||||
( 2.9
|
||||
) 2.9
|
||||
* 0.8
|
||||
+ 1.3
|
||||
, 1.3
|
||||
- 0.4
|
||||
. 0.6
|
||||
/ 1.0
|
||||
0 2.5
|
||||
1 1.9
|
||||
2 0.6
|
||||
3 0.2
|
||||
7 0.4
|
||||
8 0.2
|
||||
; 3.8
|
||||
< 0.8
|
||||
= 2.7
|
||||
> 0.2
|
||||
[ 1.5
|
||||
\ 0.8
|
||||
] 1.5
|
||||
a 3.1
|
||||
c 4.4
|
||||
e 2.3
|
||||
f 6.0
|
||||
g 1.3
|
||||
h 1.0
|
||||
i 5.0
|
||||
l 1.0
|
||||
m 0.2
|
||||
n 3.3
|
||||
o 2.1
|
||||
p 1.0
|
||||
q 0.4
|
||||
r 4.2
|
||||
s 0.6
|
||||
t 3.8
|
||||
u 1.2
|
||||
v 0.6
|
||||
w 0.2
|
||||
{ 0.6
|
||||
} 0.6
|
||||
|
|
0
lcc/x86/win32/tst/cf.2bk
Normal file → Executable file
0
lcc/x86/win32/tst/cf.2bk
Normal file → Executable file
370
lcc/x86/win32/tst/cf.sbk
Normal file → Executable file
370
lcc/x86/win32/tst/cf.sbk
Normal file → Executable file
|
@ -1,185 +1,185 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,24
|
||||
cmp dword ptr (20)[ebp],1
|
||||
jg L2
|
||||
fld dword ptr (L4)
|
||||
fstp dword ptr (-16)[ebp]
|
||||
jmp L3
|
||||
L2:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov edi,dword ptr (4)[edi]
|
||||
push edi
|
||||
call _atof
|
||||
add esp,4
|
||||
fstp dword ptr (-20)[ebp]
|
||||
fld dword ptr (-20)[ebp]
|
||||
fdiv dword ptr (L5)
|
||||
fstp dword ptr (-16)[ebp]
|
||||
L3:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
fld dword ptr (L4)
|
||||
fstp dword ptr (_f)[edi*4]
|
||||
L7:
|
||||
cmp dword ptr (-4)[ebp],127
|
||||
jle L6
|
||||
mov dword ptr (-8)[ebp],0
|
||||
jmp L11
|
||||
L10:
|
||||
mov edi,dword ptr (-12)[ebp]
|
||||
lea edi,(_f)[edi*4]
|
||||
fld dword ptr [edi]
|
||||
fadd dword ptr (L13)
|
||||
fstp dword ptr [edi]
|
||||
inc dword ptr (-8)[ebp]
|
||||
L11:
|
||||
call _getchar
|
||||
add esp,0
|
||||
mov dword ptr (-12)[ebp],eax
|
||||
cmp eax,-1
|
||||
jne L10
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L15:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
fld dword ptr (_f)[edi*4]
|
||||
fstp dword ptr (-24)[ebp]
|
||||
fld dword ptr (L4)
|
||||
fcomp dword ptr (-24)[ebp]
|
||||
fstsw ax
|
||||
sahf
|
||||
je L19
|
||||
fld dword ptr (-24)[ebp]
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
push edi
|
||||
fild dword ptr 0[esp]
|
||||
add esp,4
|
||||
fdivp st(1),st
|
||||
fld dword ptr (-16)[ebp]
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
ja L19
|
||||
cmp dword ptr (-4)[ebp],32
|
||||
jg L21
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L23)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L22
|
||||
L21:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L22:
|
||||
fld dword ptr (L5)
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
fmul dword ptr (_f)[edi*4]
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
push edi
|
||||
fild dword ptr 0[esp]
|
||||
add esp,4
|
||||
fdivp st(1),st
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
L19:
|
||||
L16:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],127
|
||||
jle L15
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _getchar:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _atof:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _f
|
||||
align 4
|
||||
_f label byte
|
||||
db 512 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L25 label byte
|
||||
db 9
|
||||
db 37
|
||||
db 46
|
||||
db 49
|
||||
db 102
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L23 label byte
|
||||
db 37
|
||||
db 48
|
||||
db 51
|
||||
db 111
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 99
|
||||
db 104
|
||||
db 97
|
||||
db 114
|
||||
db 9
|
||||
db 102
|
||||
db 114
|
||||
db 101
|
||||
db 113
|
||||
db 10
|
||||
db 0
|
||||
align 4
|
||||
L13 label byte
|
||||
dd 03f800000H
|
||||
align 4
|
||||
L5 label byte
|
||||
dd 042c80000H
|
||||
align 4
|
||||
L4 label byte
|
||||
dd 00H
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,24
|
||||
cmp dword ptr (20)[ebp],1
|
||||
jg L2
|
||||
fld dword ptr (L4)
|
||||
fstp dword ptr (-16)[ebp]
|
||||
jmp L3
|
||||
L2:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov edi,dword ptr (4)[edi]
|
||||
push edi
|
||||
call _atof
|
||||
add esp,4
|
||||
fstp dword ptr (-20)[ebp]
|
||||
fld dword ptr (-20)[ebp]
|
||||
fdiv dword ptr (L5)
|
||||
fstp dword ptr (-16)[ebp]
|
||||
L3:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L6:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
fld dword ptr (L4)
|
||||
fstp dword ptr (_f)[edi*4]
|
||||
L7:
|
||||
cmp dword ptr (-4)[ebp],127
|
||||
jle L6
|
||||
mov dword ptr (-8)[ebp],0
|
||||
jmp L11
|
||||
L10:
|
||||
mov edi,dword ptr (-12)[ebp]
|
||||
lea edi,(_f)[edi*4]
|
||||
fld dword ptr [edi]
|
||||
fadd dword ptr (L13)
|
||||
fstp dword ptr [edi]
|
||||
inc dword ptr (-8)[ebp]
|
||||
L11:
|
||||
call _getchar
|
||||
add esp,0
|
||||
mov dword ptr (-12)[ebp],eax
|
||||
cmp eax,-1
|
||||
jne L10
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L15:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
fld dword ptr (_f)[edi*4]
|
||||
fstp dword ptr (-24)[ebp]
|
||||
fld dword ptr (L4)
|
||||
fcomp dword ptr (-24)[ebp]
|
||||
fstsw ax
|
||||
sahf
|
||||
je L19
|
||||
fld dword ptr (-24)[ebp]
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
push edi
|
||||
fild dword ptr 0[esp]
|
||||
add esp,4
|
||||
fdivp st(1),st
|
||||
fld dword ptr (-16)[ebp]
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
ja L19
|
||||
cmp dword ptr (-4)[ebp],32
|
||||
jg L21
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L23)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L22
|
||||
L21:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L22:
|
||||
fld dword ptr (L5)
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
fmul dword ptr (_f)[edi*4]
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
push edi
|
||||
fild dword ptr 0[esp]
|
||||
add esp,4
|
||||
fdivp st(1),st
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
L19:
|
||||
L16:
|
||||
inc dword ptr (-4)[ebp]
|
||||
cmp dword ptr (-4)[ebp],127
|
||||
jle L15
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _getchar:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _atof:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _f
|
||||
align 4
|
||||
_f label byte
|
||||
db 512 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L25 label byte
|
||||
db 9
|
||||
db 37
|
||||
db 46
|
||||
db 49
|
||||
db 102
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L23 label byte
|
||||
db 37
|
||||
db 48
|
||||
db 51
|
||||
db 111
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 99
|
||||
db 104
|
||||
db 97
|
||||
db 114
|
||||
db 9
|
||||
db 102
|
||||
db 114
|
||||
db 101
|
||||
db 113
|
||||
db 10
|
||||
db 0
|
||||
align 4
|
||||
L13 label byte
|
||||
dd 03f800000H
|
||||
align 4
|
||||
L5 label byte
|
||||
dd 042c80000H
|
||||
align 4
|
||||
L4 label byte
|
||||
dd 00H
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
96
lcc/x86/win32/tst/cq.1bk
Normal file → Executable file
96
lcc/x86/win32/tst/cq.1bk
Normal file → Executable file
|
@ -1,48 +1,48 @@
|
|||
Section s22 returned 0.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Section s241 returned 0.
|
||||
Section s243 returned 0.
|
||||
Section s244 returned 0.
|
||||
Section s25 returned 0.
|
||||
8 bits in chars.
|
||||
32 bits in ints.
|
||||
16 bits in shorts.
|
||||
32 bits in longs.
|
||||
32 bits in unsigneds.
|
||||
32 bits in floats.
|
||||
64 bits in doubles.
|
||||
1.192093e-007 is the least number that can be added to 1. (float).
|
||||
2.220446e-016 is the least number that can be added to 1. (double).
|
||||
Section s26 returned 0.
|
||||
Section s4 returned 0.
|
||||
Section s61 returned 0.
|
||||
Section s626 returned 0.
|
||||
Section s71 returned 0.
|
||||
Section s72 returned 0.
|
||||
Section s757 returned 0.
|
||||
Section s7813 returned 0.
|
||||
Section s714 returned 0.
|
||||
Section s715 returned 0.
|
||||
Register count for char is unreliable.
|
||||
Register count for pointer is unreliable.
|
||||
Register count for int is unreliable.
|
||||
Section s81 returned 0.
|
||||
Section s84 returned 0.
|
||||
char alignment: 1
|
||||
short alignment: 2
|
||||
int alignment: 4
|
||||
long alignment: 4
|
||||
unsigned alignment: 4
|
||||
float alignment: 4
|
||||
double alignment: 4
|
||||
Sign extension in fields
|
||||
Be especially careful with 1-bit fields!
|
||||
Section s85 returned 0.
|
||||
Section s86 returned 0.
|
||||
Section s88 returned 0.
|
||||
Section s9 returned 0.
|
||||
|
||||
No errors detected.
|
||||
Section s22 returned 0.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Decimal and octal/hex constants sometimes give
|
||||
different results when assigned to longs.
|
||||
Section s241 returned 0.
|
||||
Section s243 returned 0.
|
||||
Section s244 returned 0.
|
||||
Section s25 returned 0.
|
||||
8 bits in chars.
|
||||
32 bits in ints.
|
||||
16 bits in shorts.
|
||||
32 bits in longs.
|
||||
32 bits in unsigneds.
|
||||
32 bits in floats.
|
||||
64 bits in doubles.
|
||||
1.192093e-007 is the least number that can be added to 1. (float).
|
||||
2.220446e-016 is the least number that can be added to 1. (double).
|
||||
Section s26 returned 0.
|
||||
Section s4 returned 0.
|
||||
Section s61 returned 0.
|
||||
Section s626 returned 0.
|
||||
Section s71 returned 0.
|
||||
Section s72 returned 0.
|
||||
Section s757 returned 0.
|
||||
Section s7813 returned 0.
|
||||
Section s714 returned 0.
|
||||
Section s715 returned 0.
|
||||
Register count for char is unreliable.
|
||||
Register count for pointer is unreliable.
|
||||
Register count for int is unreliable.
|
||||
Section s81 returned 0.
|
||||
Section s84 returned 0.
|
||||
char alignment: 1
|
||||
short alignment: 2
|
||||
int alignment: 4
|
||||
long alignment: 4
|
||||
unsigned alignment: 4
|
||||
float alignment: 4
|
||||
double alignment: 4
|
||||
Sign extension in fields
|
||||
Be especially careful with 1-bit fields!
|
||||
Section s85 returned 0.
|
||||
Section s86 returned 0.
|
||||
Section s88 returned 0.
|
||||
Section s9 returned 0.
|
||||
|
||||
No errors detected.
|
||||
|
|
50
lcc/x86/win32/tst/cq.2bk
Normal file → Executable file
50
lcc/x86/win32/tst/cq.2bk
Normal file → Executable file
|
@ -1,25 +1,25 @@
|
|||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `4294967296'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `040000000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `0x100000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `68719476735'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0777777777777'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0xfffffffff'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `68719476736'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `01000000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `0x1000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:533: warning: missing return value
|
||||
tst/cq.c:1169: warning: missing return value
|
||||
tst/cq.c:5294: warning: unreachable code
|
||||
tst/cq.c:5303: warning: missing return value
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `4294967296'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `040000000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:395: warning: overflow in constant `0x100000000'
|
||||
tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `68719476735'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0777777777777'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:396: warning: overflow in constant `0xfffffffff'
|
||||
tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `68719476736'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `01000000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:397: warning: overflow in constant `0x1000000000'
|
||||
tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
|
||||
tst/cq.c:533: warning: missing return value
|
||||
tst/cq.c:1169: warning: missing return value
|
||||
tst/cq.c:5294: warning: unreachable code
|
||||
tst/cq.c:5303: warning: missing return value
|
||||
|
|
33284
lcc/x86/win32/tst/cq.sbk
Normal file → Executable file
33284
lcc/x86/win32/tst/cq.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
22
lcc/x86/win32/tst/cvt.1bk
Normal file → Executable file
22
lcc/x86/win32/tst/cvt.1bk
Normal file → Executable file
|
@ -1,11 +1,11 @@
|
|||
1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
|
||||
2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
|
||||
3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
|
||||
4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
|
||||
5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
|
||||
6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
|
||||
7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
|
||||
8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
|
||||
9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
|
||||
10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
|
||||
11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
|
||||
1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
|
||||
2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
|
||||
3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
|
||||
4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
|
||||
5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
|
||||
6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
|
||||
7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
|
||||
8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
|
||||
9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
|
||||
10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
|
||||
11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
|
||||
|
|
4
lcc/x86/win32/tst/cvt.2bk
Normal file → Executable file
4
lcc/x86/win32/tst/cvt.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
|
||||
tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
|
||||
tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
|
||||
tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
|
||||
|
|
1484
lcc/x86/win32/tst/cvt.sbk
Normal file → Executable file
1484
lcc/x86/win32/tst/cvt.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
10
lcc/x86/win32/tst/fields.1bk
Normal file → Executable file
10
lcc/x86/win32/tst/fields.1bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
x = 1 2 3 4 -3 6
|
||||
y = 3 8 9
|
||||
x = 1 2 3 0 0 6
|
||||
y = 2 8 16
|
||||
p->a = 0x3, p->b = 0xf
|
||||
x = 1 2 3 4 -3 6
|
||||
y = 3 8 9
|
||||
x = 1 2 3 0 0 6
|
||||
y = 2 8 16
|
||||
p->a = 0x3, p->b = 0xf
|
||||
|
|
8
lcc/x86/win32/tst/fields.2bk
Normal file → Executable file
8
lcc/x86/win32/tst/fields.2bk
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
tst/fields.c:6: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:8: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:30: warning: missing return value
|
||||
tst/fields.c:34: warning: missing return value
|
||||
tst/fields.c:6: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:8: warning: initializer exceeds bit-field width
|
||||
tst/fields.c:30: warning: missing return value
|
||||
tst/fields.c:34: warning: missing return value
|
||||
|
|
646
lcc/x86/win32/tst/fields.sbk
Normal file → Executable file
646
lcc/x86/win32/tst/fields.sbk
Normal file → Executable file
|
@ -1,323 +1,323 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
db 2
|
||||
db 3 dup (0)
|
||||
db 03H
|
||||
db 040H
|
||||
db 2 dup (0)
|
||||
db 050H
|
||||
db 6
|
||||
db 2 dup (0)
|
||||
public _i
|
||||
align 4
|
||||
_i label byte
|
||||
dd 16
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 023H
|
||||
db 3 dup (0)
|
||||
db 09H
|
||||
db 00H
|
||||
db 00H
|
||||
db 00H
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
movsx edi,byte ptr (_x+13)
|
||||
push edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
sal edi,25
|
||||
sar edi,29
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,16
|
||||
sar edi,28
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,20
|
||||
sar edi,20
|
||||
push edi
|
||||
movsx edi,byte ptr (_x+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_x)
|
||||
push edi
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,28
|
||||
mov edi,dword ptr (_y+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_y)
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,16
|
||||
mov edi,dword ptr (_x+8)
|
||||
and edi,0ffff0fffH
|
||||
mov esi,dword ptr (_i)
|
||||
sal esi,28
|
||||
sar esi,28
|
||||
shl esi,12
|
||||
and esi,0f000H
|
||||
or edi,esi
|
||||
mov dword ptr (_x+8),edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
and edi,0ffffff8fH
|
||||
mov dword ptr (_x+12),edi
|
||||
movsx edi,byte ptr (_x+13)
|
||||
push edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
sal edi,25
|
||||
sar edi,29
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,16
|
||||
sar edi,28
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,20
|
||||
sar edi,20
|
||||
push edi
|
||||
movsx edi,byte ptr (_x+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_x)
|
||||
push edi
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,28
|
||||
mov edi,dword ptr (_y)
|
||||
and edi,0fffffffcH
|
||||
or edi,2
|
||||
mov dword ptr (_y),edi
|
||||
mov edi,dword ptr (_i)
|
||||
mov dword ptr (_y+4),edi
|
||||
mov edi,dword ptr (_y+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_y)
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,16
|
||||
lea edi,(_x)
|
||||
push edi
|
||||
call _f2
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f1
|
||||
_f1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
and dword ptr [edi],0ffffffc3H
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0fffffffcH
|
||||
mov ebx,0
|
||||
and ebx,3
|
||||
and ebx,3
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
and edi,60
|
||||
cmp edi,0
|
||||
je L22
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L22:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
or dword ptr [edi],3
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
or dword ptr [edi],60
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L21:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
cmp dword ptr (_i),0
|
||||
jne L28
|
||||
mov dword ptr (-4)[ebp],1
|
||||
jmp L29
|
||||
L28:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L29:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0fffffffcH
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
and ebx,3
|
||||
and ebx,3
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _f1
|
||||
add esp,4
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0ffffffc3H
|
||||
mov ebx,0
|
||||
and ebx,15
|
||||
lea ebx,[ebx*4]
|
||||
and ebx,60
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L26:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L25 label byte
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 97
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 120
|
||||
db 37
|
||||
db 120
|
||||
db 44
|
||||
db 32
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 98
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 120
|
||||
db 37
|
||||
db 120
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 98
|
||||
db 32
|
||||
db 33
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 33
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L10 label byte
|
||||
db 121
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 120
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
db 2
|
||||
db 3 dup (0)
|
||||
db 03H
|
||||
db 040H
|
||||
db 2 dup (0)
|
||||
db 050H
|
||||
db 6
|
||||
db 2 dup (0)
|
||||
public _i
|
||||
align 4
|
||||
_i label byte
|
||||
dd 16
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 023H
|
||||
db 3 dup (0)
|
||||
db 09H
|
||||
db 00H
|
||||
db 00H
|
||||
db 00H
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
movsx edi,byte ptr (_x+13)
|
||||
push edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
sal edi,25
|
||||
sar edi,29
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,16
|
||||
sar edi,28
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,20
|
||||
sar edi,20
|
||||
push edi
|
||||
movsx edi,byte ptr (_x+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_x)
|
||||
push edi
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,28
|
||||
mov edi,dword ptr (_y+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_y)
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,16
|
||||
mov edi,dword ptr (_x+8)
|
||||
and edi,0ffff0fffH
|
||||
mov esi,dword ptr (_i)
|
||||
sal esi,28
|
||||
sar esi,28
|
||||
shl esi,12
|
||||
and esi,0f000H
|
||||
or edi,esi
|
||||
mov dword ptr (_x+8),edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
and edi,0ffffff8fH
|
||||
mov dword ptr (_x+12),edi
|
||||
movsx edi,byte ptr (_x+13)
|
||||
push edi
|
||||
mov edi,dword ptr (_x+12)
|
||||
sal edi,25
|
||||
sar edi,29
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,16
|
||||
sar edi,28
|
||||
push edi
|
||||
mov edi,dword ptr (_x+8)
|
||||
sal edi,20
|
||||
sar edi,20
|
||||
push edi
|
||||
movsx edi,byte ptr (_x+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_x)
|
||||
push edi
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,28
|
||||
mov edi,dword ptr (_y)
|
||||
and edi,0fffffffcH
|
||||
or edi,2
|
||||
mov dword ptr (_y),edi
|
||||
mov edi,dword ptr (_i)
|
||||
mov dword ptr (_y+4),edi
|
||||
mov edi,dword ptr (_y+4)
|
||||
push edi
|
||||
mov edi,dword ptr (_y)
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,16
|
||||
lea edi,(_x)
|
||||
push edi
|
||||
call _f2
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f1
|
||||
_f1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
and dword ptr [edi],0ffffffc3H
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0fffffffcH
|
||||
mov ebx,0
|
||||
and ebx,3
|
||||
and ebx,3
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
and edi,60
|
||||
cmp edi,0
|
||||
je L22
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L22:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
or dword ptr [edi],3
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
or dword ptr [edi],60
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
mov esi,edi
|
||||
shr esi,2
|
||||
and esi,15
|
||||
push esi
|
||||
and edi,3
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L21:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
cmp dword ptr (_i),0
|
||||
jne L28
|
||||
mov dword ptr (-4)[ebp],1
|
||||
jmp L29
|
||||
L28:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L29:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0fffffffcH
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
and ebx,3
|
||||
and ebx,3
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _f1
|
||||
add esp,4
|
||||
mov esi,dword ptr [edi]
|
||||
and esi,0ffffffc3H
|
||||
mov ebx,0
|
||||
and ebx,15
|
||||
lea ebx,[ebx*4]
|
||||
and ebx,60
|
||||
or esi,ebx
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L26:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L25 label byte
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 97
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 120
|
||||
db 37
|
||||
db 120
|
||||
db 44
|
||||
db 32
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 98
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 120
|
||||
db 37
|
||||
db 120
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 112
|
||||
db 45
|
||||
db 62
|
||||
db 98
|
||||
db 32
|
||||
db 33
|
||||
db 61
|
||||
db 32
|
||||
db 48
|
||||
db 33
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L10 label byte
|
||||
db 121
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 120
|
||||
db 32
|
||||
db 61
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
58
lcc/x86/win32/tst/front.2bk
Normal file → Executable file
58
lcc/x86/win32/tst/front.2bk
Normal file → Executable file
|
@ -1,29 +1,29 @@
|
|||
tst/front.c:3: warning: missing return value
|
||||
tst/front.c:10: warning: missing return value
|
||||
tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14'
|
||||
tst/front.c:21: warning: missing return value
|
||||
tst/front.c:32: warning: missing return value
|
||||
tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int'
|
||||
tst/front.c:38: warning: missing return value
|
||||
tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void'
|
||||
tst/front.c:63: warning: missing return value
|
||||
tst/front.c:68: warning: missing return value
|
||||
tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68
|
||||
tst/front.c:69: warning: missing return value
|
||||
tst/front.c:71: invalid storage class `static' for `int function goo'
|
||||
tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70
|
||||
tst/front.c:71: warning: missing return value
|
||||
tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72
|
||||
tst/front.c:74: warning: missing return value
|
||||
tst/front.c:81: warning: missing return value
|
||||
tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81
|
||||
tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80
|
||||
tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double'
|
||||
tst/front.c:92: warning: missing return value
|
||||
tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94
|
||||
tst/front.c:98: warning: missing return value
|
||||
tst/front.c:101: conflicting argument declarations for function `gg1'
|
||||
tst/front.c:101: warning: missing return value
|
||||
tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)'
|
||||
tst/front.c:113: warning: missing return value
|
||||
tst/front.c:120: warning: missing return value
|
||||
tst/front.c:3: warning: missing return value
|
||||
tst/front.c:10: warning: missing return value
|
||||
tst/front.c:20: type error in argument 1 to `s'; found `pointer to struct D' expected `pointer to incomplete struct D defined at tst/front.c:14'
|
||||
tst/front.c:21: warning: missing return value
|
||||
tst/front.c:32: warning: missing return value
|
||||
tst/front.c:36: operands of = have illegal types `pointer to int' and `pointer to const int'
|
||||
tst/front.c:38: warning: missing return value
|
||||
tst/front.c:62: operands of = have illegal types `pointer to char' and `pointer to const void'
|
||||
tst/front.c:63: warning: missing return value
|
||||
tst/front.c:68: warning: missing return value
|
||||
tst/front.c:69: warning: inconsistent linkage for `yy' previously declared at tst/front.c:68
|
||||
tst/front.c:69: warning: missing return value
|
||||
tst/front.c:71: invalid storage class `static' for `int function goo'
|
||||
tst/front.c:71: warning: declaration of `goo' does not match previous declaration at tst/front.c:70
|
||||
tst/front.c:71: warning: missing return value
|
||||
tst/front.c:74: warning: declaration of `xr' does not match previous declaration at tst/front.c:72
|
||||
tst/front.c:74: warning: missing return value
|
||||
tst/front.c:81: warning: missing return value
|
||||
tst/front.c:82: warning: declaration of `ss2' does not match previous declaration at tst/front.c:81
|
||||
tst/front.c:84: warning: inconsistent linkage for `ss5' previously declared at tst/front.c:80
|
||||
tst/front.c:92: type error in argument 1 to `gx1'; found `pointer to double' expected `double'
|
||||
tst/front.c:92: warning: missing return value
|
||||
tst/front.c:95: redeclaration of `hx1' previously declared at tst/front.c:94
|
||||
tst/front.c:98: warning: missing return value
|
||||
tst/front.c:101: conflicting argument declarations for function `gg1'
|
||||
tst/front.c:101: warning: missing return value
|
||||
tst/front.c:112: type error in argument 4 to `qsort'; found `pointer to int function(pointer to pointer to char,pointer to pointer to char)' expected `pointer to int function(pointer to const void,pointer to const void)'
|
||||
tst/front.c:113: warning: missing return value
|
||||
tst/front.c:120: warning: missing return value
|
||||
|
|
872
lcc/x86/win32/tst/front.sbk
Normal file → Executable file
872
lcc/x86/win32/tst/front.sbk
Normal file → Executable file
|
@ -1,436 +1,436 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push 0
|
||||
call _exit
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _nested
|
||||
_nested:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
cmp dword ptr (20)[ebp],4
|
||||
jge L6
|
||||
cmp dword ptr (24)[ebp],114
|
||||
je L9
|
||||
L6:
|
||||
cmp dword ptr (20)[ebp],1
|
||||
jne L8
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
cmp edi,104
|
||||
je L9
|
||||
cmp edi,105
|
||||
je L9
|
||||
L8:
|
||||
cmp dword ptr (20)[ebp],2
|
||||
jne L3
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
cmp edi,111
|
||||
je L9
|
||||
cmp edi,121
|
||||
jne L3
|
||||
L9:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
L3:
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _s
|
||||
_s:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
L10:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _Dy
|
||||
align 4
|
||||
_Dy label byte
|
||||
dd 0
|
||||
db 4 dup (0)
|
||||
public _Dz
|
||||
align 4
|
||||
_Dz label byte
|
||||
dd 1
|
||||
db 4 dup (0)
|
||||
public _Dfunc
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_Dfunc:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f1
|
||||
_f1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h
|
||||
_h:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h1
|
||||
_h1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h2
|
||||
_h2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L21 label byte
|
||||
dd 1
|
||||
public _set1
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_set1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L23 label byte
|
||||
dd 2
|
||||
public _set2
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_set2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_goo:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sss
|
||||
_sss:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L27 label byte
|
||||
db 4 dup (0)
|
||||
public _rrr
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_rrr:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _setstatic
|
||||
_setstatic:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _gx1
|
||||
_gx1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _ff1
|
||||
_ff1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _gg1
|
||||
_gg1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _hh1
|
||||
_hh1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _cmp
|
||||
_cmp:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sort
|
||||
_sort:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _onearg
|
||||
_onearg:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _exit:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _qsort:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _strcmp:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _ss4
|
||||
align 4
|
||||
_ss4 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss2 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss5 label byte
|
||||
db 4 dup (0)
|
||||
public _ss3
|
||||
align 4
|
||||
_ss3 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss1 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_yy label byte
|
||||
db 4 dup (0)
|
||||
public _z
|
||||
align 4
|
||||
_z label byte
|
||||
db 4 dup (0)
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 4 dup (0)
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 4 dup (0)
|
||||
public _b
|
||||
align 4
|
||||
_b label byte
|
||||
db 4 dup (0)
|
||||
public _a
|
||||
align 4
|
||||
_a label byte
|
||||
db 4 dup (0)
|
||||
_DATA ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push 0
|
||||
call _exit
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _nested
|
||||
_nested:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
cmp dword ptr (20)[ebp],4
|
||||
jge L6
|
||||
cmp dword ptr (24)[ebp],114
|
||||
je L9
|
||||
L6:
|
||||
cmp dword ptr (20)[ebp],1
|
||||
jne L8
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
cmp edi,104
|
||||
je L9
|
||||
cmp edi,105
|
||||
je L9
|
||||
L8:
|
||||
cmp dword ptr (20)[ebp],2
|
||||
jne L3
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
cmp edi,111
|
||||
je L9
|
||||
cmp edi,121
|
||||
jne L3
|
||||
L9:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
L3:
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _s
|
||||
_s:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
L10:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _Dy
|
||||
align 4
|
||||
_Dy label byte
|
||||
dd 0
|
||||
db 4 dup (0)
|
||||
public _Dz
|
||||
align 4
|
||||
_Dz label byte
|
||||
dd 1
|
||||
db 4 dup (0)
|
||||
public _Dfunc
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_Dfunc:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f1
|
||||
_f1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h
|
||||
_h:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h1
|
||||
_h1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h2
|
||||
_h2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L21 label byte
|
||||
dd 1
|
||||
public _set1
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_set1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L23 label byte
|
||||
dd 2
|
||||
public _set2
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_set2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_goo:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sss
|
||||
_sss:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L27 label byte
|
||||
db 4 dup (0)
|
||||
public _rrr
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_rrr:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _setstatic
|
||||
_setstatic:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _gx1
|
||||
_gx1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _ff1
|
||||
_ff1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _gg1
|
||||
_gg1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _hh1
|
||||
_hh1:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _cmp
|
||||
_cmp:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sort
|
||||
_sort:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _onearg
|
||||
_onearg:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _exit:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _qsort:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _strcmp:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _ss4
|
||||
align 4
|
||||
_ss4 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss2 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss5 label byte
|
||||
db 4 dup (0)
|
||||
public _ss3
|
||||
align 4
|
||||
_ss3 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_ss1 label byte
|
||||
db 4 dup (0)
|
||||
align 4
|
||||
_yy label byte
|
||||
db 4 dup (0)
|
||||
public _z
|
||||
align 4
|
||||
_z label byte
|
||||
db 4 dup (0)
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 4 dup (0)
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 4 dup (0)
|
||||
public _b
|
||||
align 4
|
||||
_b label byte
|
||||
db 4 dup (0)
|
||||
public _a
|
||||
align 4
|
||||
_a label byte
|
||||
db 4 dup (0)
|
||||
_DATA ends
|
||||
end
|
||||
|
|
0
lcc/x86/win32/tst/incr.1bk
Normal file → Executable file
0
lcc/x86/win32/tst/incr.1bk
Normal file → Executable file
18
lcc/x86/win32/tst/incr.2bk
Normal file → Executable file
18
lcc/x86/win32/tst/incr.2bk
Normal file → Executable file
|
@ -1,9 +1,9 @@
|
|||
tst/incr.c:1: warning: missing return value
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:11: warning: missing return value
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:21: warning: missing return value
|
||||
tst/incr.c:30: warning: missing return value
|
||||
tst/incr.c:39: warning: missing return value
|
||||
tst/incr.c:1: warning: missing return value
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:6: warning: expression with no effect elided
|
||||
tst/incr.c:11: warning: missing return value
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:16: warning: expression with no effect elided
|
||||
tst/incr.c:21: warning: missing return value
|
||||
tst/incr.c:30: warning: missing return value
|
||||
tst/incr.c:39: warning: missing return value
|
||||
|
|
332
lcc/x86/win32/tst/incr.sbk
Normal file → Executable file
332
lcc/x86/win32/tst/incr.sbk
Normal file → Executable file
|
@ -1,166 +1,166 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _memchar
|
||||
_memchar:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _memint
|
||||
_memint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _regchar
|
||||
_regchar:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov eax,0
|
||||
L4:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _regint
|
||||
_regint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov eax,0
|
||||
L5:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _memchar
|
||||
_memchar:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _memint
|
||||
_memint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _regchar
|
||||
_regchar:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-1)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov bl,byte ptr [edi]
|
||||
mov byte ptr (-1)[ebp],bl
|
||||
mov eax,0
|
||||
L4:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _regint
|
||||
_regint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea esi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],esi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
lea edi,(-4)[edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov eax,0
|
||||
L5:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
32
lcc/x86/win32/tst/init.1bk
Normal file → Executable file
32
lcc/x86/win32/tst/init.1bk
Normal file → Executable file
|
@ -1,16 +1,16 @@
|
|||
1 2 3 4
|
||||
5 6
|
||||
7
|
||||
if
|
||||
for
|
||||
else
|
||||
while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
0 0 0
|
||||
1 2 3 4
|
||||
5 6
|
||||
7
|
||||
if
|
||||
for
|
||||
else
|
||||
while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
1 2 3 if
|
||||
4 5 0 for
|
||||
6 7 8 else
|
||||
9 10 11 while
|
||||
0 0 0
|
||||
|
|
6
lcc/x86/win32/tst/init.2bk
Normal file → Executable file
6
lcc/x86/win32/tst/init.2bk
Normal file → Executable file
|
@ -1,3 +1,3 @@
|
|||
tst/init.c:36: warning: missing return value
|
||||
tst/init.c:49: warning: missing return value
|
||||
tst/init.c:59: warning: missing return value
|
||||
tst/init.c:36: warning: missing return value
|
||||
tst/init.c:49: warning: missing return value
|
||||
tst/init.c:59: warning: missing return value
|
||||
|
|
672
lcc/x86/win32/tst/init.sbk
Normal file → Executable file
672
lcc/x86/win32/tst/init.sbk
Normal file → Executable file
|
@ -1,336 +1,336 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _words
|
||||
align 4
|
||||
_words label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
db 105
|
||||
db 102
|
||||
db 0
|
||||
db 3 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 4
|
||||
dd 5
|
||||
db 4 dup (0)
|
||||
db 102
|
||||
db 111
|
||||
db 114
|
||||
db 3 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 6
|
||||
dd 7
|
||||
dd 8
|
||||
db 101
|
||||
db 108
|
||||
db 115
|
||||
db 101
|
||||
db 0
|
||||
db 1 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 9
|
||||
dd 10
|
||||
dd 11
|
||||
db 119
|
||||
db 104
|
||||
db 105
|
||||
db 108
|
||||
db 101
|
||||
db 1 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 0
|
||||
db 8 dup (0)
|
||||
db 8 dup (0)
|
||||
public _wordlist
|
||||
align 4
|
||||
_wordlist label byte
|
||||
dd _words
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
dd 4
|
||||
dd 0
|
||||
dd 5
|
||||
dd 6
|
||||
db 12 dup (0)
|
||||
dd 7
|
||||
db 16 dup (0)
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
dd _x
|
||||
dd _x+20
|
||||
dd _x+40
|
||||
dd 00H
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
jmp L8
|
||||
L5:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L12
|
||||
L9:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L13)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L10:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L12:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
cmp dword ptr [esi][edi*4],0
|
||||
jne L9
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L6:
|
||||
inc dword ptr (-8)[ebp]
|
||||
L8:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov edi,dword ptr (_y)[edi*4]
|
||||
cmp edi,0
|
||||
jne L5
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,dword ptr (_wordlist)
|
||||
push edi
|
||||
call _g
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L4:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L16 label byte
|
||||
dd L17
|
||||
dd L18
|
||||
dd L19
|
||||
dd L20
|
||||
dd 00H
|
||||
public _f
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
lea edi,(L16)
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L24
|
||||
L21:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L22:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
L24:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
cmp edi,0
|
||||
jne L21
|
||||
mov eax,0
|
||||
L15:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
jmp L30
|
||||
L27:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L34
|
||||
L31:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L35)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L32:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L34:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,3
|
||||
jb L31
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(12)[edi]
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L28:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(20)[edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
L30:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
cmp dword ptr [edi],0
|
||||
jne L27
|
||||
call _h
|
||||
add esp,0
|
||||
mov eax,0
|
||||
L26:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h
|
||||
_h:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L40
|
||||
L37:
|
||||
imul edi,dword ptr (-4)[ebp],20
|
||||
lea esi,(_words+12)[edi]
|
||||
push esi
|
||||
mov esi,dword ptr (_words+8)[edi]
|
||||
push esi
|
||||
mov esi,dword ptr (_words+4)[edi]
|
||||
push esi
|
||||
mov edi,dword ptr (_words)[edi]
|
||||
push edi
|
||||
lea edi,(L41)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
L38:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L40:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,5
|
||||
jb L37
|
||||
mov eax,0
|
||||
L36:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L41 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L35 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L25 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L20 label byte
|
||||
db 119
|
||||
db 104
|
||||
db 105
|
||||
db 108
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L19 label byte
|
||||
db 101
|
||||
db 108
|
||||
db 115
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L18 label byte
|
||||
db 102
|
||||
db 111
|
||||
db 114
|
||||
db 0
|
||||
align 1
|
||||
L17 label byte
|
||||
db 105
|
||||
db 102
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L13 label byte
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _words
|
||||
align 4
|
||||
_words label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
db 105
|
||||
db 102
|
||||
db 0
|
||||
db 3 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 4
|
||||
dd 5
|
||||
db 4 dup (0)
|
||||
db 102
|
||||
db 111
|
||||
db 114
|
||||
db 3 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 6
|
||||
dd 7
|
||||
dd 8
|
||||
db 101
|
||||
db 108
|
||||
db 115
|
||||
db 101
|
||||
db 0
|
||||
db 1 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 9
|
||||
dd 10
|
||||
dd 11
|
||||
db 119
|
||||
db 104
|
||||
db 105
|
||||
db 108
|
||||
db 101
|
||||
db 1 dup (0)
|
||||
db 2 dup (0)
|
||||
dd 0
|
||||
db 8 dup (0)
|
||||
db 8 dup (0)
|
||||
public _wordlist
|
||||
align 4
|
||||
_wordlist label byte
|
||||
dd _words
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
dd 4
|
||||
dd 0
|
||||
dd 5
|
||||
dd 6
|
||||
db 12 dup (0)
|
||||
dd 7
|
||||
db 16 dup (0)
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
dd _x
|
||||
dd _x+20
|
||||
dd _x+40
|
||||
dd 00H
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov dword ptr (-8)[ebp],0
|
||||
jmp L8
|
||||
L5:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L12
|
||||
L9:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L13)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L10:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L12:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (_y)[esi*4]
|
||||
cmp dword ptr [esi][edi*4],0
|
||||
jne L9
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L6:
|
||||
inc dword ptr (-8)[ebp]
|
||||
L8:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov edi,dword ptr (_y)[edi*4]
|
||||
cmp edi,0
|
||||
jne L5
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,dword ptr (_wordlist)
|
||||
push edi
|
||||
call _g
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L4:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
align 4
|
||||
L16 label byte
|
||||
dd L17
|
||||
dd L18
|
||||
dd L19
|
||||
dd L20
|
||||
dd 00H
|
||||
public _f
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
lea edi,(L16)
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L24
|
||||
L21:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L22:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
L24:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr [edi]
|
||||
cmp edi,0
|
||||
jne L21
|
||||
mov eax,0
|
||||
L15:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _g
|
||||
_g:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
jmp L30
|
||||
L27:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L34
|
||||
L31:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
push edi
|
||||
lea edi,(L35)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L32:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L34:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,3
|
||||
jb L31
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(12)[edi]
|
||||
push edi
|
||||
lea edi,(L25)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L28:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(20)[edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
L30:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
cmp dword ptr [edi],0
|
||||
jne L27
|
||||
call _h
|
||||
add esp,0
|
||||
mov eax,0
|
||||
L26:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _h
|
||||
_h:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L40
|
||||
L37:
|
||||
imul edi,dword ptr (-4)[ebp],20
|
||||
lea esi,(_words+12)[edi]
|
||||
push esi
|
||||
mov esi,dword ptr (_words+8)[edi]
|
||||
push esi
|
||||
mov esi,dword ptr (_words+4)[edi]
|
||||
push esi
|
||||
mov edi,dword ptr (_words)[edi]
|
||||
push edi
|
||||
lea edi,(L41)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
L38:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L40:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,5
|
||||
jb L37
|
||||
mov eax,0
|
||||
L36:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L41 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L35 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L25 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L20 label byte
|
||||
db 119
|
||||
db 104
|
||||
db 105
|
||||
db 108
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L19 label byte
|
||||
db 101
|
||||
db 108
|
||||
db 115
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L18 label byte
|
||||
db 102
|
||||
db 111
|
||||
db 114
|
||||
db 0
|
||||
align 1
|
||||
L17 label byte
|
||||
db 105
|
||||
db 102
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L13 label byte
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
28
lcc/x86/win32/tst/limits.1bk
Normal file → Executable file
28
lcc/x86/win32/tst/limits.1bk
Normal file → Executable file
|
@ -1,14 +1,14 @@
|
|||
UCHAR_MAX: 000000ff=255
|
||||
USHRT_MAX: 0000ffff=65535
|
||||
UINT_MAX: ffffffff=-1
|
||||
ULONG_MAX: ffffffff=-1
|
||||
CHAR_MAX: 0000007f=127
|
||||
SCHAR_MAX: 0000007f=127
|
||||
SHRT_MAX: 00007fff=32767
|
||||
INT_MAX: 7fffffff=2147483647
|
||||
LONG_MAX: 7fffffff=2147483647
|
||||
CHAR_MIN: ffffff80=-128
|
||||
SCHAR_MIN: ffffff80=-128
|
||||
SHRT_MIN: ffff8000=-32768
|
||||
INT_MIN: 80000000=-2147483648
|
||||
LONG_MIN: 80000000=-2147483648
|
||||
UCHAR_MAX: 000000ff=255
|
||||
USHRT_MAX: 0000ffff=65535
|
||||
UINT_MAX: ffffffff=-1
|
||||
ULONG_MAX: ffffffff=-1
|
||||
CHAR_MAX: 0000007f=127
|
||||
SCHAR_MAX: 0000007f=127
|
||||
SHRT_MAX: 00007fff=32767
|
||||
INT_MAX: 7fffffff=2147483647
|
||||
LONG_MAX: 7fffffff=2147483647
|
||||
CHAR_MIN: ffffff80=-128
|
||||
SCHAR_MIN: ffffff80=-128
|
||||
SHRT_MIN: ffff8000=-32768
|
||||
INT_MIN: 80000000=-2147483648
|
||||
LONG_MIN: 80000000=-2147483648
|
||||
|
|
0
lcc/x86/win32/tst/limits.2bk
Normal file → Executable file
0
lcc/x86/win32/tst/limits.2bk
Normal file → Executable file
828
lcc/x86/win32/tst/limits.sbk
Normal file → Executable file
828
lcc/x86/win32/tst/limits.sbk
Normal file → Executable file
|
@ -1,414 +1,414 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push 255
|
||||
push 255
|
||||
lea edi,(L2)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 65535
|
||||
push 65535
|
||||
lea edi,(L3)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 0ffffffffH
|
||||
push 0ffffffffH
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 0ffffffffH
|
||||
push 0ffffffffH
|
||||
lea edi,(L5)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 127
|
||||
push 127
|
||||
lea edi,(L6)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 127
|
||||
push 127
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 32767
|
||||
push 32767
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 2147483647
|
||||
push 2147483647
|
||||
lea edi,(L9)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 2147483647
|
||||
push 2147483647
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -128
|
||||
push -128
|
||||
lea edi,(L11)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -128
|
||||
push -128
|
||||
lea edi,(L12)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -32768
|
||||
push -32768
|
||||
lea edi,(L13)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -2147483648
|
||||
push -2147483648
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -2147483648
|
||||
push -2147483648
|
||||
lea edi,(L15)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L15 label byte
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L13 label byte
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L12 label byte
|
||||
db 83
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L11 label byte
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L10 label byte
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L9 label byte
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L8 label byte
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L7 label byte
|
||||
db 83
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L6 label byte
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L5 label byte
|
||||
db 85
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 85
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L3 label byte
|
||||
db 85
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L2 label byte
|
||||
db 85
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push 255
|
||||
push 255
|
||||
lea edi,(L2)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 65535
|
||||
push 65535
|
||||
lea edi,(L3)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 0ffffffffH
|
||||
push 0ffffffffH
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 0ffffffffH
|
||||
push 0ffffffffH
|
||||
lea edi,(L5)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 127
|
||||
push 127
|
||||
lea edi,(L6)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 127
|
||||
push 127
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 32767
|
||||
push 32767
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 2147483647
|
||||
push 2147483647
|
||||
lea edi,(L9)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push 2147483647
|
||||
push 2147483647
|
||||
lea edi,(L10)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -128
|
||||
push -128
|
||||
lea edi,(L11)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -128
|
||||
push -128
|
||||
lea edi,(L12)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -32768
|
||||
push -32768
|
||||
lea edi,(L13)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -2147483648
|
||||
push -2147483648
|
||||
lea edi,(L14)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
push -2147483648
|
||||
push -2147483648
|
||||
lea edi,(L15)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L15 label byte
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L14 label byte
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L13 label byte
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L12 label byte
|
||||
db 83
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L11 label byte
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 73
|
||||
db 78
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L10 label byte
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L9 label byte
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L8 label byte
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L7 label byte
|
||||
db 83
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L6 label byte
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L5 label byte
|
||||
db 85
|
||||
db 76
|
||||
db 79
|
||||
db 78
|
||||
db 71
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 108
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 108
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 85
|
||||
db 73
|
||||
db 78
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L3 label byte
|
||||
db 85
|
||||
db 83
|
||||
db 72
|
||||
db 82
|
||||
db 84
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L2 label byte
|
||||
db 85
|
||||
db 67
|
||||
db 72
|
||||
db 65
|
||||
db 82
|
||||
db 95
|
||||
db 77
|
||||
db 65
|
||||
db 88
|
||||
db 58
|
||||
db 9
|
||||
db 37
|
||||
db 48
|
||||
db 56
|
||||
db 120
|
||||
db 61
|
||||
db 37
|
||||
db 100
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
358
lcc/x86/win32/tst/paranoia.1bk
Normal file → Executable file
358
lcc/x86/win32/tst/paranoia.1bk
Normal file → Executable file
|
@ -1,179 +1,179 @@
|
|||
Lest this program stop prematurely, i.e. before displaying
|
||||
|
||||
`END OF TEST',
|
||||
|
||||
try to persuade the computer NOT to terminate execution when an
|
||||
error like Over/Underflow or Division by Zero occurs, but rather
|
||||
to persevere with a surrogate value after, perhaps, displaying some
|
||||
warning. If persuasion avails naught, don't despair but run this
|
||||
program anyway to see how many milestones it passes, and then
|
||||
amend it to make further progress.
|
||||
|
||||
Answer questions with Y, y, N or n (unless otherwise indicated).
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 0 Page: 1
|
||||
|
||||
Users are invited to help debug and augment this program so it will
|
||||
cope with unanticipated and newly uncovered arithmetic pathologies.
|
||||
|
||||
Please send suggestions and interesting results to
|
||||
Richard Karpinski
|
||||
Computer Center U-76
|
||||
University of California
|
||||
San Francisco, CA 94143-0704, USA
|
||||
|
||||
In doing so, please include the following information:
|
||||
Precision: double;
|
||||
Version: 10 February 1989;
|
||||
Computer:
|
||||
|
||||
Compiler:
|
||||
|
||||
Optimization level:
|
||||
|
||||
Other relevant compiler options:
|
||||
|
||||
Diagnosis resumes after milestone Number 1 Page: 2
|
||||
|
||||
Running this program should reveal these characteristics:
|
||||
Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...
|
||||
Precision = number of significant digits carried.
|
||||
U2 = Radix/Radix^Precision = One Ulp
|
||||
(OneUlpnit in the Last Place) of 1.000xxx .
|
||||
U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .
|
||||
Adequacy of guard digits for Mult., Div. and Subt.
|
||||
Whether arithmetic is chopped, correctly rounded, or something else
|
||||
for Mult., Div., Add/Subt. and Sqrt.
|
||||
Whether a Sticky Bit used correctly for rounding.
|
||||
UnderflowThreshold = an underflow threshold.
|
||||
E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.
|
||||
V = an overflow threshold, roughly.
|
||||
V0 tells, roughly, whether Infinity is represented.
|
||||
Comparisions are checked for consistency with subtraction
|
||||
and for contamination with pseudo-zeros.
|
||||
Sqrt is tested. Y^X is not tested.
|
||||
Extra-precise subexpressions are revealed but NOT YET tested.
|
||||
Decimal-Binary conversion is NOT YET tested for accuracy.
|
||||
|
||||
Diagnosis resumes after milestone Number 2 Page: 3
|
||||
|
||||
The program attempts to discriminate among
|
||||
FLAWs, like lack of a sticky bit,
|
||||
Serious DEFECTs, like lack of a guard digit, and
|
||||
FAILUREs, like 2+2 == 5 .
|
||||
Failures may confound subsequent diagnoses.
|
||||
|
||||
The diagnostic capabilities of this program go beyond an earlier
|
||||
program called `MACHAR', which can be found at the end of the
|
||||
book `Software Manual for the Elementary Functions' (1980) by
|
||||
W. J. Cody and W. Waite. Although both programs try to discover
|
||||
the Radix, Precision and range (over/underflow thresholds)
|
||||
of the arithmetic, this program tries to cope with a wider variety
|
||||
of pathologies, and to say how well the arithmetic is implemented.
|
||||
|
||||
The program is based upon a conventional radix representation for
|
||||
floating-point numbers, but also allows logarithmic encoding
|
||||
as used by certain early WANG machines.
|
||||
|
||||
BASIC version of this program (C) 1983 by Prof. W. M. Kahan;
|
||||
see source comments for more history.
|
||||
|
||||
Diagnosis resumes after milestone Number 3 Page: 4
|
||||
|
||||
Program is now RUNNING tests on small integers:
|
||||
-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.
|
||||
|
||||
Searching for Radix and Precision.
|
||||
Radix = 2.000000 .
|
||||
Closest relative separation found is U1 = 1.1102230e-016 .
|
||||
|
||||
Recalculating radix and precision
|
||||
confirms closest relative separation U1 .
|
||||
Radix confirmed.
|
||||
The number of significant digits of the Radix is 53.000000 .
|
||||
|
||||
Diagnosis resumes after milestone Number 30 Page: 5
|
||||
|
||||
Subtraction appears to be normalized, as it should be.
|
||||
Checking for guard digit in *, /, and -.
|
||||
*, /, and - appear to have guard digits, as they should.
|
||||
|
||||
Diagnosis resumes after milestone Number 40 Page: 6
|
||||
|
||||
Checking rounding on multiply, divide and add/subtract.
|
||||
Multiplication appears to round correctly.
|
||||
Division appears to round correctly.
|
||||
Addition/Subtraction appears to round correctly.
|
||||
Checking for sticky bit.
|
||||
Sticky bit apparently used correctly.
|
||||
|
||||
Does Multiplication commute? Testing on 20 random pairs.
|
||||
No failures found in 20 integer pairs.
|
||||
|
||||
Running test of square root(x).
|
||||
Testing if sqrt(X * X) == X for 20 Integers X.
|
||||
Test for sqrt monotonicity.
|
||||
sqrt has passed a test for Monotonicity.
|
||||
Testing whether sqrt is rounded or chopped.
|
||||
Square root appears to be correctly rounded.
|
||||
|
||||
Diagnosis resumes after milestone Number 90 Page: 7
|
||||
|
||||
Testing powers Z^i for small Integers Z and i.
|
||||
... no discrepancis found.
|
||||
|
||||
Seeking Underflow thresholds UfThold and E0.
|
||||
Smallest strictly positive number found is E0 = 4.94066e-324 .
|
||||
Since comparison denies Z = 0, evaluating (Z + Z) / Z should be safe.
|
||||
What the machine gets for (Z + Z) / Z is 2.00000000000000000e+000 .
|
||||
This is O.K., provided Over/Underflow has NOT just been signaled.
|
||||
Underflow is gradual; it incurs Absolute Error =
|
||||
(roundoff in UfThold) < E0.
|
||||
The Underflow threshold is 2.22507385850720190e-308, below which
|
||||
calculation may suffer larger Relative error than merely roundoff.
|
||||
Since underflow occurs below the threshold
|
||||
UfThold = (2.00000000000000000e+000) ^ (-1.02200000000000000e+003)
|
||||
only underflow should afflict the expression
|
||||
(2.00000000000000000e+000) ^ (-1.02200000000000000e+003);
|
||||
actually calculating yields: 0.00000000000000000e+000 .
|
||||
This computed value is O.K.
|
||||
|
||||
Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065220e+000 as X -> 1.
|
||||
Accuracy seems adequate.
|
||||
Testing powers Z^Q at four nearly extreme values.
|
||||
... no discrepancies found.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 160 Page: 8
|
||||
|
||||
Searching for Overflow threshold:
|
||||
This may generate an error.
|
||||
Can `Z = -Y' overflow?
|
||||
Trying it on Y = -1.#INF0000000000000e+000 .
|
||||
Seems O.K.
|
||||
Overflow threshold is V = 1.79769313486231570e+308 .
|
||||
Overflow saturates at V0 = 1.#INF0000000000000e+000 .
|
||||
No Overflow should be signaled for V * 1 = 1.79769313486231570e+308
|
||||
nor for V / 1 = 1.79769313486231570e+308 .
|
||||
Any overflow signal separating this * from the one
|
||||
above is a DEFECT.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 190 Page: 9
|
||||
|
||||
|
||||
What message and/or values does Division by Zero produce?
|
||||
Trying to compute 1 / 0 produces ... 1.#INF000e+000 .
|
||||
|
||||
Trying to compute 0 / 0 produces ... -1.#IND000e+000 .
|
||||
|
||||
Diagnosis resumes after milestone Number 220 Page: 10
|
||||
|
||||
|
||||
|
||||
No failures, defects nor flaws have been discovered.
|
||||
Rounding appears to conform to the proposed IEEE standard P754,
|
||||
except for possibly Double Rounding during Gradual Underflow.
|
||||
The arithmetic diagnosed appears to be Excellent!
|
||||
END OF TEST.
|
||||
Lest this program stop prematurely, i.e. before displaying
|
||||
|
||||
`END OF TEST',
|
||||
|
||||
try to persuade the computer NOT to terminate execution when an
|
||||
error like Over/Underflow or Division by Zero occurs, but rather
|
||||
to persevere with a surrogate value after, perhaps, displaying some
|
||||
warning. If persuasion avails naught, don't despair but run this
|
||||
program anyway to see how many milestones it passes, and then
|
||||
amend it to make further progress.
|
||||
|
||||
Answer questions with Y, y, N or n (unless otherwise indicated).
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 0 Page: 1
|
||||
|
||||
Users are invited to help debug and augment this program so it will
|
||||
cope with unanticipated and newly uncovered arithmetic pathologies.
|
||||
|
||||
Please send suggestions and interesting results to
|
||||
Richard Karpinski
|
||||
Computer Center U-76
|
||||
University of California
|
||||
San Francisco, CA 94143-0704, USA
|
||||
|
||||
In doing so, please include the following information:
|
||||
Precision: double;
|
||||
Version: 10 February 1989;
|
||||
Computer:
|
||||
|
||||
Compiler:
|
||||
|
||||
Optimization level:
|
||||
|
||||
Other relevant compiler options:
|
||||
|
||||
Diagnosis resumes after milestone Number 1 Page: 2
|
||||
|
||||
Running this program should reveal these characteristics:
|
||||
Radix = 1, 2, 4, 8, 10, 16, 100, 256 ...
|
||||
Precision = number of significant digits carried.
|
||||
U2 = Radix/Radix^Precision = One Ulp
|
||||
(OneUlpnit in the Last Place) of 1.000xxx .
|
||||
U1 = 1/Radix^Precision = One Ulp of numbers a little less than 1.0 .
|
||||
Adequacy of guard digits for Mult., Div. and Subt.
|
||||
Whether arithmetic is chopped, correctly rounded, or something else
|
||||
for Mult., Div., Add/Subt. and Sqrt.
|
||||
Whether a Sticky Bit used correctly for rounding.
|
||||
UnderflowThreshold = an underflow threshold.
|
||||
E0 and PseudoZero tell whether underflow is abrupt, gradual, or fuzzy.
|
||||
V = an overflow threshold, roughly.
|
||||
V0 tells, roughly, whether Infinity is represented.
|
||||
Comparisions are checked for consistency with subtraction
|
||||
and for contamination with pseudo-zeros.
|
||||
Sqrt is tested. Y^X is not tested.
|
||||
Extra-precise subexpressions are revealed but NOT YET tested.
|
||||
Decimal-Binary conversion is NOT YET tested for accuracy.
|
||||
|
||||
Diagnosis resumes after milestone Number 2 Page: 3
|
||||
|
||||
The program attempts to discriminate among
|
||||
FLAWs, like lack of a sticky bit,
|
||||
Serious DEFECTs, like lack of a guard digit, and
|
||||
FAILUREs, like 2+2 == 5 .
|
||||
Failures may confound subsequent diagnoses.
|
||||
|
||||
The diagnostic capabilities of this program go beyond an earlier
|
||||
program called `MACHAR', which can be found at the end of the
|
||||
book `Software Manual for the Elementary Functions' (1980) by
|
||||
W. J. Cody and W. Waite. Although both programs try to discover
|
||||
the Radix, Precision and range (over/underflow thresholds)
|
||||
of the arithmetic, this program tries to cope with a wider variety
|
||||
of pathologies, and to say how well the arithmetic is implemented.
|
||||
|
||||
The program is based upon a conventional radix representation for
|
||||
floating-point numbers, but also allows logarithmic encoding
|
||||
as used by certain early WANG machines.
|
||||
|
||||
BASIC version of this program (C) 1983 by Prof. W. M. Kahan;
|
||||
see source comments for more history.
|
||||
|
||||
Diagnosis resumes after milestone Number 3 Page: 4
|
||||
|
||||
Program is now RUNNING tests on small integers:
|
||||
-1, 0, 1/2, 1, 2, 3, 4, 5, 9, 27, 32 & 240 are O.K.
|
||||
|
||||
Searching for Radix and Precision.
|
||||
Radix = 2.000000 .
|
||||
Closest relative separation found is U1 = 1.1102230e-016 .
|
||||
|
||||
Recalculating radix and precision
|
||||
confirms closest relative separation U1 .
|
||||
Radix confirmed.
|
||||
The number of significant digits of the Radix is 53.000000 .
|
||||
|
||||
Diagnosis resumes after milestone Number 30 Page: 5
|
||||
|
||||
Subtraction appears to be normalized, as it should be.
|
||||
Checking for guard digit in *, /, and -.
|
||||
*, /, and - appear to have guard digits, as they should.
|
||||
|
||||
Diagnosis resumes after milestone Number 40 Page: 6
|
||||
|
||||
Checking rounding on multiply, divide and add/subtract.
|
||||
Multiplication appears to round correctly.
|
||||
Division appears to round correctly.
|
||||
Addition/Subtraction appears to round correctly.
|
||||
Checking for sticky bit.
|
||||
Sticky bit apparently used correctly.
|
||||
|
||||
Does Multiplication commute? Testing on 20 random pairs.
|
||||
No failures found in 20 integer pairs.
|
||||
|
||||
Running test of square root(x).
|
||||
Testing if sqrt(X * X) == X for 20 Integers X.
|
||||
Test for sqrt monotonicity.
|
||||
sqrt has passed a test for Monotonicity.
|
||||
Testing whether sqrt is rounded or chopped.
|
||||
Square root appears to be correctly rounded.
|
||||
|
||||
Diagnosis resumes after milestone Number 90 Page: 7
|
||||
|
||||
Testing powers Z^i for small Integers Z and i.
|
||||
... no discrepancis found.
|
||||
|
||||
Seeking Underflow thresholds UfThold and E0.
|
||||
Smallest strictly positive number found is E0 = 4.94066e-324 .
|
||||
Since comparison denies Z = 0, evaluating (Z + Z) / Z should be safe.
|
||||
What the machine gets for (Z + Z) / Z is 2.00000000000000000e+000 .
|
||||
This is O.K., provided Over/Underflow has NOT just been signaled.
|
||||
Underflow is gradual; it incurs Absolute Error =
|
||||
(roundoff in UfThold) < E0.
|
||||
The Underflow threshold is 2.22507385850720190e-308, below which
|
||||
calculation may suffer larger Relative error than merely roundoff.
|
||||
Since underflow occurs below the threshold
|
||||
UfThold = (2.00000000000000000e+000) ^ (-1.02200000000000000e+003)
|
||||
only underflow should afflict the expression
|
||||
(2.00000000000000000e+000) ^ (-1.02200000000000000e+003);
|
||||
actually calculating yields: 0.00000000000000000e+000 .
|
||||
This computed value is O.K.
|
||||
|
||||
Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065220e+000 as X -> 1.
|
||||
Accuracy seems adequate.
|
||||
Testing powers Z^Q at four nearly extreme values.
|
||||
... no discrepancies found.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 160 Page: 8
|
||||
|
||||
Searching for Overflow threshold:
|
||||
This may generate an error.
|
||||
Can `Z = -Y' overflow?
|
||||
Trying it on Y = -1.#INF0000000000000e+000 .
|
||||
Seems O.K.
|
||||
Overflow threshold is V = 1.79769313486231570e+308 .
|
||||
Overflow saturates at V0 = 1.#INF0000000000000e+000 .
|
||||
No Overflow should be signaled for V * 1 = 1.79769313486231570e+308
|
||||
nor for V / 1 = 1.79769313486231570e+308 .
|
||||
Any overflow signal separating this * from the one
|
||||
above is a DEFECT.
|
||||
|
||||
|
||||
Diagnosis resumes after milestone Number 190 Page: 9
|
||||
|
||||
|
||||
What message and/or values does Division by Zero produce?
|
||||
Trying to compute 1 / 0 produces ... 1.#INF000e+000 .
|
||||
|
||||
Trying to compute 0 / 0 produces ... -1.#IND000e+000 .
|
||||
|
||||
Diagnosis resumes after milestone Number 220 Page: 10
|
||||
|
||||
|
||||
|
||||
No failures, defects nor flaws have been discovered.
|
||||
Rounding appears to conform to the proposed IEEE standard P754,
|
||||
except for possibly Double Rounding during Gradual Underflow.
|
||||
The arithmetic diagnosed appears to be Excellent!
|
||||
END OF TEST.
|
||||
|
|
32
lcc/x86/win32/tst/paranoia.2bk
Normal file → Executable file
32
lcc/x86/win32/tst/paranoia.2bk
Normal file → Executable file
|
@ -1,16 +1,16 @@
|
|||
tst/paranoia.c:1867: warning: missing return value
|
||||
tst/paranoia.c:1874: warning: missing return value
|
||||
tst/paranoia.c:1884: warning: missing return value
|
||||
tst/paranoia.c:1924: warning: missing return value
|
||||
tst/paranoia.c:1939: warning: missing return value
|
||||
tst/paranoia.c:1956: warning: missing return value
|
||||
tst/paranoia.c:1975: warning: missing return value
|
||||
tst/paranoia.c:1988: warning: missing return value
|
||||
tst/paranoia.c:1995: warning: missing return value
|
||||
tst/paranoia.c:2055: warning: missing return value
|
||||
tst/paranoia.c:2062: warning: missing return value
|
||||
tst/paranoia.c:2070: warning: missing return value
|
||||
tst/paranoia.c:2087: warning: missing return value
|
||||
tst/paranoia.c:2115: warning: missing return value
|
||||
tst/paranoia.c:2144: warning: missing return value
|
||||
tst/paranoia.c:2173: warning: missing return value
|
||||
tst/paranoia.c:1867: warning: missing return value
|
||||
tst/paranoia.c:1874: warning: missing return value
|
||||
tst/paranoia.c:1884: warning: missing return value
|
||||
tst/paranoia.c:1924: warning: missing return value
|
||||
tst/paranoia.c:1939: warning: missing return value
|
||||
tst/paranoia.c:1956: warning: missing return value
|
||||
tst/paranoia.c:1975: warning: missing return value
|
||||
tst/paranoia.c:1988: warning: missing return value
|
||||
tst/paranoia.c:1995: warning: missing return value
|
||||
tst/paranoia.c:2055: warning: missing return value
|
||||
tst/paranoia.c:2062: warning: missing return value
|
||||
tst/paranoia.c:2070: warning: missing return value
|
||||
tst/paranoia.c:2087: warning: missing return value
|
||||
tst/paranoia.c:2115: warning: missing return value
|
||||
tst/paranoia.c:2144: warning: missing return value
|
||||
tst/paranoia.c:2173: warning: missing return value
|
||||
|
|
40960
lcc/x86/win32/tst/paranoia.sbk
Normal file → Executable file
40960
lcc/x86/win32/tst/paranoia.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
40
lcc/x86/win32/tst/sort.1bk
Normal file → Executable file
40
lcc/x86/win32/tst/sort.1bk
Normal file → Executable file
|
@ -1,20 +1,20 @@
|
|||
exchange(1,9)
|
||||
exchange(3,7)
|
||||
exchange(5,6)
|
||||
exchange(0,5)
|
||||
exchange(0,3)
|
||||
exchange(0,0)
|
||||
exchange(1,2)
|
||||
exchange(6,6)
|
||||
exchange(8,9)
|
||||
exchange(7,8)
|
||||
-51
|
||||
-1
|
||||
0
|
||||
1
|
||||
3
|
||||
10
|
||||
18
|
||||
32
|
||||
567
|
||||
789
|
||||
exchange(1,9)
|
||||
exchange(3,7)
|
||||
exchange(5,6)
|
||||
exchange(0,5)
|
||||
exchange(0,3)
|
||||
exchange(0,0)
|
||||
exchange(1,2)
|
||||
exchange(6,6)
|
||||
exchange(8,9)
|
||||
exchange(7,8)
|
||||
-51
|
||||
-1
|
||||
0
|
||||
1
|
||||
3
|
||||
10
|
||||
18
|
||||
32
|
||||
567
|
||||
789
|
||||
|
|
10
lcc/x86/win32/tst/sort.2bk
Normal file → Executable file
10
lcc/x86/win32/tst/sort.2bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
tst/sort.c:23: warning: missing return value
|
||||
tst/sort.c:30: warning: missing return value
|
||||
tst/sort.c:37: warning: missing return value
|
||||
tst/sort.c:41: warning: missing return value
|
||||
tst/sort.c:65: warning: missing return value
|
||||
tst/sort.c:23: warning: missing return value
|
||||
tst/sort.c:30: warning: missing return value
|
||||
tst/sort.c:37: warning: missing return value
|
||||
tst/sort.c:41: warning: missing return value
|
||||
tst/sort.c:65: warning: missing return value
|
||||
|
|
648
lcc/x86/win32/tst/sort.sbk
Normal file → Executable file
648
lcc/x86/win32/tst/sort.sbk
Normal file → Executable file
|
@ -1,324 +1,324 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _in
|
||||
align 4
|
||||
_in label byte
|
||||
dd 10
|
||||
dd 32
|
||||
dd -1
|
||||
dd 567
|
||||
dd 3
|
||||
dd 18
|
||||
dd 1
|
||||
dd -51
|
||||
dd 789
|
||||
dd 0
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
push 10
|
||||
lea edi,(_in)
|
||||
push edi
|
||||
call _sort
|
||||
add esp,8
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L5
|
||||
L2:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (_in)[edi*4]
|
||||
push edi
|
||||
call _putd
|
||||
add esp,4
|
||||
push 10
|
||||
call _putchar
|
||||
add esp,4
|
||||
L3:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L5:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,10
|
||||
jb L2
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _putd
|
||||
_putd:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
cmp dword ptr (20)[ebp],0
|
||||
jge L7
|
||||
push 45
|
||||
call _putchar
|
||||
add esp,4
|
||||
neg dword ptr (20)[ebp]
|
||||
L7:
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
cmp eax,0
|
||||
je L9
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
push eax
|
||||
call _putd
|
||||
add esp,4
|
||||
L9:
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
lea edi,(48)[edx]
|
||||
push edi
|
||||
call _putchar
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L6:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sort
|
||||
_sort:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
sub edi,1
|
||||
mov dword ptr (24)[ebp],edi
|
||||
push edi
|
||||
push 0
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov dword ptr (_xx),edi
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L11:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _quick
|
||||
_quick:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L13
|
||||
jmp L12
|
||||
L13:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _partition
|
||||
add esp,12
|
||||
mov dword ptr (-4)[ebp],eax
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
sub edi,1
|
||||
push edi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L12:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _partition
|
||||
_partition:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
inc dword ptr (28)[ebp]
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L17
|
||||
L16:
|
||||
inc dword ptr (24)[ebp]
|
||||
jmp L20
|
||||
L19:
|
||||
inc dword ptr (24)[ebp]
|
||||
L20:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
cmp dword ptr [esi][edi*4],ebx
|
||||
jl L19
|
||||
dec dword ptr (28)[ebp]
|
||||
jmp L23
|
||||
L22:
|
||||
dec dword ptr (28)[ebp]
|
||||
L23:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
cmp dword ptr [esi][edi*4],ebx
|
||||
jg L22
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L25
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (28)[ebp]
|
||||
lea esi,[edi][esi*4]
|
||||
push esi
|
||||
mov esi,dword ptr (24)[ebp]
|
||||
lea edi,[edi][esi*4]
|
||||
push edi
|
||||
call _exchange
|
||||
add esp,8
|
||||
L25:
|
||||
L17:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L16
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (28)[ebp]
|
||||
lea esi,[edi][esi*4]
|
||||
push esi
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
lea edi,[edi][esi*4]
|
||||
push edi
|
||||
call _exchange
|
||||
add esp,8
|
||||
mov eax,dword ptr (28)[ebp]
|
||||
L15:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _exchange
|
||||
_exchange:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (_xx)
|
||||
mov esi,4
|
||||
mov ebx,dword ptr (24)[ebp]
|
||||
sub ebx,edi
|
||||
mov eax,ebx
|
||||
cdq
|
||||
idiv esi
|
||||
push eax
|
||||
mov ebx,dword ptr (20)[ebp]
|
||||
sub ebx,edi
|
||||
mov eax,ebx
|
||||
cdq
|
||||
idiv esi
|
||||
push eax
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
mov esi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr [esi]
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L27:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _putchar:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _xx
|
||||
align 4
|
||||
_xx label byte
|
||||
db 4 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 101
|
||||
db 120
|
||||
db 99
|
||||
db 104
|
||||
db 97
|
||||
db 110
|
||||
db 103
|
||||
db 101
|
||||
db 40
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 41
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _in
|
||||
align 4
|
||||
_in label byte
|
||||
dd 10
|
||||
dd 32
|
||||
dd -1
|
||||
dd 567
|
||||
dd 3
|
||||
dd 18
|
||||
dd 1
|
||||
dd -51
|
||||
dd 789
|
||||
dd 0
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
push 10
|
||||
lea edi,(_in)
|
||||
push edi
|
||||
call _sort
|
||||
add esp,8
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L5
|
||||
L2:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (_in)[edi*4]
|
||||
push edi
|
||||
call _putd
|
||||
add esp,4
|
||||
push 10
|
||||
call _putchar
|
||||
add esp,4
|
||||
L3:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L5:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,10
|
||||
jb L2
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _putd
|
||||
_putd:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
cmp dword ptr (20)[ebp],0
|
||||
jge L7
|
||||
push 45
|
||||
call _putchar
|
||||
add esp,4
|
||||
neg dword ptr (20)[ebp]
|
||||
L7:
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
cmp eax,0
|
||||
je L9
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
push eax
|
||||
call _putd
|
||||
add esp,4
|
||||
L9:
|
||||
mov eax,dword ptr (20)[ebp]
|
||||
mov edi,10
|
||||
cdq
|
||||
idiv edi
|
||||
lea edi,(48)[edx]
|
||||
push edi
|
||||
call _putchar
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L6:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _sort
|
||||
_sort:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
sub edi,1
|
||||
mov dword ptr (24)[ebp],edi
|
||||
push edi
|
||||
push 0
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov dword ptr (_xx),edi
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L11:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _quick
|
||||
_quick:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L13
|
||||
jmp L12
|
||||
L13:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _partition
|
||||
add esp,12
|
||||
mov dword ptr (-4)[ebp],eax
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
sub edi,1
|
||||
push edi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
push edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _quick
|
||||
add esp,12
|
||||
mov eax,0
|
||||
L12:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _partition
|
||||
_partition:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
inc dword ptr (28)[ebp]
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov edi,dword ptr [esi][edi*4]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L17
|
||||
L16:
|
||||
inc dword ptr (24)[ebp]
|
||||
jmp L20
|
||||
L19:
|
||||
inc dword ptr (24)[ebp]
|
||||
L20:
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
cmp dword ptr [esi][edi*4],ebx
|
||||
jl L19
|
||||
dec dword ptr (28)[ebp]
|
||||
jmp L23
|
||||
L22:
|
||||
dec dword ptr (28)[ebp]
|
||||
L23:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov esi,dword ptr (20)[ebp]
|
||||
mov ebx,dword ptr (-4)[ebp]
|
||||
cmp dword ptr [esi][edi*4],ebx
|
||||
jg L22
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L25
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (28)[ebp]
|
||||
lea esi,[edi][esi*4]
|
||||
push esi
|
||||
mov esi,dword ptr (24)[ebp]
|
||||
lea edi,[edi][esi*4]
|
||||
push edi
|
||||
call _exchange
|
||||
add esp,8
|
||||
L25:
|
||||
L17:
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L16
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr (28)[ebp]
|
||||
lea esi,[edi][esi*4]
|
||||
push esi
|
||||
mov esi,dword ptr (-8)[ebp]
|
||||
lea edi,[edi][esi*4]
|
||||
push edi
|
||||
call _exchange
|
||||
add esp,8
|
||||
mov eax,dword ptr (28)[ebp]
|
||||
L15:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _exchange
|
||||
_exchange:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (_xx)
|
||||
mov esi,4
|
||||
mov ebx,dword ptr (24)[ebp]
|
||||
sub ebx,edi
|
||||
mov eax,ebx
|
||||
cdq
|
||||
idiv esi
|
||||
push eax
|
||||
mov ebx,dword ptr (20)[ebp]
|
||||
sub ebx,edi
|
||||
mov eax,ebx
|
||||
cdq
|
||||
idiv esi
|
||||
push eax
|
||||
lea edi,(L28)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
mov esi,dword ptr [edi]
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
mov esi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr [esi]
|
||||
mov dword ptr [edi],esi
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L27:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _putchar:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _xx
|
||||
align 4
|
||||
_xx label byte
|
||||
db 4 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L28 label byte
|
||||
db 101
|
||||
db 120
|
||||
db 99
|
||||
db 104
|
||||
db 97
|
||||
db 110
|
||||
db 103
|
||||
db 101
|
||||
db 40
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 41
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
0
lcc/x86/win32/tst/spill.1bk
Normal file → Executable file
0
lcc/x86/win32/tst/spill.1bk
Normal file → Executable file
12
lcc/x86/win32/tst/spill.2bk
Normal file → Executable file
12
lcc/x86/win32/tst/spill.2bk
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
tst/spill.c:1: warning: missing return value
|
||||
tst/spill.c:3: warning: missing return value
|
||||
tst/spill.c:5: warning: missing return value
|
||||
tst/spill.c:7: warning: missing return value
|
||||
tst/spill.c:9: warning: missing return value
|
||||
tst/spill.c:17: warning: missing return value
|
||||
tst/spill.c:1: warning: missing return value
|
||||
tst/spill.c:3: warning: missing return value
|
||||
tst/spill.c:5: warning: missing return value
|
||||
tst/spill.c:7: warning: missing return value
|
||||
tst/spill.c:9: warning: missing return value
|
||||
tst/spill.c:17: warning: missing return value
|
||||
|
|
518
lcc/x86/win32/tst/spill.sbk
Normal file → Executable file
518
lcc/x86/win32/tst/spill.sbk
Normal file → Executable file
|
@ -1,259 +1,259 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,eax
|
||||
call _f
|
||||
add esp,0
|
||||
lea edi,[eax][edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,eax
|
||||
cmp dword ptr (20)[ebp],0
|
||||
je L5
|
||||
call _f
|
||||
add esp,0
|
||||
mov esi,eax
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
jmp L6
|
||||
L5:
|
||||
mov dword ptr (-4)[ebp],1
|
||||
L6:
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
lea edi,[esi][edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f3
|
||||
_f3:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,44
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
mov dword ptr (-12)[ebp],0
|
||||
mov dword ptr (-16)[ebp],0
|
||||
mov dword ptr (-20)[ebp],0
|
||||
mov dword ptr (-24)[ebp],0
|
||||
mov dword ptr (-28)[ebp],0
|
||||
mov dword ptr (-32)[ebp],0
|
||||
mov dword ptr (-36)[ebp],0
|
||||
mov dword ptr (-40)[ebp],0
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (24)[ebp],esi
|
||||
cmp dword ptr (20)[ebp],0
|
||||
je L9
|
||||
call _f
|
||||
add esp,0
|
||||
mov esi,eax
|
||||
mov dword ptr (-44)[ebp],esi
|
||||
jmp L10
|
||||
L9:
|
||||
mov dword ptr (-44)[ebp],0
|
||||
L10:
|
||||
mov esi,dword ptr (-44)[ebp]
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L7:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f4
|
||||
_f4:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,52
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
mov dword ptr (-12)[ebp],0
|
||||
mov dword ptr (-16)[ebp],0
|
||||
mov dword ptr (-20)[ebp],0
|
||||
mov dword ptr (-24)[ebp],0
|
||||
mov edi,dword ptr (_i)
|
||||
lea esi,[edi*8]
|
||||
fld qword ptr (_a)[esi]
|
||||
fstp qword ptr (-36)[ebp]
|
||||
fld qword ptr (_b)[esi]
|
||||
fstp qword ptr (-44)[ebp]
|
||||
fld qword ptr (-36)[ebp]
|
||||
fadd qword ptr (-44)[ebp]
|
||||
fld qword ptr (L15)
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
je L13
|
||||
cmp edi,0
|
||||
je L13
|
||||
fld qword ptr (-36)[ebp]
|
||||
fsub qword ptr (-44)[ebp]
|
||||
fld qword ptr (L15)
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
je L13
|
||||
mov dword ptr (-28)[ebp],1
|
||||
jmp L14
|
||||
L13:
|
||||
mov dword ptr (-28)[ebp],0
|
||||
L14:
|
||||
mov edi,dword ptr (-28)[ebp]
|
||||
mov dword ptr (_i),edi
|
||||
mov eax,0
|
||||
L11:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f5
|
||||
_f5:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (_k)
|
||||
mov esi,dword ptr (_m)
|
||||
mov ebx,dword ptr (_A)
|
||||
mov edx,edi
|
||||
imul edx,esi
|
||||
lea edx,[ebx][edx*8]
|
||||
mov ecx,dword ptr (_j)
|
||||
mov eax,ecx
|
||||
imul eax,esi
|
||||
lea esi,[ebx][eax*8]
|
||||
mov ebx,dword ptr (_n)
|
||||
mov eax,dword ptr (_B)
|
||||
imul edi,ebx
|
||||
lea edi,[eax][edi*8]
|
||||
imul ecx,ebx
|
||||
lea ebx,[eax][ecx*8]
|
||||
fld qword ptr [edx]
|
||||
fmul qword ptr [esi]
|
||||
fld qword ptr [edi]
|
||||
fmul qword ptr [ebx]
|
||||
faddp st(1),st
|
||||
fstp qword ptr (_x)
|
||||
fld qword ptr [edx]
|
||||
fmul qword ptr [ebx]
|
||||
fld qword ptr [edi]
|
||||
fmul qword ptr [esi]
|
||||
fsubp st(1),st
|
||||
fstp qword ptr (_x)
|
||||
mov eax,0
|
||||
L16:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 8 dup (0)
|
||||
public _B
|
||||
align 4
|
||||
_B label byte
|
||||
db 4 dup (0)
|
||||
public _A
|
||||
align 4
|
||||
_A label byte
|
||||
db 4 dup (0)
|
||||
public _n
|
||||
align 4
|
||||
_n label byte
|
||||
db 4 dup (0)
|
||||
public _m
|
||||
align 4
|
||||
_m label byte
|
||||
db 4 dup (0)
|
||||
public _k
|
||||
align 4
|
||||
_k label byte
|
||||
db 4 dup (0)
|
||||
public _j
|
||||
align 4
|
||||
_j label byte
|
||||
db 4 dup (0)
|
||||
public _i
|
||||
align 4
|
||||
_i label byte
|
||||
db 4 dup (0)
|
||||
public _b
|
||||
align 4
|
||||
_b label byte
|
||||
db 80 dup (0)
|
||||
public _a
|
||||
align 4
|
||||
_a label byte
|
||||
db 80 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L15 label byte
|
||||
dd 00H
|
||||
dd 00H
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _main
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f
|
||||
_f:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,eax
|
||||
call _f
|
||||
add esp,0
|
||||
lea edi,[eax][edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
mov eax,0
|
||||
L2:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f2
|
||||
_f2:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
call _f
|
||||
add esp,0
|
||||
mov edi,eax
|
||||
cmp dword ptr (20)[ebp],0
|
||||
je L5
|
||||
call _f
|
||||
add esp,0
|
||||
mov esi,eax
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
jmp L6
|
||||
L5:
|
||||
mov dword ptr (-4)[ebp],1
|
||||
L6:
|
||||
mov esi,dword ptr (-4)[ebp]
|
||||
lea edi,[esi][edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
mov eax,0
|
||||
L3:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f3
|
||||
_f3:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,44
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
mov dword ptr (-12)[ebp],0
|
||||
mov dword ptr (-16)[ebp],0
|
||||
mov dword ptr (-20)[ebp],0
|
||||
mov dword ptr (-24)[ebp],0
|
||||
mov dword ptr (-28)[ebp],0
|
||||
mov dword ptr (-32)[ebp],0
|
||||
mov dword ptr (-36)[ebp],0
|
||||
mov dword ptr (-40)[ebp],0
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
lea esi,(4)[edi]
|
||||
mov dword ptr (24)[ebp],esi
|
||||
cmp dword ptr (20)[ebp],0
|
||||
je L9
|
||||
call _f
|
||||
add esp,0
|
||||
mov esi,eax
|
||||
mov dword ptr (-44)[ebp],esi
|
||||
jmp L10
|
||||
L9:
|
||||
mov dword ptr (-44)[ebp],0
|
||||
L10:
|
||||
mov esi,dword ptr (-44)[ebp]
|
||||
mov dword ptr [edi],esi
|
||||
mov eax,0
|
||||
L7:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f4
|
||||
_f4:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,52
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov dword ptr (-8)[ebp],0
|
||||
mov dword ptr (-12)[ebp],0
|
||||
mov dword ptr (-16)[ebp],0
|
||||
mov dword ptr (-20)[ebp],0
|
||||
mov dword ptr (-24)[ebp],0
|
||||
mov edi,dword ptr (_i)
|
||||
lea esi,[edi*8]
|
||||
fld qword ptr (_a)[esi]
|
||||
fstp qword ptr (-36)[ebp]
|
||||
fld qword ptr (_b)[esi]
|
||||
fstp qword ptr (-44)[ebp]
|
||||
fld qword ptr (-36)[ebp]
|
||||
fadd qword ptr (-44)[ebp]
|
||||
fld qword ptr (L15)
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
je L13
|
||||
cmp edi,0
|
||||
je L13
|
||||
fld qword ptr (-36)[ebp]
|
||||
fsub qword ptr (-44)[ebp]
|
||||
fld qword ptr (L15)
|
||||
fcompp
|
||||
fstsw ax
|
||||
sahf
|
||||
je L13
|
||||
mov dword ptr (-28)[ebp],1
|
||||
jmp L14
|
||||
L13:
|
||||
mov dword ptr (-28)[ebp],0
|
||||
L14:
|
||||
mov edi,dword ptr (-28)[ebp]
|
||||
mov dword ptr (_i),edi
|
||||
mov eax,0
|
||||
L11:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _f5
|
||||
_f5:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (_k)
|
||||
mov esi,dword ptr (_m)
|
||||
mov ebx,dword ptr (_A)
|
||||
mov edx,edi
|
||||
imul edx,esi
|
||||
lea edx,[ebx][edx*8]
|
||||
mov ecx,dword ptr (_j)
|
||||
mov eax,ecx
|
||||
imul eax,esi
|
||||
lea esi,[ebx][eax*8]
|
||||
mov ebx,dword ptr (_n)
|
||||
mov eax,dword ptr (_B)
|
||||
imul edi,ebx
|
||||
lea edi,[eax][edi*8]
|
||||
imul ecx,ebx
|
||||
lea ebx,[eax][ecx*8]
|
||||
fld qword ptr [edx]
|
||||
fmul qword ptr [esi]
|
||||
fld qword ptr [edi]
|
||||
fmul qword ptr [ebx]
|
||||
faddp st(1),st
|
||||
fstp qword ptr (_x)
|
||||
fld qword ptr [edx]
|
||||
fmul qword ptr [ebx]
|
||||
fld qword ptr [edi]
|
||||
fmul qword ptr [esi]
|
||||
fsubp st(1),st
|
||||
fstp qword ptr (_x)
|
||||
mov eax,0
|
||||
L16:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
db 8 dup (0)
|
||||
public _B
|
||||
align 4
|
||||
_B label byte
|
||||
db 4 dup (0)
|
||||
public _A
|
||||
align 4
|
||||
_A label byte
|
||||
db 4 dup (0)
|
||||
public _n
|
||||
align 4
|
||||
_n label byte
|
||||
db 4 dup (0)
|
||||
public _m
|
||||
align 4
|
||||
_m label byte
|
||||
db 4 dup (0)
|
||||
public _k
|
||||
align 4
|
||||
_k label byte
|
||||
db 4 dup (0)
|
||||
public _j
|
||||
align 4
|
||||
_j label byte
|
||||
db 4 dup (0)
|
||||
public _i
|
||||
align 4
|
||||
_i label byte
|
||||
db 4 dup (0)
|
||||
public _b
|
||||
align 4
|
||||
_b label byte
|
||||
db 80 dup (0)
|
||||
public _a
|
||||
align 4
|
||||
_a label byte
|
||||
db 80 dup (0)
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L15 label byte
|
||||
dd 00H
|
||||
dd 00H
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
12
lcc/x86/win32/tst/stdarg.1bk
Normal file → Executable file
12
lcc/x86/win32/tst/stdarg.1bk
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
test 1
|
||||
test 2
|
||||
test 3
|
||||
test 4
|
||||
test 5.000000
|
||||
{1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
|
||||
test 1
|
||||
test 2
|
||||
test 3
|
||||
test 4
|
||||
test 5.000000
|
||||
{1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
|
||||
|
|
2
lcc/x86/win32/tst/stdarg.2bk
Normal file → Executable file
2
lcc/x86/win32/tst/stdarg.2bk
Normal file → Executable file
|
@ -1 +1 @@
|
|||
tst/stdarg.c:51: warning: missing return value
|
||||
tst/stdarg.c:51: warning: missing return value
|
||||
|
|
830
lcc/x86/win32/tst/stdarg.sbk
Normal file → Executable file
830
lcc/x86/win32/tst/stdarg.sbk
Normal file → Executable file
|
@ -1,415 +1,415 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
dd 4
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
lea edi,(L2)
|
||||
push edi
|
||||
call _print
|
||||
add esp,4
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
lea edi,(L3)
|
||||
push edi
|
||||
call _print
|
||||
add esp,8
|
||||
push 10
|
||||
push 3
|
||||
lea edi,(L5)
|
||||
push edi
|
||||
call _print
|
||||
add esp,12
|
||||
push 10
|
||||
push 4
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
lea edi,(L6)
|
||||
push edi
|
||||
call _print
|
||||
add esp,20
|
||||
push 10
|
||||
fld qword ptr (L10)
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
lea edi,(L9)
|
||||
push edi
|
||||
call _print
|
||||
add esp,24
|
||||
lea edi,(_x)
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov esi,edi
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
lea edi,(L11)
|
||||
push edi
|
||||
call _print
|
||||
add esp,100
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _print
|
||||
_print:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,28
|
||||
lea edi,(24)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L17
|
||||
L14:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
cmp edi,37
|
||||
jne L18
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
movsx edi,byte ptr [edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
cmp edi,115
|
||||
je L34
|
||||
cmp edi,115
|
||||
jg L39
|
||||
L38:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
cmp edi,98
|
||||
jl L20
|
||||
cmp edi,102
|
||||
jg L20
|
||||
jmp dword ptr (L40-392)[edi*4]
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L40 label byte
|
||||
dd L23
|
||||
dd L28
|
||||
dd L30
|
||||
dd L20
|
||||
dd L36
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
L39:
|
||||
cmp dword ptr (-8)[ebp],119
|
||||
je L32
|
||||
jmp L20
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(16)[edi]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
lea edi,(-24)[ebp]
|
||||
mov esi,dword ptr (-28)[ebp]
|
||||
lea esi,(-16)[esi]
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-12)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-16)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-20)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-24)[ebp]
|
||||
push edi
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
jmp L19
|
||||
L28:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
movsx edi,byte ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L30:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L31)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L32:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
movsx edi,word ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L33)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L34:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L35)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L36:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(8)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
fld qword ptr (-8)[edi]
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L37)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
jmp L19
|
||||
L20:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L18:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L19:
|
||||
L15:
|
||||
inc dword ptr (20)[ebp]
|
||||
L17:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
cmp edi,0
|
||||
jne L14
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov eax,0
|
||||
L12:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L37 label byte
|
||||
db 37
|
||||
db 102
|
||||
db 0
|
||||
align 1
|
||||
L35 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 0
|
||||
align 1
|
||||
L33 label byte
|
||||
db 37
|
||||
db 120
|
||||
db 0
|
||||
align 1
|
||||
L31 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
align 1
|
||||
L29 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 123
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 125
|
||||
db 0
|
||||
align 1
|
||||
L11 label byte
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 10
|
||||
db 0
|
||||
align 4
|
||||
L10 label byte
|
||||
dd 00H
|
||||
dd 040140000H
|
||||
align 1
|
||||
L9 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 37
|
||||
db 115
|
||||
db 32
|
||||
db 37
|
||||
db 102
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L8 label byte
|
||||
db 115
|
||||
db 116
|
||||
db 0
|
||||
align 1
|
||||
L7 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L6 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 37
|
||||
db 115
|
||||
db 32
|
||||
db 37
|
||||
db 119
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L5 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 50
|
||||
db 0
|
||||
align 1
|
||||
L3 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L2 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 49
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
_DATA segment
|
||||
public _x
|
||||
align 4
|
||||
_x label byte
|
||||
dd 1
|
||||
dd 2
|
||||
dd 3
|
||||
dd 4
|
||||
public _main
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
lea edi,(L2)
|
||||
push edi
|
||||
call _print
|
||||
add esp,4
|
||||
lea edi,(L4)
|
||||
push edi
|
||||
lea edi,(L3)
|
||||
push edi
|
||||
call _print
|
||||
add esp,8
|
||||
push 10
|
||||
push 3
|
||||
lea edi,(L5)
|
||||
push edi
|
||||
call _print
|
||||
add esp,12
|
||||
push 10
|
||||
push 4
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
lea edi,(L6)
|
||||
push edi
|
||||
call _print
|
||||
add esp,20
|
||||
push 10
|
||||
fld qword ptr (L10)
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L8)
|
||||
push edi
|
||||
lea edi,(L7)
|
||||
push edi
|
||||
lea edi,(L9)
|
||||
push edi
|
||||
call _print
|
||||
add esp,24
|
||||
lea edi,(_x)
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov esi,edi
|
||||
mov dword ptr (-4)[ebp],esi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
mov esi,edi
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
lea edi,(L11)
|
||||
push edi
|
||||
call _print
|
||||
add esp,100
|
||||
mov eax,0
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _print
|
||||
_print:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,28
|
||||
lea edi,(24)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
jmp L17
|
||||
L14:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
cmp edi,37
|
||||
jne L18
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea edi,(1)[edi]
|
||||
mov dword ptr (20)[ebp],edi
|
||||
movsx edi,byte ptr [edi]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
cmp edi,115
|
||||
je L34
|
||||
cmp edi,115
|
||||
jg L39
|
||||
L38:
|
||||
mov edi,dword ptr (-8)[ebp]
|
||||
cmp edi,98
|
||||
jl L20
|
||||
cmp edi,102
|
||||
jg L20
|
||||
jmp dword ptr (L40-392)[edi*4]
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L40 label byte
|
||||
dd L23
|
||||
dd L28
|
||||
dd L30
|
||||
dd L20
|
||||
dd L36
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
L39:
|
||||
cmp dword ptr (-8)[ebp],119
|
||||
je L32
|
||||
jmp L20
|
||||
L23:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(16)[edi]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
lea edi,(-24)[ebp]
|
||||
mov esi,dword ptr (-28)[ebp]
|
||||
lea esi,(-16)[esi]
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (-12)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-16)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-20)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-24)[ebp]
|
||||
push edi
|
||||
lea edi,(L24)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
jmp L19
|
||||
L28:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
movsx edi,byte ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L30:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L31)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L32:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
movsx edi,word ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L33)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L34:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(4)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (-4)[edi]
|
||||
push edi
|
||||
lea edi,(L35)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L36:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,(8)[edi]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
fld qword ptr (-8)[edi]
|
||||
sub esp,8
|
||||
fstp qword ptr [esp]
|
||||
lea edi,(L37)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
jmp L19
|
||||
L20:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
jmp L19
|
||||
L18:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
push edi
|
||||
lea edi,(L29)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
L19:
|
||||
L15:
|
||||
inc dword ptr (20)[ebp]
|
||||
L17:
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
movsx edi,byte ptr [edi]
|
||||
cmp edi,0
|
||||
jne L14
|
||||
mov dword ptr (-4)[ebp],0
|
||||
mov eax,0
|
||||
L12:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L37 label byte
|
||||
db 37
|
||||
db 102
|
||||
db 0
|
||||
align 1
|
||||
L35 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 0
|
||||
align 1
|
||||
L33 label byte
|
||||
db 37
|
||||
db 120
|
||||
db 0
|
||||
align 1
|
||||
L31 label byte
|
||||
db 37
|
||||
db 100
|
||||
db 0
|
||||
align 1
|
||||
L29 label byte
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L24 label byte
|
||||
db 123
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 125
|
||||
db 0
|
||||
align 1
|
||||
L11 label byte
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 32
|
||||
db 37
|
||||
db 98
|
||||
db 10
|
||||
db 0
|
||||
align 4
|
||||
L10 label byte
|
||||
dd 00H
|
||||
dd 040140000H
|
||||
align 1
|
||||
L9 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 37
|
||||
db 115
|
||||
db 32
|
||||
db 37
|
||||
db 102
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L8 label byte
|
||||
db 115
|
||||
db 116
|
||||
db 0
|
||||
align 1
|
||||
L7 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 0
|
||||
align 1
|
||||
L6 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 37
|
||||
db 115
|
||||
db 32
|
||||
db 37
|
||||
db 119
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L5 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 37
|
||||
db 99
|
||||
db 0
|
||||
align 1
|
||||
L4 label byte
|
||||
db 50
|
||||
db 0
|
||||
align 1
|
||||
L3 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L2 label byte
|
||||
db 116
|
||||
db 101
|
||||
db 115
|
||||
db 116
|
||||
db 32
|
||||
db 49
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
10
lcc/x86/win32/tst/struct.1bk
Normal file → Executable file
10
lcc/x86/win32/tst/struct.1bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
(-1,-1) is not within [10,10; 310,310]
|
||||
(1,1) is not within [10,10; 310,310]
|
||||
(20,300) is within [10,10; 310,310]
|
||||
(500,400) is not within [10,10; 310,310]
|
||||
ab
|
||||
(-1,-1) is not within [10,10; 310,310]
|
||||
(1,1) is not within [10,10; 310,310]
|
||||
(20,300) is within [10,10; 310,310]
|
||||
(500,400) is not within [10,10; 310,310]
|
||||
ab
|
||||
|
|
4
lcc/x86/win32/tst/struct.2bk
Normal file → Executable file
4
lcc/x86/win32/tst/struct.2bk
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
tst/struct.c:49: warning: missing return value
|
||||
tst/struct.c:68: warning: missing return value
|
||||
tst/struct.c:49: warning: missing return value
|
||||
tst/struct.c:68: warning: missing return value
|
||||
|
|
906
lcc/x86/win32/tst/struct.sbk
Normal file → Executable file
906
lcc/x86/win32/tst/struct.sbk
Normal file → Executable file
|
@ -1,453 +1,453 @@
|
|||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _addpoint
|
||||
_TEXT segment
|
||||
_addpoint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
add dword ptr (24)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
add dword ptr (28)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(24)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _canonrect
|
||||
_canonrect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,32
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L10
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-20)[ebp],edi
|
||||
jmp L11
|
||||
L10:
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
mov dword ptr (-20)[ebp],edi
|
||||
L11:
|
||||
mov edi,dword ptr (-20)[ebp]
|
||||
mov dword ptr (-16)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
cmp dword ptr (28)[ebp],edi
|
||||
jge L20
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-24)[ebp],edi
|
||||
jmp L21
|
||||
L20:
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
mov dword ptr (-24)[ebp],edi
|
||||
L21:
|
||||
mov edi,dword ptr (-24)[ebp]
|
||||
mov dword ptr (-12)[ebp],edi
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jle L26
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
jmp L27
|
||||
L26:
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
L27:
|
||||
mov edi,dword ptr (-28)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
cmp dword ptr (28)[ebp],edi
|
||||
jle L37
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-32)[ebp],edi
|
||||
jmp L38
|
||||
L37:
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
mov dword ptr (-32)[ebp],edi
|
||||
L38:
|
||||
mov edi,dword ptr (-32)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(-16)[ebp]
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
L5:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _makepoint
|
||||
_makepoint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(-8)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
L39:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _makerect
|
||||
_makerect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,16
|
||||
lea edi,(-16)[ebp]
|
||||
lea esi,(24)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-8)[ebp]
|
||||
lea esi,(32)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-16)[ebp]
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _canonrect
|
||||
add esp,20
|
||||
L42:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _ptinrect
|
||||
_ptinrect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
cmp edi,dword ptr (28)[ebp]
|
||||
jl L53
|
||||
cmp edi,dword ptr (36)[ebp]
|
||||
jge L53
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L53
|
||||
mov edi,dword ptr (40)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L53
|
||||
mov dword ptr (-4)[ebp],1
|
||||
jmp L54
|
||||
L53:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L54:
|
||||
mov eax,dword ptr (-4)[ebp]
|
||||
L45:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 97
|
||||
db 98
|
||||
db 0
|
||||
db 1 dup (0)
|
||||
public _odd
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_odd:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
lea edi,(-4)[ebp]
|
||||
lea esi,(20)[ebp]
|
||||
mov ecx,4
|
||||
rep movsb
|
||||
lea edi,(-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L56)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
mov eax,0
|
||||
L55:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L58 label byte
|
||||
dd 0
|
||||
dd 0
|
||||
align 4
|
||||
L59 label byte
|
||||
dd 320
|
||||
dd 320
|
||||
align 4
|
||||
L60 label byte
|
||||
dd -1
|
||||
dd -1
|
||||
dd 1
|
||||
dd 1
|
||||
dd 20
|
||||
dd 300
|
||||
dd 500
|
||||
dd 400
|
||||
public _main
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,108
|
||||
lea edi,(-68)[ebp]
|
||||
lea esi,(L58)
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-76)[ebp]
|
||||
lea esi,(L59)
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-36)[ebp]
|
||||
lea esi,(L60)
|
||||
mov ecx,32
|
||||
rep movsb
|
||||
push -10
|
||||
push -10
|
||||
lea edi,(-84)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
lea esi,(-84)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-76)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-92)[ebp]
|
||||
push edi
|
||||
call _addpoint
|
||||
add esp,20
|
||||
push 10
|
||||
push 10
|
||||
lea edi,(-100)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
lea esi,(-100)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-68)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-108)[ebp]
|
||||
push edi
|
||||
call _addpoint
|
||||
add esp,20
|
||||
lea esi,(-108)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-92)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-52)[ebp]
|
||||
push edi
|
||||
call _makerect
|
||||
add esp,20
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L64
|
||||
L61:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*8]
|
||||
mov esi,dword ptr (-32)[ebp][edi]
|
||||
push esi
|
||||
mov edi,dword ptr (-36)[ebp][edi]
|
||||
push edi
|
||||
lea edi,(-60)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
mov edi,dword ptr (-56)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (-36)[ebp][edi*8]
|
||||
push edi
|
||||
lea edi,(L65)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
lea esi,(-52)[ebp]
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
lea esi,(-60)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
call _ptinrect
|
||||
add esp,24
|
||||
cmp eax,0
|
||||
jne L68
|
||||
lea edi,(L70)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L68:
|
||||
mov edi,dword ptr (-40)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-44)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-48)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-52)[ebp]
|
||||
push edi
|
||||
lea edi,(L71)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
L62:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L64:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,4
|
||||
jb L61
|
||||
lea esi,(_y)
|
||||
sub esp,4
|
||||
mov edi,esp
|
||||
mov ecx,4
|
||||
rep movsb
|
||||
call _odd
|
||||
add esp,4
|
||||
push 0
|
||||
call _exit
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L57:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _exit:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L71 label byte
|
||||
db 119
|
||||
db 105
|
||||
db 116
|
||||
db 104
|
||||
db 105
|
||||
db 110
|
||||
db 32
|
||||
db 91
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 59
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 93
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L70 label byte
|
||||
db 110
|
||||
db 111
|
||||
db 116
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L65 label byte
|
||||
db 40
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 41
|
||||
db 32
|
||||
db 105
|
||||
db 115
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L56 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
.486
|
||||
.model flat
|
||||
extrn __fltused:near
|
||||
extrn __ftol:near
|
||||
public _addpoint
|
||||
_TEXT segment
|
||||
_addpoint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
add dword ptr (24)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
add dword ptr (28)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(24)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
L1:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _canonrect
|
||||
_canonrect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,32
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L10
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-20)[ebp],edi
|
||||
jmp L11
|
||||
L10:
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
mov dword ptr (-20)[ebp],edi
|
||||
L11:
|
||||
mov edi,dword ptr (-20)[ebp]
|
||||
mov dword ptr (-16)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
cmp dword ptr (28)[ebp],edi
|
||||
jge L20
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-24)[ebp],edi
|
||||
jmp L21
|
||||
L20:
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
mov dword ptr (-24)[ebp],edi
|
||||
L21:
|
||||
mov edi,dword ptr (-24)[ebp]
|
||||
mov dword ptr (-12)[ebp],edi
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jle L26
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
jmp L27
|
||||
L26:
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
mov dword ptr (-28)[ebp],edi
|
||||
L27:
|
||||
mov edi,dword ptr (-28)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
cmp dword ptr (28)[ebp],edi
|
||||
jle L37
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-32)[ebp],edi
|
||||
jmp L38
|
||||
L37:
|
||||
mov edi,dword ptr (36)[ebp]
|
||||
mov dword ptr (-32)[ebp],edi
|
||||
L38:
|
||||
mov edi,dword ptr (-32)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(-16)[ebp]
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
L5:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _makepoint
|
||||
_makepoint:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,8
|
||||
mov edi,dword ptr (24)[ebp]
|
||||
mov dword ptr (-8)[ebp],edi
|
||||
mov edi,dword ptr (28)[ebp]
|
||||
mov dword ptr (-4)[ebp],edi
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
lea esi,(-8)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
L39:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _makerect
|
||||
_makerect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,16
|
||||
lea edi,(-16)[ebp]
|
||||
lea esi,(24)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-8)[ebp]
|
||||
lea esi,(32)[ebp]
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-16)[ebp]
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
push edi
|
||||
call _canonrect
|
||||
add esp,20
|
||||
L42:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
public _ptinrect
|
||||
_ptinrect:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
mov edi,dword ptr (20)[ebp]
|
||||
cmp edi,dword ptr (28)[ebp]
|
||||
jl L53
|
||||
cmp edi,dword ptr (36)[ebp]
|
||||
jge L53
|
||||
mov edi,dword ptr (32)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jl L53
|
||||
mov edi,dword ptr (40)[ebp]
|
||||
cmp dword ptr (24)[ebp],edi
|
||||
jge L53
|
||||
mov dword ptr (-4)[ebp],1
|
||||
jmp L54
|
||||
L53:
|
||||
mov dword ptr (-4)[ebp],0
|
||||
L54:
|
||||
mov eax,dword ptr (-4)[ebp]
|
||||
L45:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_DATA segment
|
||||
public _y
|
||||
align 4
|
||||
_y label byte
|
||||
db 97
|
||||
db 98
|
||||
db 0
|
||||
db 1 dup (0)
|
||||
public _odd
|
||||
_DATA ends
|
||||
_TEXT segment
|
||||
_odd:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,4
|
||||
lea edi,(-4)[ebp]
|
||||
lea esi,(20)[ebp]
|
||||
mov ecx,4
|
||||
rep movsb
|
||||
lea edi,(-4)[ebp]
|
||||
push edi
|
||||
lea edi,(L56)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,8
|
||||
mov eax,0
|
||||
L55:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 4
|
||||
L58 label byte
|
||||
dd 0
|
||||
dd 0
|
||||
align 4
|
||||
L59 label byte
|
||||
dd 320
|
||||
dd 320
|
||||
align 4
|
||||
L60 label byte
|
||||
dd -1
|
||||
dd -1
|
||||
dd 1
|
||||
dd 1
|
||||
dd 20
|
||||
dd 300
|
||||
dd 500
|
||||
dd 400
|
||||
public _main
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
_main:
|
||||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,108
|
||||
lea edi,(-68)[ebp]
|
||||
lea esi,(L58)
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-76)[ebp]
|
||||
lea esi,(L59)
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-36)[ebp]
|
||||
lea esi,(L60)
|
||||
mov ecx,32
|
||||
rep movsb
|
||||
push -10
|
||||
push -10
|
||||
lea edi,(-84)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
lea esi,(-84)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-76)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-92)[ebp]
|
||||
push edi
|
||||
call _addpoint
|
||||
add esp,20
|
||||
push 10
|
||||
push 10
|
||||
lea edi,(-100)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
lea esi,(-100)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-68)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-108)[ebp]
|
||||
push edi
|
||||
call _addpoint
|
||||
add esp,20
|
||||
lea esi,(-108)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea esi,(-92)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
lea edi,(-52)[ebp]
|
||||
push edi
|
||||
call _makerect
|
||||
add esp,20
|
||||
mov dword ptr (-4)[ebp],0
|
||||
jmp L64
|
||||
L61:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
lea edi,[edi*8]
|
||||
mov esi,dword ptr (-32)[ebp][edi]
|
||||
push esi
|
||||
mov edi,dword ptr (-36)[ebp][edi]
|
||||
push edi
|
||||
lea edi,(-60)[ebp]
|
||||
push edi
|
||||
call _makepoint
|
||||
add esp,12
|
||||
mov edi,dword ptr (-56)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
mov edi,dword ptr (-36)[ebp][edi*8]
|
||||
push edi
|
||||
lea edi,(L65)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,12
|
||||
lea esi,(-52)[ebp]
|
||||
sub esp,16
|
||||
mov edi,esp
|
||||
mov ecx,16
|
||||
rep movsb
|
||||
lea esi,(-60)[ebp]
|
||||
sub esp,8
|
||||
mov edi,esp
|
||||
mov ecx,8
|
||||
rep movsb
|
||||
call _ptinrect
|
||||
add esp,24
|
||||
cmp eax,0
|
||||
jne L68
|
||||
lea edi,(L70)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,4
|
||||
L68:
|
||||
mov edi,dword ptr (-40)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-44)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-48)[ebp]
|
||||
push edi
|
||||
mov edi,dword ptr (-52)[ebp]
|
||||
push edi
|
||||
lea edi,(L71)
|
||||
push edi
|
||||
call _printf
|
||||
add esp,20
|
||||
L62:
|
||||
inc dword ptr (-4)[ebp]
|
||||
L64:
|
||||
mov edi,dword ptr (-4)[ebp]
|
||||
cmp edi,4
|
||||
jb L61
|
||||
lea esi,(_y)
|
||||
sub esp,4
|
||||
mov edi,esp
|
||||
mov ecx,4
|
||||
rep movsb
|
||||
call _odd
|
||||
add esp,4
|
||||
push 0
|
||||
call _exit
|
||||
add esp,4
|
||||
mov eax,0
|
||||
L57:
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
pop edi
|
||||
pop esi
|
||||
pop ebx
|
||||
ret
|
||||
_TEXT ends
|
||||
extrn _exit:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
extrn _printf:near
|
||||
_TEXT segment
|
||||
_TEXT ends
|
||||
_TEXT segment
|
||||
align 1
|
||||
L71 label byte
|
||||
db 119
|
||||
db 105
|
||||
db 116
|
||||
db 104
|
||||
db 105
|
||||
db 110
|
||||
db 32
|
||||
db 91
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 59
|
||||
db 32
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 93
|
||||
db 10
|
||||
db 0
|
||||
align 1
|
||||
L70 label byte
|
||||
db 110
|
||||
db 111
|
||||
db 116
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L65 label byte
|
||||
db 40
|
||||
db 37
|
||||
db 100
|
||||
db 44
|
||||
db 37
|
||||
db 100
|
||||
db 41
|
||||
db 32
|
||||
db 105
|
||||
db 115
|
||||
db 32
|
||||
db 0
|
||||
align 1
|
||||
L56 label byte
|
||||
db 37
|
||||
db 115
|
||||
db 10
|
||||
db 0
|
||||
_TEXT ends
|
||||
end
|
||||
|
|
152
lcc/x86/win32/tst/switch.1bk
Normal file → Executable file
152
lcc/x86/win32/tst/switch.1bk
Normal file → Executable file
|
@ -1,76 +1,76 @@
|
|||
b = 0x8
|
||||
f = 0xc
|
||||
n = 0xa
|
||||
r = 0xd
|
||||
t = 0x9
|
||||
v = 0xb
|
||||
x = 0x78
|
||||
f:
|
||||
x = 0
|
||||
x = 1
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 7
|
||||
x = 8
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 16
|
||||
x = 17
|
||||
x = 18
|
||||
x = 19
|
||||
x = 20
|
||||
g:
|
||||
1 1
|
||||
1 2
|
||||
2 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
d 6
|
||||
3 7
|
||||
d 7
|
||||
3 8
|
||||
d 8
|
||||
d 9
|
||||
d 10
|
||||
h:
|
||||
i = 8
|
||||
i = 16
|
||||
i = 120
|
||||
i = 128
|
||||
i = 248
|
||||
i = 264
|
||||
i = 272
|
||||
i = 280
|
||||
i = 288
|
||||
i = 296
|
||||
i = 304
|
||||
i = 312
|
||||
488 defaults
|
||||
x = 0x1000000
|
||||
x = 0x2000000
|
||||
x = 0x3000000
|
||||
x = 0x4000000
|
||||
x = 0x5000000
|
||||
x = 0x6000000 (default)
|
||||
x = 0x7000000 (default)
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
b = 0x8
|
||||
f = 0xc
|
||||
n = 0xa
|
||||
r = 0xd
|
||||
t = 0x9
|
||||
v = 0xb
|
||||
x = 0x78
|
||||
f:
|
||||
x = 0
|
||||
x = 1
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 2
|
||||
x = 7
|
||||
x = 8
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 9
|
||||
x = 16
|
||||
x = 17
|
||||
x = 18
|
||||
x = 19
|
||||
x = 20
|
||||
g:
|
||||
1 1
|
||||
1 2
|
||||
2 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
d 6
|
||||
3 7
|
||||
d 7
|
||||
3 8
|
||||
d 8
|
||||
d 9
|
||||
d 10
|
||||
h:
|
||||
i = 8
|
||||
i = 16
|
||||
i = 120
|
||||
i = 128
|
||||
i = 248
|
||||
i = 264
|
||||
i = 272
|
||||
i = 280
|
||||
i = 288
|
||||
i = 296
|
||||
i = 304
|
||||
i = 312
|
||||
488 defaults
|
||||
x = 0x1000000
|
||||
x = 0x2000000
|
||||
x = 0x3000000
|
||||
x = 0x4000000
|
||||
x = 0x5000000
|
||||
x = 0x6000000 (default)
|
||||
x = 0x7000000 (default)
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
|
10
lcc/x86/win32/tst/switch.2bk
Normal file → Executable file
10
lcc/x86/win32/tst/switch.2bk
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
tst/switch.c:55: warning: missing return value
|
||||
tst/switch.c:73: warning: missing return value
|
||||
tst/switch.c:97: warning: missing return value
|
||||
tst/switch.c:112: warning: missing return value
|
||||
tst/switch.c:137: warning: missing return value
|
||||
tst/switch.c:55: warning: missing return value
|
||||
tst/switch.c:73: warning: missing return value
|
||||
tst/switch.c:97: warning: missing return value
|
||||
tst/switch.c:112: warning: missing return value
|
||||
tst/switch.c:137: warning: missing return value
|
||||
|
|
1920
lcc/x86/win32/tst/switch.sbk
Normal file → Executable file
1920
lcc/x86/win32/tst/switch.sbk
Normal file → Executable file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue