* Moved lcc and q3asm into code/tools
This commit is contained in:
parent
b1cef6352e
commit
ad118b9baf
452 changed files with 0 additions and 0 deletions
92
code/tools/lcc/x86/linux/tst/8q.1bk
Normal file
92
code/tools/lcc/x86/linux/tst/8q.1bk
Normal file
|
@ -0,0 +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
|
2
code/tools/lcc/x86/linux/tst/8q.2bk
Normal file
2
code/tools/lcc/x86/linux/tst/8q.2bk
Normal file
|
@ -0,0 +1,2 @@
|
|||
tst/8q.c:30: warning: missing return value
|
||||
tst/8q.c:39: warning: missing return value
|
180
code/tools/lcc/x86/linux/tst/8q.sbk
Normal file
180
code/tools/lcc/x86/linux/tst/8q.sbk
Normal file
|
@ -0,0 +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"
|
4
code/tools/lcc/x86/linux/tst/array.1bk
Normal file
4
code/tools/lcc/x86/linux/tst/array.1bk
Normal file
|
@ -0,0 +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
|
2
code/tools/lcc/x86/linux/tst/array.2bk
Normal file
2
code/tools/lcc/x86/linux/tst/array.2bk
Normal file
|
@ -0,0 +1,2 @@
|
|||
tst/array.c:33: warning: missing return value
|
||||
tst/array.c:48: warning: missing return value
|
235
code/tools/lcc/x86/linux/tst/array.sbk
Normal file
235
code/tools/lcc/x86/linux/tst/array.sbk
Normal file
|
@ -0,0 +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"
|
51
code/tools/lcc/x86/linux/tst/cf.1bk
Normal file
51
code/tools/lcc/x86/linux/tst/cf.1bk
Normal file
|
@ -0,0 +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
|
0
code/tools/lcc/x86/linux/tst/cf.2bk
Normal file
0
code/tools/lcc/x86/linux/tst/cf.2bk
Normal file
161
code/tools/lcc/x86/linux/tst/cf.sbk
Normal file
161
code/tools/lcc/x86/linux/tst/cf.sbk
Normal file
|
@ -0,0 +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"
|
48
code/tools/lcc/x86/linux/tst/cq.1bk
Normal file
48
code/tools/lcc/x86/linux/tst/cq.1bk
Normal file
|
@ -0,0 +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.
|
25
code/tools/lcc/x86/linux/tst/cq.2bk
Normal file
25
code/tools/lcc/x86/linux/tst/cq.2bk
Normal file
|
@ -0,0 +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
|
15756
code/tools/lcc/x86/linux/tst/cq.sbk
Normal file
15756
code/tools/lcc/x86/linux/tst/cq.sbk
Normal file
File diff suppressed because it is too large
Load diff
11
code/tools/lcc/x86/linux/tst/cvt.1bk
Normal file
11
code/tools/lcc/x86/linux/tst/cvt.1bk
Normal file
|
@ -0,0 +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
|
2
code/tools/lcc/x86/linux/tst/cvt.2bk
Normal file
2
code/tools/lcc/x86/linux/tst/cvt.2bk
Normal file
|
@ -0,0 +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
|
792
code/tools/lcc/x86/linux/tst/cvt.sbk
Normal file
792
code/tools/lcc/x86/linux/tst/cvt.sbk
Normal file
|
@ -0,0 +1,792 @@
|
|||
.globl print
|
||||
.text
|
||||
.align 16
|
||||
.type print,@function
|
||||
print:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
fldl D
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
fldl d
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
flds f
|
||||
subl $8,%esp
|
||||
fstpl (%esp)
|
||||
pushl L
|
||||
pushl I
|
||||
movw S,%di
|
||||
movzwl %di,%edi
|
||||
pushl %edi
|
||||
movb C,%bl
|
||||
movzbl %bl,%edi
|
||||
pushl %edi
|
||||
pushl l
|
||||
pushl i
|
||||
movswl s,%edi
|
||||
pushl %edi
|
||||
movsbl c,%edi
|
||||
pushl %edi
|
||||
pushl $.LC2
|
||||
call printf
|
||||
addl $60,%esp
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf3:
|
||||
.size print,.Lf3-print
|
||||
.globl main
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $296,%esp
|
||||
movb $1,c
|
||||
movsbl c,%edi
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,C
|
||||
movl %esi,%ebx
|
||||
movw %bx,S
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -8(%ebp)
|
||||
fldl -8(%ebp)
|
||||
fstpl d
|
||||
fldl -8(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movw $2,s
|
||||
movswl s,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,C
|
||||
movl %esi,%ebx
|
||||
movw %bx,S
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -16(%ebp)
|
||||
fldl -16(%ebp)
|
||||
fstpl d
|
||||
fldl -16(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movl $3,i
|
||||
movl i,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,l
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,C
|
||||
movl %esi,%ebx
|
||||
movw %bx,S
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -24(%ebp)
|
||||
fldl -24(%ebp)
|
||||
fstpl d
|
||||
fldl -24(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movl $4,l
|
||||
movl l,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,C
|
||||
movl %esi,%ebx
|
||||
movw %bx,S
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -32(%ebp)
|
||||
fldl -32(%ebp)
|
||||
fstpl d
|
||||
fldl -32(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movb $5,C
|
||||
movb C,%bl
|
||||
movzbl %bl,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movw %bx,S
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -40(%ebp)
|
||||
fldl -40(%ebp)
|
||||
fstpl d
|
||||
fldl -40(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movw $6,S
|
||||
movw S,%di
|
||||
movzwl %di,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%esi
|
||||
movl %esi,%ebx
|
||||
movb %bl,C
|
||||
movl %esi,I
|
||||
movl %esi,L
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstps f
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fstpl -48(%ebp)
|
||||
fldl -48(%ebp)
|
||||
fstpl d
|
||||
fldl -48(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movl $7,I
|
||||
movl I,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%ebx
|
||||
movw %bx,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%ebx
|
||||
movb %bl,C
|
||||
movl %edi,%esi
|
||||
movw %si,S
|
||||
movl %edi,L
|
||||
fldl .LC5
|
||||
movl %edi,%esi
|
||||
shrl $1,%esi
|
||||
pushl %esi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fmulp %st(1),%st
|
||||
andl $1,%edi
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
faddp %st(1),%st
|
||||
fstpl -56(%ebp)
|
||||
fldl -56(%ebp)
|
||||
fstps f
|
||||
fldl -56(%ebp)
|
||||
fstpl d
|
||||
fldl -56(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
movl $8,L
|
||||
movl L,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%ebx
|
||||
movw %bx,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
movl %edi,%ebx
|
||||
movb %bl,C
|
||||
movl %edi,%esi
|
||||
movw %si,S
|
||||
movw S,%si
|
||||
movzwl %si,%esi
|
||||
movl %esi,I
|
||||
fldl .LC5
|
||||
movl %edi,%esi
|
||||
shrl $1,%esi
|
||||
pushl %esi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
fmulp %st(1),%st
|
||||
andl $1,%edi
|
||||
pushl %edi
|
||||
fildl (%esp)
|
||||
addl $4,%esp
|
||||
faddp %st(1),%st
|
||||
fstpl -64(%ebp)
|
||||
fldl -64(%ebp)
|
||||
fstps f
|
||||
fldl -64(%ebp)
|
||||
fstpl d
|
||||
fldl -64(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
flds .LC6
|
||||
fstps f
|
||||
flds f
|
||||
fstps -84(%ebp)
|
||||
flds -84(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
flds .LC10
|
||||
fcomps -84(%ebp)
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC8
|
||||
flds -84(%ebp)
|
||||
fsubs .LC10
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-68(%ebp)
|
||||
jmp .LC9
|
||||
.LC8:
|
||||
flds -84(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-68(%ebp)
|
||||
.LC9:
|
||||
movl -68(%ebp),%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,C
|
||||
flds .LC10
|
||||
fcomps f
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC12
|
||||
flds f
|
||||
fsubs .LC10
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-72(%ebp)
|
||||
jmp .LC13
|
||||
.LC12:
|
||||
flds f
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-72(%ebp)
|
||||
.LC13:
|
||||
movl -72(%ebp),%edi
|
||||
movw %di,S
|
||||
flds .LC10
|
||||
fcomps f
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC15
|
||||
flds f
|
||||
fsubs .LC10
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-76(%ebp)
|
||||
jmp .LC16
|
||||
.LC15:
|
||||
flds f
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-76(%ebp)
|
||||
.LC16:
|
||||
movl -76(%ebp),%edi
|
||||
movl %edi,I
|
||||
flds .LC10
|
||||
fcomps f
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC18
|
||||
flds f
|
||||
fsubs .LC10
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-80(%ebp)
|
||||
jmp .LC19
|
||||
.LC18:
|
||||
flds f
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-80(%ebp)
|
||||
.LC19:
|
||||
movl -80(%ebp),%edi
|
||||
movl %edi,L
|
||||
flds f
|
||||
fstpl -120(%ebp)
|
||||
fldl -120(%ebp)
|
||||
fstpl d
|
||||
fldl -120(%ebp)
|
||||
fstpl D
|
||||
call print
|
||||
fldl .LC20
|
||||
fstpl d
|
||||
fldl d
|
||||
fstpl -144(%ebp)
|
||||
fldl -144(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
fldl .LC24
|
||||
fcompl -144(%ebp)
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC22
|
||||
fldl -144(%ebp)
|
||||
fsubl .LC24
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-124(%ebp)
|
||||
jmp .LC23
|
||||
.LC22:
|
||||
fldl -144(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-124(%ebp)
|
||||
.LC23:
|
||||
movl -124(%ebp),%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,C
|
||||
fldl .LC24
|
||||
fcompl d
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC26
|
||||
fldl d
|
||||
fsubl .LC24
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-128(%ebp)
|
||||
jmp .LC27
|
||||
.LC26:
|
||||
fldl d
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-128(%ebp)
|
||||
.LC27:
|
||||
movl -128(%ebp),%edi
|
||||
movw %di,S
|
||||
fldl .LC24
|
||||
fcompl d
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC29
|
||||
fldl d
|
||||
fsubl .LC24
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-132(%ebp)
|
||||
jmp .LC30
|
||||
.LC29:
|
||||
fldl d
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-132(%ebp)
|
||||
.LC30:
|
||||
movl -132(%ebp),%edi
|
||||
movl %edi,I
|
||||
fldl .LC24
|
||||
fcompl d
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC32
|
||||
fldl d
|
||||
fsubl .LC24
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-136(%ebp)
|
||||
jmp .LC33
|
||||
.LC32:
|
||||
fldl d
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-136(%ebp)
|
||||
.LC33:
|
||||
movl -136(%ebp),%edi
|
||||
movl %edi,L
|
||||
fldl d
|
||||
fstps f
|
||||
fldl d
|
||||
fstpl D
|
||||
call print
|
||||
fldl .LC34
|
||||
fstpl D
|
||||
fldl D
|
||||
fstpl -232(%ebp)
|
||||
fldl -232(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,c
|
||||
movl %edi,%esi
|
||||
movw %si,s
|
||||
movl %edi,i
|
||||
movl %edi,l
|
||||
fldl .LC38
|
||||
fcompl -232(%ebp)
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC36
|
||||
fldl -232(%ebp)
|
||||
fsubl .LC38
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-212(%ebp)
|
||||
jmp .LC37
|
||||
.LC36:
|
||||
fldl -232(%ebp)
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-212(%ebp)
|
||||
.LC37:
|
||||
movl -212(%ebp),%edi
|
||||
movl %edi,%ebx
|
||||
movb %bl,C
|
||||
fldl .LC38
|
||||
fcompl D
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC40
|
||||
fldl D
|
||||
fsubl .LC38
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-216(%ebp)
|
||||
jmp .LC41
|
||||
.LC40:
|
||||
fldl D
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-216(%ebp)
|
||||
.LC41:
|
||||
movl -216(%ebp),%edi
|
||||
movw %di,S
|
||||
fldl .LC38
|
||||
fcompl D
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC43
|
||||
fldl D
|
||||
fsubl .LC38
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-220(%ebp)
|
||||
jmp .LC44
|
||||
.LC43:
|
||||
fldl D
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-220(%ebp)
|
||||
.LC44:
|
||||
movl -220(%ebp),%edi
|
||||
movl %edi,I
|
||||
fldl .LC38
|
||||
fcompl D
|
||||
fstsw %ax
|
||||
sahf
|
||||
ja .LC46
|
||||
fldl D
|
||||
fsubl .LC38
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
leal 0x80000000(%edi),%edi
|
||||
movl %edi,-224(%ebp)
|
||||
jmp .LC47
|
||||
.LC46:
|
||||
fldl D
|
||||
subl $4,%esp
|
||||
fistpl 0(%esp)
|
||||
popl %eax
|
||||
movl %eax,%edi
|
||||
movl %edi,-224(%ebp)
|
||||
.LC47:
|
||||
movl -224(%ebp),%edi
|
||||
movl %edi,L
|
||||
fldl D
|
||||
fstps f
|
||||
fldl D
|
||||
fstpl d
|
||||
call print
|
||||
movl $0,p
|
||||
movl $0,p
|
||||
movl $0,p
|
||||
movl $0,p
|
||||
movl P,%edi
|
||||
movl %edi,p
|
||||
movl $0,P
|
||||
movl $0,P
|
||||
movl $0,P
|
||||
movl $0,P
|
||||
movl p,%edi
|
||||
movl %edi,P
|
||||
movl $0,%eax
|
||||
.LC4:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf48:
|
||||
.size main,.Lf48-main
|
||||
.bss
|
||||
.globl P
|
||||
.align 4
|
||||
.type P,@object
|
||||
.size P,4
|
||||
.comm P,4
|
||||
.globl p
|
||||
.align 4
|
||||
.type p,@object
|
||||
.size p,4
|
||||
.comm p,4
|
||||
.globl D
|
||||
.align 4
|
||||
.type D,@object
|
||||
.size D,8
|
||||
.comm D,8
|
||||
.globl d
|
||||
.align 4
|
||||
.type d,@object
|
||||
.size d,8
|
||||
.comm d,8
|
||||
.globl f
|
||||
.align 4
|
||||
.type f,@object
|
||||
.size f,4
|
||||
.comm f,4
|
||||
.globl L
|
||||
.align 4
|
||||
.type L,@object
|
||||
.size L,4
|
||||
.comm L,4
|
||||
.globl I
|
||||
.align 4
|
||||
.type I,@object
|
||||
.size I,4
|
||||
.comm I,4
|
||||
.globl S
|
||||
.align 2
|
||||
.type S,@object
|
||||
.size S,2
|
||||
.comm S,2
|
||||
.globl C
|
||||
.align 1
|
||||
.type C,@object
|
||||
.size C,1
|
||||
.comm C,1
|
||||
.globl l
|
||||
.align 4
|
||||
.type l,@object
|
||||
.size l,4
|
||||
.comm l,4
|
||||
.globl i
|
||||
.align 4
|
||||
.type i,@object
|
||||
.size i,4
|
||||
.comm i,4
|
||||
.globl s
|
||||
.align 2
|
||||
.type s,@object
|
||||
.size s,2
|
||||
.comm s,2
|
||||
.globl c
|
||||
.align 1
|
||||
.type c,@object
|
||||
.size c,1
|
||||
.comm c,1
|
||||
.data
|
||||
.align 4
|
||||
.LC38:
|
||||
.long 0
|
||||
.long 1105199104
|
||||
.align 4
|
||||
.LC34:
|
||||
.long 0
|
||||
.long 1076232192
|
||||
.align 4
|
||||
.LC24:
|
||||
.long 0
|
||||
.long 1105199104
|
||||
.align 4
|
||||
.LC20:
|
||||
.long 0
|
||||
.long 1076101120
|
||||
.align 4
|
||||
.LC10:
|
||||
.long 1325400064
|
||||
.align 4
|
||||
.LC6:
|
||||
.long 1091567616
|
||||
.align 4
|
||||
.LC5:
|
||||
.long 0
|
||||
.long 1073741824
|
||||
.align 1
|
||||
.LC2:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 117
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 117
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 117
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 117
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 102
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 108
|
||||
.byte 102
|
||||
.byte 10
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
5
code/tools/lcc/x86/linux/tst/fields.1bk
Normal file
5
code/tools/lcc/x86/linux/tst/fields.1bk
Normal file
|
@ -0,0 +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
|
4
code/tools/lcc/x86/linux/tst/fields.2bk
Normal file
4
code/tools/lcc/x86/linux/tst/fields.2bk
Normal file
|
@ -0,0 +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
|
321
code/tools/lcc/x86/linux/tst/fields.sbk
Normal file
321
code/tools/lcc/x86/linux/tst/fields.sbk
Normal file
|
@ -0,0 +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"
|
29
code/tools/lcc/x86/linux/tst/front.2bk
Normal file
29
code/tools/lcc/x86/linux/tst/front.2bk
Normal file
|
@ -0,0 +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
|
530
code/tools/lcc/x86/linux/tst/front.sbk
Normal file
530
code/tools/lcc/x86/linux/tst/front.sbk
Normal file
|
@ -0,0 +1,530 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
pushl $0
|
||||
call exit
|
||||
addl $4,%esp
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf2:
|
||||
.size main,.Lf2-main
|
||||
.globl nested
|
||||
.align 16
|
||||
.type nested,@function
|
||||
nested:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
cmpl $4,20(%ebp)
|
||||
jge .LC7
|
||||
cmpl $114,24(%ebp)
|
||||
je .LC10
|
||||
.LC7:
|
||||
cmpl $1,20(%ebp)
|
||||
jne .LC9
|
||||
movl 24(%ebp),%edi
|
||||
cmpl $104,%edi
|
||||
je .LC10
|
||||
cmpl $105,%edi
|
||||
je .LC10
|
||||
.LC9:
|
||||
cmpl $2,20(%ebp)
|
||||
jne .LC4
|
||||
movl 24(%ebp),%edi
|
||||
cmpl $111,%edi
|
||||
je .LC10
|
||||
cmpl $121,%edi
|
||||
jne .LC4
|
||||
.LC10:
|
||||
movl 24(%ebp),%edi
|
||||
movl %edi,20(%ebp)
|
||||
.LC4:
|
||||
movl $0,%eax
|
||||
.LC3:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf11:
|
||||
.size nested,.Lf11-nested
|
||||
.globl s
|
||||
.align 16
|
||||
.type s,@function
|
||||
s:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
.LC12:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf13:
|
||||
.size s,.Lf13-s
|
||||
.data
|
||||
.globl Dy
|
||||
.align 4
|
||||
.type Dy,@object
|
||||
.size Dy,8
|
||||
Dy:
|
||||
.long 0
|
||||
.space 4
|
||||
.globl Dz
|
||||
.align 4
|
||||
.type Dz,@object
|
||||
.size Dz,8
|
||||
Dz:
|
||||
.long 1
|
||||
.space 4
|
||||
.globl Dfunc
|
||||
.text
|
||||
.align 16
|
||||
.type Dfunc,@function
|
||||
Dfunc:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf16:
|
||||
.size Dfunc,.Lf16-Dfunc
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf18:
|
||||
.size f,.Lf18-f
|
||||
.globl f1
|
||||
.align 16
|
||||
.type f1,@function
|
||||
f1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf20:
|
||||
.size f1,.Lf20-f1
|
||||
.globl f2
|
||||
.align 16
|
||||
.type f2,@function
|
||||
f2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf22:
|
||||
.size f2,.Lf22-f2
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf24:
|
||||
.size g,.Lf24-g
|
||||
.globl h
|
||||
.align 16
|
||||
.type h,@function
|
||||
h:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf26:
|
||||
.size h,.Lf26-h
|
||||
.globl h1
|
||||
.align 16
|
||||
.type h1,@function
|
||||
h1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf28:
|
||||
.size h1,.Lf28-h1
|
||||
.globl h2
|
||||
.align 16
|
||||
.type h2,@function
|
||||
h2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf30:
|
||||
.size h2,.Lf30-h2
|
||||
.data
|
||||
.align 4
|
||||
.type yy.32,@object
|
||||
.size yy.32,4
|
||||
yy.32:
|
||||
.long 1
|
||||
.globl set1
|
||||
.text
|
||||
.align 16
|
||||
.type set1,@function
|
||||
set1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf33:
|
||||
.size set1,.Lf33-set1
|
||||
.data
|
||||
.align 4
|
||||
.type yy.35,@object
|
||||
.size yy.35,4
|
||||
yy.35:
|
||||
.long 2
|
||||
.globl set2
|
||||
.text
|
||||
.align 16
|
||||
.type set2,@function
|
||||
set2:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf36:
|
||||
.size set2,.Lf36-set2
|
||||
.align 16
|
||||
.type goo,@function
|
||||
goo:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf38:
|
||||
.size goo,.Lf38-goo
|
||||
.globl sss
|
||||
.align 16
|
||||
.type sss,@function
|
||||
sss:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf40:
|
||||
.size sss,.Lf40-sss
|
||||
.bss
|
||||
.align 4
|
||||
.type xr.42,@object
|
||||
.size xr.42,4
|
||||
.lcomm xr.42,4
|
||||
.globl rrr
|
||||
.text
|
||||
.align 16
|
||||
.type rrr,@function
|
||||
rrr:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf43:
|
||||
.size rrr,.Lf43-rrr
|
||||
.globl setstatic
|
||||
.align 16
|
||||
.type setstatic,@function
|
||||
setstatic:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf45:
|
||||
.size setstatic,.Lf45-setstatic
|
||||
.globl gx1
|
||||
.align 16
|
||||
.type gx1,@function
|
||||
gx1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf47:
|
||||
.size gx1,.Lf47-gx1
|
||||
.globl ff1
|
||||
.align 16
|
||||
.type ff1,@function
|
||||
ff1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf49:
|
||||
.size ff1,.Lf49-ff1
|
||||
.globl gg1
|
||||
.align 16
|
||||
.type gg1,@function
|
||||
gg1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf51:
|
||||
.size gg1,.Lf51-gg1
|
||||
.globl hh1
|
||||
.align 16
|
||||
.type hh1,@function
|
||||
hh1:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf53:
|
||||
.size hh1,.Lf53-hh1
|
||||
.globl cmp
|
||||
.align 16
|
||||
.type cmp,@function
|
||||
cmp:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf55:
|
||||
.size cmp,.Lf55-cmp
|
||||
.globl sort
|
||||
.align 16
|
||||
.type sort,@function
|
||||
sort:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf57:
|
||||
.size sort,.Lf57-sort
|
||||
.globl onearg
|
||||
.align 16
|
||||
.type onearg,@function
|
||||
onearg:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf65:
|
||||
.size onearg,.Lf65-onearg
|
||||
.bss
|
||||
.globl ss4
|
||||
.align 4
|
||||
.type ss4,@object
|
||||
.size ss4,4
|
||||
.comm ss4,4
|
||||
.align 4
|
||||
.type ss2,@object
|
||||
.size ss2,4
|
||||
.lcomm ss2,4
|
||||
.align 4
|
||||
.type ss5,@object
|
||||
.size ss5,4
|
||||
.lcomm ss5,4
|
||||
.globl ss3
|
||||
.align 4
|
||||
.type ss3,@object
|
||||
.size ss3,4
|
||||
.comm ss3,4
|
||||
.align 4
|
||||
.type ss1,@object
|
||||
.size ss1,4
|
||||
.lcomm ss1,4
|
||||
.align 4
|
||||
.type yy,@object
|
||||
.size yy,4
|
||||
.lcomm yy,4
|
||||
.globl z
|
||||
.align 4
|
||||
.type z,@object
|
||||
.size z,4
|
||||
.comm z,4
|
||||
.globl y
|
||||
.align 4
|
||||
.type y,@object
|
||||
.size y,4
|
||||
.comm y,4
|
||||
.globl x
|
||||
.align 4
|
||||
.type x,@object
|
||||
.size x,4
|
||||
.comm x,4
|
||||
.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
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
0
code/tools/lcc/x86/linux/tst/incr.1bk
Normal file
0
code/tools/lcc/x86/linux/tst/incr.1bk
Normal file
9
code/tools/lcc/x86/linux/tst/incr.2bk
Normal file
9
code/tools/lcc/x86/linux/tst/incr.2bk
Normal file
|
@ -0,0 +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
|
181
code/tools/lcc/x86/linux/tst/incr.sbk
Normal file
181
code/tools/lcc/x86/linux/tst/incr.sbk
Normal file
|
@ -0,0 +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"
|
16
code/tools/lcc/x86/linux/tst/init.1bk
Normal file
16
code/tools/lcc/x86/linux/tst/init.1bk
Normal file
|
@ -0,0 +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
|
3
code/tools/lcc/x86/linux/tst/init.2bk
Normal file
3
code/tools/lcc/x86/linux/tst/init.2bk
Normal file
|
@ -0,0 +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
|
336
code/tools/lcc/x86/linux/tst/init.sbk
Normal file
336
code/tools/lcc/x86/linux/tst/init.sbk
Normal file
|
@ -0,0 +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"
|
14
code/tools/lcc/x86/linux/tst/limits.1bk
Normal file
14
code/tools/lcc/x86/linux/tst/limits.1bk
Normal file
|
@ -0,0 +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
|
0
code/tools/lcc/x86/linux/tst/limits.2bk
Normal file
0
code/tools/lcc/x86/linux/tst/limits.2bk
Normal file
396
code/tools/lcc/x86/linux/tst/limits.sbk
Normal file
396
code/tools/lcc/x86/linux/tst/limits.sbk
Normal file
|
@ -0,0 +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"
|
183
code/tools/lcc/x86/linux/tst/paranoia.1bk
Normal file
183
code/tools/lcc/x86/linux/tst/paranoia.1bk
Normal file
|
@ -0,0 +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.
|
16
code/tools/lcc/x86/linux/tst/paranoia.2bk
Normal file
16
code/tools/lcc/x86/linux/tst/paranoia.2bk
Normal file
|
@ -0,0 +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
|
20248
code/tools/lcc/x86/linux/tst/paranoia.sbk
Normal file
20248
code/tools/lcc/x86/linux/tst/paranoia.sbk
Normal file
File diff suppressed because it is too large
Load diff
20
code/tools/lcc/x86/linux/tst/sort.1bk
Normal file
20
code/tools/lcc/x86/linux/tst/sort.1bk
Normal file
|
@ -0,0 +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
|
5
code/tools/lcc/x86/linux/tst/sort.2bk
Normal file
5
code/tools/lcc/x86/linux/tst/sort.2bk
Normal file
|
@ -0,0 +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
|
330
code/tools/lcc/x86/linux/tst/sort.sbk
Normal file
330
code/tools/lcc/x86/linux/tst/sort.sbk
Normal file
|
@ -0,0 +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"
|
0
code/tools/lcc/x86/linux/tst/spill.1bk
Normal file
0
code/tools/lcc/x86/linux/tst/spill.1bk
Normal file
6
code/tools/lcc/x86/linux/tst/spill.2bk
Normal file
6
code/tools/lcc/x86/linux/tst/spill.2bk
Normal file
|
@ -0,0 +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
|
282
code/tools/lcc/x86/linux/tst/spill.sbk
Normal file
282
code/tools/lcc/x86/linux/tst/spill.sbk
Normal file
|
@ -0,0 +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"
|
6
code/tools/lcc/x86/linux/tst/stdarg.1bk
Normal file
6
code/tools/lcc/x86/linux/tst/stdarg.1bk
Normal file
|
@ -0,0 +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}
|
1
code/tools/lcc/x86/linux/tst/stdarg.2bk
Normal file
1
code/tools/lcc/x86/linux/tst/stdarg.2bk
Normal file
|
@ -0,0 +1 @@
|
|||
tst/stdarg.c:51: warning: missing return value
|
395
code/tools/lcc/x86/linux/tst/stdarg.sbk
Normal file
395
code/tools/lcc/x86/linux/tst/stdarg.sbk
Normal file
|
@ -0,0 +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"
|
5
code/tools/lcc/x86/linux/tst/struct.1bk
Normal file
5
code/tools/lcc/x86/linux/tst/struct.1bk
Normal file
|
@ -0,0 +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
|
2
code/tools/lcc/x86/linux/tst/struct.2bk
Normal file
2
code/tools/lcc/x86/linux/tst/struct.2bk
Normal file
|
@ -0,0 +1,2 @@
|
|||
tst/struct.c:49: warning: missing return value
|
||||
tst/struct.c:68: warning: missing return value
|
477
code/tools/lcc/x86/linux/tst/struct.sbk
Normal file
477
code/tools/lcc/x86/linux/tst/struct.sbk
Normal file
|
@ -0,0 +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"
|
76
code/tools/lcc/x86/linux/tst/switch.1bk
Normal file
76
code/tools/lcc/x86/linux/tst/switch.1bk
Normal file
|
@ -0,0 +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
|
5
code/tools/lcc/x86/linux/tst/switch.2bk
Normal file
5
code/tools/lcc/x86/linux/tst/switch.2bk
Normal file
|
@ -0,0 +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
|
899
code/tools/lcc/x86/linux/tst/switch.sbk
Normal file
899
code/tools/lcc/x86/linux/tst/switch.sbk
Normal file
|
@ -0,0 +1,899 @@
|
|||
.globl main
|
||||
.text
|
||||
.align 16
|
||||
.type main,@function
|
||||
main:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
leal .LC6,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
jmp .LC5
|
||||
.LC2:
|
||||
movl -4(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
call backslash
|
||||
addl $4,%esp
|
||||
pushl %eax
|
||||
movl -4(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
pushl %edi
|
||||
pushl $.LC7
|
||||
call printf
|
||||
addl $12,%esp
|
||||
.LC3:
|
||||
incl -4(%ebp)
|
||||
.LC5:
|
||||
movl -4(%ebp),%edi
|
||||
movsbl (,%edi),%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC2
|
||||
call f
|
||||
call g
|
||||
call h
|
||||
movl $16777216,-8(%ebp)
|
||||
jmp .LC11
|
||||
.LC8:
|
||||
pushl -8(%ebp)
|
||||
call big
|
||||
addl $4,%esp
|
||||
.LC9:
|
||||
addl $16777216,-8(%ebp)
|
||||
.LC11:
|
||||
movl -8(%ebp),%edi
|
||||
andl $117440512,%edi
|
||||
cmpl $0,%edi
|
||||
jne .LC8
|
||||
call limit
|
||||
movl $0,%eax
|
||||
.LC1:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf12:
|
||||
.size main,.Lf12-main
|
||||
.globl backslash
|
||||
.align 16
|
||||
.type backslash,@function
|
||||
backslash:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $102,%edi
|
||||
je .LC17
|
||||
cmpl $102,%edi
|
||||
jg .LC23
|
||||
.LC22:
|
||||
cmpl $98,20(%ebp)
|
||||
je .LC16
|
||||
jmp .LC14
|
||||
.LC23:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $110,%edi
|
||||
je .LC18
|
||||
cmpl $110,%edi
|
||||
jl .LC14
|
||||
.LC24:
|
||||
movl 20(%ebp),%edi
|
||||
cmpl $114,%edi
|
||||
je .LC19
|
||||
cmpl $116,%edi
|
||||
je .LC20
|
||||
cmpl $118,%edi
|
||||
je .LC21
|
||||
jmp .LC14
|
||||
.LC16:
|
||||
movl $8,%eax
|
||||
jmp .LC13
|
||||
.LC17:
|
||||
movl $12,%eax
|
||||
jmp .LC13
|
||||
.LC18:
|
||||
movl $10,%eax
|
||||
jmp .LC13
|
||||
.LC19:
|
||||
movl $13,%eax
|
||||
jmp .LC13
|
||||
.LC20:
|
||||
movl $9,%eax
|
||||
jmp .LC13
|
||||
.LC21:
|
||||
movl $11,%eax
|
||||
jmp .LC13
|
||||
.LC14:
|
||||
movl 20(%ebp),%eax
|
||||
.LC13:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf25:
|
||||
.size backslash,.Lf25-backslash
|
||||
.globl f
|
||||
.align 16
|
||||
.type f,@function
|
||||
f:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $12,%esp
|
||||
movl $0,-8(%ebp)
|
||||
pushl $.LC27
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $0,-4(%ebp)
|
||||
.LC28:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-12(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $1,%edi
|
||||
jl .LC32
|
||||
cmpl $20,%edi
|
||||
jg .LC32
|
||||
jmp *.LC44-4(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC44:
|
||||
.long .LC34
|
||||
.long .LC35
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC36
|
||||
.long .LC37
|
||||
.long .LC38
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC32
|
||||
.long .LC39
|
||||
.long .LC40
|
||||
.long .LC41
|
||||
.long .LC42
|
||||
.long .LC43
|
||||
.text
|
||||
.LC34:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC35:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC36:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC37:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC38:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC39:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC40:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC41:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC42:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
jmp .LC33
|
||||
.LC43:
|
||||
movl -4(%ebp),%edi
|
||||
movl %edi,-8(%ebp)
|
||||
.LC32:
|
||||
.LC33:
|
||||
pushl -8(%ebp)
|
||||
pushl $.LC46
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC29:
|
||||
incl -4(%ebp)
|
||||
cmpl $20,-4(%ebp)
|
||||
jle .LC28
|
||||
movl $0,%eax
|
||||
.LC26:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf47:
|
||||
.size f,.Lf47-f
|
||||
.globl g
|
||||
.align 16
|
||||
.type g,@function
|
||||
g:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
pushl $.LC49
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $1,-4(%ebp)
|
||||
.LC50:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $1001,%edi
|
||||
jl .LC67
|
||||
cmpl $1004,%edi
|
||||
jg .LC68
|
||||
jmp *.LC69-4004(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC69:
|
||||
.long .LC63
|
||||
.long .LC63
|
||||
.long .LC63
|
||||
.long .LC63
|
||||
.text
|
||||
.LC67:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $1,%edi
|
||||
jl .LC54
|
||||
cmpl $8,%edi
|
||||
jg .LC54
|
||||
jmp *.LC71-4(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC71:
|
||||
.long .LC56
|
||||
.long .LC56
|
||||
.long .LC58
|
||||
.long .LC58
|
||||
.long .LC58
|
||||
.long .LC60
|
||||
.long .LC60
|
||||
.long .LC60
|
||||
.text
|
||||
.LC68:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $3001,%edi
|
||||
jl .LC54
|
||||
cmpl $3004,%edi
|
||||
jg .LC54
|
||||
jmp *.LC73-12004(,%edi,4)
|
||||
.data
|
||||
.align 4
|
||||
.LC73:
|
||||
.long .LC65
|
||||
.long .LC65
|
||||
.long .LC65
|
||||
.long .LC65
|
||||
.text
|
||||
.LC56:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC57
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC55
|
||||
.LC58:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC59
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC55
|
||||
.LC60:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC61
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC54:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC62
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC55
|
||||
.LC63:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC64
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC55
|
||||
.LC65:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC66
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC55:
|
||||
.LC51:
|
||||
incl -4(%ebp)
|
||||
cmpl $10,-4(%ebp)
|
||||
jle .LC50
|
||||
movl $0,%eax
|
||||
.LC48:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf75:
|
||||
.size g,.Lf75-g
|
||||
.globl h
|
||||
.align 16
|
||||
.type h,@function
|
||||
h:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $8,%esp
|
||||
movl $0,-8(%ebp)
|
||||
pushl $.LC77
|
||||
call printf
|
||||
addl $4,%esp
|
||||
movl $1,-4(%ebp)
|
||||
.LC78:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $264,%edi
|
||||
je .LC90
|
||||
cmpl $264,%edi
|
||||
jg .LC98
|
||||
.LC97:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $120,%edi
|
||||
je .LC88
|
||||
cmpl $120,%edi
|
||||
jg .LC100
|
||||
.LC99:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $8,%edi
|
||||
je .LC87
|
||||
cmpl $8,%edi
|
||||
jl .LC82
|
||||
.LC101:
|
||||
cmpl $16,-4(%ebp)
|
||||
je .LC86
|
||||
jmp .LC82
|
||||
.LC100:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $128,%edi
|
||||
je .LC84
|
||||
cmpl $128,%edi
|
||||
jl .LC82
|
||||
.LC102:
|
||||
cmpl $248,-4(%ebp)
|
||||
je .LC91
|
||||
jmp .LC82
|
||||
.LC98:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $288,%edi
|
||||
je .LC95
|
||||
cmpl $288,%edi
|
||||
jg .LC104
|
||||
.LC103:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $272,%edi
|
||||
je .LC92
|
||||
cmpl $272,%edi
|
||||
jl .LC82
|
||||
.LC105:
|
||||
cmpl $280,-4(%ebp)
|
||||
je .LC89
|
||||
jmp .LC82
|
||||
.LC104:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $304,%edi
|
||||
je .LC93
|
||||
cmpl $304,%edi
|
||||
jg .LC107
|
||||
.LC106:
|
||||
cmpl $296,-4(%ebp)
|
||||
je .LC94
|
||||
jmp .LC82
|
||||
.LC107:
|
||||
cmpl $312,-4(%ebp)
|
||||
je .LC96
|
||||
jmp .LC82
|
||||
.LC82:
|
||||
incl -8(%ebp)
|
||||
jmp .LC79
|
||||
.LC84:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC86:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC87:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC88:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC89:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC90:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC91:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC92:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC93:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC94:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC95:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC83
|
||||
.LC96:
|
||||
pushl -4(%ebp)
|
||||
pushl $.LC85
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC83:
|
||||
.LC79:
|
||||
incl -4(%ebp)
|
||||
cmpl $500,-4(%ebp)
|
||||
jle .LC78
|
||||
pushl -8(%ebp)
|
||||
pushl $.LC108
|
||||
call printf
|
||||
addl $8,%esp
|
||||
movl $0,%eax
|
||||
.LC76:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf109:
|
||||
.size h,.Lf109-h
|
||||
.globl big
|
||||
.align 16
|
||||
.type big,@function
|
||||
big:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl 20(%ebp),%edi
|
||||
andl $0x6000000,%edi
|
||||
movl %edi,-4(%ebp)
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $33554432,%edi
|
||||
je .LC116
|
||||
cmpl $33554432,%edi
|
||||
jg .LC120
|
||||
.LC119:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $-2,%edi
|
||||
je .LC114
|
||||
cmpl $-1,%edi
|
||||
je .LC114
|
||||
cmpl $0,%edi
|
||||
je .LC114
|
||||
jmp .LC111
|
||||
.LC120:
|
||||
movl -4(%ebp),%edi
|
||||
cmpl $67108864,%edi
|
||||
je .LC117
|
||||
jmp .LC111
|
||||
.LC114:
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC115
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC112
|
||||
.LC116:
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC115
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC112
|
||||
.LC117:
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC115
|
||||
call printf
|
||||
addl $8,%esp
|
||||
jmp .LC112
|
||||
.LC111:
|
||||
pushl 20(%ebp)
|
||||
pushl $.LC118
|
||||
call printf
|
||||
addl $8,%esp
|
||||
.LC112:
|
||||
movl $0,%eax
|
||||
.LC110:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf121:
|
||||
.size big,.Lf121-big
|
||||
.globl limit
|
||||
.align 16
|
||||
.type limit,@function
|
||||
limit:
|
||||
pushl %ebp
|
||||
pushl %ebx
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl %esp,%ebp
|
||||
subl $4,%esp
|
||||
movl $-2147483648,-4(%ebp)
|
||||
.LC123:
|
||||
movl -4(%ebp),%edi
|
||||
movl $-2147483648,%esi
|
||||
cmpl $-2147483648,%edi
|
||||
jl .LC127
|
||||
cmpl $-2147483644,%edi
|
||||
jg .LC127
|
||||
leal (,%edi,4),%edi
|
||||
leal (,%esi,4),%esi
|
||||
subl %esi,%edi
|
||||
jmp *.LC140(%edi)
|
||||
.data
|
||||
.align 4
|
||||
.LC140:
|
||||
.long .LC129
|
||||
.long .LC131
|
||||
.long .LC133
|
||||
.long .LC135
|
||||
.long .LC137
|
||||
.text
|
||||
.LC129:
|
||||
pushl $.LC130
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC128
|
||||
.LC131:
|
||||
pushl $.LC132
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC128
|
||||
.LC133:
|
||||
pushl $.LC134
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC128
|
||||
.LC135:
|
||||
pushl $.LC136
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC128
|
||||
.LC137:
|
||||
pushl $.LC138
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC128
|
||||
.LC127:
|
||||
pushl $.LC139
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC128:
|
||||
.LC124:
|
||||
incl -4(%ebp)
|
||||
cmpl $-2147483643,-4(%ebp)
|
||||
jle .LC123
|
||||
movl $2147483647,-4(%ebp)
|
||||
.LC141:
|
||||
movl -4(%ebp),%edi
|
||||
movl $2147483643,%esi
|
||||
cmpl $2147483643,%edi
|
||||
jl .LC145
|
||||
cmpl $2147483647,%edi
|
||||
jg .LC145
|
||||
leal (,%edi,4),%edi
|
||||
leal (,%esi,4),%esi
|
||||
subl %esi,%edi
|
||||
jmp *.LC152(%edi)
|
||||
.data
|
||||
.align 4
|
||||
.LC152:
|
||||
.long .LC151
|
||||
.long .LC150
|
||||
.long .LC149
|
||||
.long .LC148
|
||||
.long .LC147
|
||||
.text
|
||||
.LC147:
|
||||
pushl $.LC130
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC146
|
||||
.LC148:
|
||||
pushl $.LC132
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC146
|
||||
.LC149:
|
||||
pushl $.LC134
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC146
|
||||
.LC150:
|
||||
pushl $.LC136
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC146
|
||||
.LC151:
|
||||
pushl $.LC138
|
||||
call printf
|
||||
addl $4,%esp
|
||||
jmp .LC146
|
||||
.LC145:
|
||||
pushl $.LC139
|
||||
call printf
|
||||
addl $4,%esp
|
||||
.LC146:
|
||||
.LC142:
|
||||
decl -4(%ebp)
|
||||
cmpl $2147483642,-4(%ebp)
|
||||
jge .LC141
|
||||
movl $0,%eax
|
||||
.LC122:
|
||||
movl %ebp,%esp
|
||||
popl %edi
|
||||
popl %esi
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
ret
|
||||
.Lf153:
|
||||
.size limit,.Lf153-limit
|
||||
.data
|
||||
.align 1
|
||||
.LC139:
|
||||
.byte 53
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC138:
|
||||
.byte 52
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC136:
|
||||
.byte 51
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC134:
|
||||
.byte 50
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC132:
|
||||
.byte 49
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC130:
|
||||
.byte 48
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC118:
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 40
|
||||
.byte 100
|
||||
.byte 101
|
||||
.byte 102
|
||||
.byte 97
|
||||
.byte 117
|
||||
.byte 108
|
||||
.byte 116
|
||||
.byte 41
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC115:
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC108:
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 100
|
||||
.byte 101
|
||||
.byte 102
|
||||
.byte 97
|
||||
.byte 117
|
||||
.byte 108
|
||||
.byte 116
|
||||
.byte 115
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC85:
|
||||
.byte 105
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC77:
|
||||
.byte 104
|
||||
.byte 58
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC66:
|
||||
.byte 54
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC64:
|
||||
.byte 53
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC62:
|
||||
.byte 100
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC61:
|
||||
.byte 51
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC59:
|
||||
.byte 50
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC57:
|
||||
.byte 49
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC49:
|
||||
.byte 103
|
||||
.byte 58
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC46:
|
||||
.byte 120
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 37
|
||||
.byte 100
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC27:
|
||||
.byte 102
|
||||
.byte 58
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC7:
|
||||
.byte 37
|
||||
.byte 99
|
||||
.byte 32
|
||||
.byte 61
|
||||
.byte 32
|
||||
.byte 48
|
||||
.byte 120
|
||||
.byte 37
|
||||
.byte 120
|
||||
.byte 10
|
||||
.byte 0
|
||||
.align 1
|
||||
.LC6:
|
||||
.byte 98
|
||||
.byte 102
|
||||
.byte 110
|
||||
.byte 114
|
||||
.byte 116
|
||||
.byte 118
|
||||
.byte 120
|
||||
.byte 0
|
||||
.text
|
||||
.ident "LCC: 4.1"
|
74
code/tools/lcc/x86/linux/tst/wf1.1bk
Normal file
74
code/tools/lcc/x86/linux/tst/wf1.1bk
Normal file
|
@ -0,0 +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
|
2
code/tools/lcc/x86/linux/tst/wf1.2bk
Normal file
2
code/tools/lcc/x86/linux/tst/wf1.2bk
Normal file
|
@ -0,0 +1,2 @@
|
|||
tst/wf1.c:29: warning: missing return value
|
||||
tst/wf1.c:87: warning: missing return value
|
437
code/tools/lcc/x86/linux/tst/wf1.sbk
Normal file
437
code/tools/lcc/x86/linux/tst/wf1.sbk
Normal file
|
@ -0,0 +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"
|
10
code/tools/lcc/x86/linux/tst/yacc.1bk
Normal file
10
code/tools/lcc/x86/linux/tst/yacc.1bk
Normal file
|
@ -0,0 +1,10 @@
|
|||
a
|
||||
b
|
||||
load
|
||||
negate
|
||||
push 5
|
||||
c
|
||||
load
|
||||
multiply
|
||||
add
|
||||
store
|
3
code/tools/lcc/x86/linux/tst/yacc.2bk
Normal file
3
code/tools/lcc/x86/linux/tst/yacc.2bk
Normal file
|
@ -0,0 +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
|
2526
code/tools/lcc/x86/linux/tst/yacc.sbk
Normal file
2526
code/tools/lcc/x86/linux/tst/yacc.sbk
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue