* Moved lcc and q3asm into code/tools

This commit is contained in:
Tim Angus 2005-10-04 15:18:22 +00:00
parent b1cef6352e
commit ad118b9baf
452 changed files with 0 additions and 0 deletions

View 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

View file

@ -0,0 +1,2 @@
tst/8q.c:30: warning: missing return value
tst/8q.c:39: warning: missing return value

View file

@ -0,0 +1,144 @@
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
mov %g0,%i5
.L2:
sll %i5,2,%i4
set 1,%i3
set down,%i2
st %i3,[%i4+%i2]
set up,%i2
st %i3,[%i4+%i2]
.L3:
add %i5,1,%i5
cmp %i5,15; bl .L2; nop
mov %g0,%i5
.L6:
sll %i5,2,%i4
set rows,%i3
set 1,%i2
st %i2,[%i4+%i3]
.L7:
add %i5,1,%i5
cmp %i5,8; bl .L6; nop
mov %g0,%o0
call queens; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global queens
.align 4
queens:
save %sp,-96,%sp
mov %g0,%i5
.L11:
sll %i5,2,%i3
set rows,%i2
ld [%i3+%i2],%i3
cmp %i3,%g0; be .L15; nop
sub %i5,%i0,%i3
sll %i3,2,%i3
set up+28,%i2
ld [%i3+%i2],%i3
cmp %i3,%g0; be .L15; nop
add %i5,%i0,%i3
sll %i3,2,%i3
set down,%i2
ld [%i3+%i2],%i3
cmp %i3,%g0; be .L15; nop
add %i5,%i0,%i3
sll %i3,2,%i3
set down,%i2
st %g0,[%i3+%i2]
sub %i5,%i0,%i3
sll %i3,2,%i3
set up+28,%i2
st %g0,[%i3+%i2]
sll %i5,2,%i3
set rows,%i2
st %g0,[%i3+%i2]
sll %i0,2,%i4
set x,%i3
st %i5,[%i4+%i3]
cmp %i0,7; bne .L19; nop
call print; nop
ba .L20; nop
.L19:
add %i0,1,%o0
call queens; nop
.L20:
set 1,%i4
add %i5,%i0,%i3
sll %i3,2,%i3
set down,%i2
st %i4,[%i3+%i2]
sub %i5,%i0,%i3
sll %i3,2,%i3
set up+28,%i2
st %i4,[%i3+%i2]
sll %i5,2,%i3
set rows,%i2
st %i4,[%i3+%i2]
.L15:
.L12:
add %i5,1,%i5
cmp %i5,8; bl .L11; nop
mov %g0,%i0
.L10:
ret; restore
.type queens,#function
.size queens,.-queens
.global print
.align 4
print:
save %sp,-96,%sp
mov %g0,%i5
.L23:
set .L27,%o0
sll %i5,2,%i4
set x,%i3
ld [%i4+%i3],%i4
add %i4,49,%o1
call printf; nop
.L24:
add %i5,1,%i5
cmp %i5,8; bl .L23; nop
set .L28,%o0
call printf; nop
mov %g0,%i0
.L22:
ret; restore
.type print,#function
.size print,.-print
.section ".bss"
.global x
.type x,#object
.size x,32
.common x,32,4
.global rows
.type rows,#object
.size rows,32
.common rows,32,4
.global down
.type down,#object
.size down,60
.common down,60,4
.global up
.type up,#object
.size up,60
.common up,60,4
.section ".rodata"
.align 1
.L28:
.byte 10
.byte 0
.align 1
.L27:
.byte 37
.byte 99
.byte 32
.byte 0

View 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

View file

@ -0,0 +1,2 @@
tst/array.c:33: warning: missing return value
tst/array.c:48: warning: missing return value

View file

@ -0,0 +1,172 @@
.global main
.section ".text"
.align 4
main:
save %sp,-144,%sp
mov %g0,%i4
.L2:
mov %g0,%i5
.L6:
sll %i5,2,%i2
sll %i4,4,%i1
set x,%i0
add %i1,%i0,%i1
smul %i4,1000,%i0
add %i0,%i5,%i0
st %i0,[%i2+%i1]
.L7:
add %i5,1,%i5
cmp %i5,4; bl .L6; nop
sll %i4,2,%i2
set y,%i1
sll %i4,4,%i0
set x,%l7
add %i0,%l7,%i0
st %i0,[%i2+%i1]
.L3:
add %i4,1,%i4
cmp %i4,3; bl .L2; nop
call f; nop
mov %g0,%i4
.L10:
sll %i4,4,%i2
add -48,%fp,%i1
add %i2,%i1,%i2
mov %i2,%i3
sll %i4,2,%i1
set y,%i0
st %i2,[%i1+%i0]
mov %g0,%i5
.L14:
sll %i5,2,%i2
sll %i4,4,%i1
set x,%i0
add %i1,%i0,%i1
ld [%i2+%i1],%i1
st %i1,[%i2+%i3]
.L15:
add %i5,1,%i5
cmp %i5,4; bl .L14; nop
.L11:
add %i4,1,%i4
cmp %i4,3; bl .L10; nop
add -48,%fp,%o0
set y,%o1
call g; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global f
.align 4
f:
save %sp,-96,%sp
mov %g0,%i4
.L19:
mov %g0,%i5
.L23:
set .L27,%o0
sll %i5,2,%i3
sll %i4,4,%i2
set x,%i1
add %i2,%i1,%i2
ld [%i3+%i2],%o1
call printf; nop
.L24:
add %i5,1,%i5
cmp %i5,4; bl .L23; nop
.L20:
add %i4,1,%i4
cmp %i4,3; bl .L19; nop
set .L28,%o0
call printf; nop
mov %g0,%i4
.L29:
mov %g0,%i5
.L33:
set .L27,%o0
sll %i5,2,%i3
sll %i4,2,%i2
set y,%i1
ld [%i2+%i1],%i2
ld [%i3+%i2],%o1
call printf; nop
.L34:
add %i5,1,%i5
cmp %i5,4; bl .L33; nop
.L30:
add %i4,1,%i4
cmp %i4,3; bl .L29; nop
set .L28,%o0
call printf; nop
mov %g0,%i0
.L18:
ret; restore
.type f,#function
.size f,.-f
.global g
.align 4
g:
save %sp,-96,%sp
mov %g0,%i4
.L38:
mov %g0,%i5
.L42:
set .L27,%o0
sll %i5,2,%i3
sll %i4,4,%i2
add %i2,%i0,%i2
ld [%i3+%i2],%o1
call printf; nop
.L43:
add %i5,1,%i5
cmp %i5,4; bl .L42; nop
.L39:
add %i4,1,%i4
cmp %i4,3; bl .L38; nop
set .L28,%o0
call printf; nop
mov %g0,%i4
.L46:
mov %g0,%i5
.L50:
set .L27,%o0
sll %i5,2,%i3
sll %i4,2,%i2
ld [%i2+%i1],%i2
ld [%i3+%i2],%o1
call printf; nop
.L51:
add %i5,1,%i5
cmp %i5,4; bl .L50; nop
.L47:
add %i4,1,%i4
cmp %i4,3; bl .L46; nop
set .L28,%o0
call printf; nop
mov %g0,%i0
.L37:
ret; restore
.type g,#function
.size g,.-g
.section ".bss"
.global y
.type y,#object
.size y,12
.common y,12,4
.global x
.type x,#object
.size x,48
.common x,48,4
.section ".rodata"
.align 1
.L28:
.byte 10
.byte 0
.align 1
.L27:
.byte 32
.byte 37
.byte 100
.byte 0

View 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

View file

View file

@ -0,0 +1,143 @@
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
cmp %i0,1; bg .L2; nop
set .L4,%i2
ld [%i2],%f31
st %f31,[%fp+-4]
ba .L3; nop
.L2:
ld [%i1+4],%o0
call atof; nop
fmovs %f0,%f31
set .L5,%i2
ld [%i2],%f30
fdivs %f31,%f30,%f31
st %f31,[%fp+-4]
.L3:
mov %g0,%i5
.L6:
mov %i5,%i2
add %i2,1,%i5
sll %i2,2,%i2
set f,%l7
set .L4,%l6
ld [%l6],%f31
st %f31,[%i2+%l7]
.L7:
cmp %i5,127; ble .L6; nop
mov %g0,%i4
ba .L11; nop
.L10:
sll %i3,2,%i2
set f,%l7
add %i2,%l7,%i2
ld [%i2],%f31
set .L13,%l7
ld [%l7],%f30
fadds %f31,%f30,%f31
st %f31,[%i2]
add %i4,1,%i4
.L11:
call getchar; nop
mov %o0,%i3
cmp %o0,-1; bne .L10; nop
set .L14,%o0
call printf; nop
mov %g0,%i5
.L15:
sll %i5,2,%i2
set f,%l7
ld [%i2+%l7],%f31
set .L4,%i2
ld [%i2],%f30
fcmpes %f31,%f30; nop; fbue .L19; nop
st %i4,[%sp+64]; ld [%sp+64],%f30; fitos %f30,%f30
fdivs %f31,%f30,%f31
ld [%fp+-4],%f30
fcmpes %f31,%f30; nop; fbul .L19; nop
cmp %i5,32; bg .L21; nop
set .L23,%o0
mov %i5,%o1
call printf; nop
ba .L22; nop
.L21:
set .L24,%o0
mov %i5,%o1
call printf; nop
.L22:
set .L25,%o0
set .L5,%i2
ld [%i2],%f31
sll %i5,2,%i2
set f,%l7
ld [%i2+%l7],%f30
fmuls %f31,%f30,%f31
st %i4,[%sp+64]; ld [%sp+64],%f30; fitos %f30,%f30
fdivs %f31,%f30,%f31
fstod %f31,%f30
st %f30,[%sp+4*1+68]
st %f31,[%sp+4*2+68]
ld [%sp+4*1+68],%o1
ld [%sp+4*2+68],%o2
call printf; nop
.L19:
.L16:
add %i5,1,%i5
cmp %i5,127; ble .L15; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.section ".bss"
.global f
.type f,#object
.size f,512
.common f,512,4
.section ".rodata"
.align 1
.L25:
.byte 9
.byte 37
.byte 46
.byte 49
.byte 102
.byte 10
.byte 0
.align 1
.L24:
.byte 37
.byte 99
.byte 0
.align 1
.L23:
.byte 37
.byte 48
.byte 51
.byte 111
.byte 0
.align 1
.L14:
.byte 99
.byte 104
.byte 97
.byte 114
.byte 9
.byte 102
.byte 114
.byte 101
.byte 113
.byte 10
.byte 0
.align 4
.L13:
.word 0x3f800000
.align 4
.L5:
.word 0x42c80000
.align 4
.L4:
.word 0x0

View 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: 8
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.

View 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

File diff suppressed because it is too large Load diff

View 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

View 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

View file

@ -0,0 +1,715 @@
.global print
.section ".text"
.align 4
print:
save %sp,-128,%sp
set .L2,%o0
set c,%i5
ldsb [%i5],%o1
set s,%i5
ldsh [%i5],%o2
set i,%i5
ld [%i5],%o3
set l,%i5
ld [%i5],%o4
set C,%i5
ldub [%i5],%o5
set S,%i5
lduh [%i5],%i5
st %i5,[%sp+4*6+68]
set I,%i5
ld [%i5],%i5
st %i5,[%sp+4*7+68]
set L,%i5
ld [%i5],%i5
st %i5,[%sp+4*8+68]
set f,%i5
ld [%i5],%f31
fstod %f31,%f30
st %f30,[%sp+4*9+68]
st %f31,[%sp+4*10+68]
set d,%i5
ld2 [%i5],%f30
st %f30,[%sp+4*11+68]
st %f31,[%sp+4*12+68]
set D,%i5
ld2 [%i5],%f30
st %f30,[%sp+4*13+68]
st %f31,[%sp+4*14+68]
call printf; nop
.L1:
ret; restore
.type print,#function
.size print,.-print
.global main
.align 4
main:
save %sp,-104,%sp
set c,%i5
set 1,%i4
stb %i4,[%i5]
ldsb [%i5],%i5
set s,%i4
mov %i5,%i3
sth %i3,[%i4]
set i,%i4
st %i5,[%i4]
set l,%i4
st %i5,[%i4]
set C,%i3
mov %i5,%i2
stb %i2,[%i3]
set S,%i3
mov %i5,%i2
sth %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set s,%i5
set 2,%i4
sth %i4,[%i5]
ldsh [%i5],%i5
set c,%i4
mov %i5,%i3
stb %i3,[%i4]
set i,%i4
st %i5,[%i4]
set l,%i4
st %i5,[%i4]
set C,%i3
mov %i5,%i2
stb %i2,[%i3]
set S,%i3
mov %i5,%i2
sth %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set i,%i5
set 3,%i4
st %i4,[%i5]
ld [%i5],%i5
set c,%i4
mov %i5,%i3
stb %i3,[%i4]
set s,%i4
mov %i5,%i3
sth %i3,[%i4]
set l,%i4
st %i5,[%i4]
set C,%i3
mov %i5,%i2
stb %i2,[%i3]
set S,%i3
mov %i5,%i2
sth %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set l,%i5
set 4,%i4
st %i4,[%i5]
ld [%i5],%i5
set c,%i4
mov %i5,%i3
stb %i3,[%i4]
set s,%i4
mov %i5,%i3
sth %i3,[%i4]
set i,%i4
st %i5,[%i4]
set C,%i3
mov %i5,%i2
stb %i2,[%i3]
set S,%i3
mov %i5,%i2
sth %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set C,%i5
set 5,%i4
stb %i4,[%i5]
ldub [%i5],%i5
set c,%i4
mov %i5,%i3
stb %i3,[%i4]
set s,%i4
mov %i5,%i3
sth %i3,[%i4]
set i,%i4
st %i5,[%i4]
set l,%i4
st %i5,[%i4]
set S,%i3
mov %i5,%i2
sth %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set S,%i5
set 6,%i4
sth %i4,[%i5]
lduh [%i5],%i5
set c,%i4
mov %i5,%i3
stb %i3,[%i4]
set s,%i4
mov %i5,%i3
sth %i3,[%i4]
set i,%i4
st %i5,[%i4]
set l,%i4
st %i5,[%i4]
set C,%i3
mov %i5,%i2
stb %i2,[%i3]
set I,%i3
st %i5,[%i3]
set L,%i3
st %i5,[%i3]
set f,%i4
st %i5,[%sp+64]; ld [%sp+64],%f31; fitos %f31,%f31
st %f31,[%i4]
st %i5,[%sp+64]; ld [%sp+64],%f30; fitod %f30,%f30
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set I,%i5
set 7,%i4
st %i4,[%i5]
ld [%i5],%i5
set c,%i3
mov %i5,%i2
stb %i2,[%i3]
set s,%i3
mov %i5,%i2
sth %i2,[%i3]
set i,%i3
st %i5,[%i3]
set l,%i3
st %i5,[%i3]
set C,%i4
mov %i5,%i3
stb %i3,[%i4]
set S,%i4
mov %i5,%i3
sth %i3,[%i4]
set L,%i4
st %i5,[%i4]
set .L4,%i4
ld2 [%i4],%f30
srl %i5,1,%i4
st %i4,[%sp+64]; ld [%sp+64],%f28; fitod %f28,%f28
fmuld %f30,%f28,%f30
set 1,%i4
and %i5,%i4,%i5
st %i5,[%sp+64]; ld [%sp+64],%f28; fitod %f28,%f28
faddd %f30,%f28,%f30
set f,%i5
fdtos %f30,%f29
st %f29,[%i5]
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set L,%i5
set 8,%i4
st %i4,[%i5]
ld [%i5],%i5
set c,%i3
mov %i5,%i2
stb %i2,[%i3]
set s,%i3
mov %i5,%i2
sth %i2,[%i3]
set i,%i3
st %i5,[%i3]
set l,%i3
st %i5,[%i3]
set C,%i4
mov %i5,%i3
stb %i3,[%i4]
set S,%i4
mov %i5,%i3
sth %i3,[%i4]
set I,%i3
lduh [%i4],%i4
st %i4,[%i3]
set .L4,%i4
ld2 [%i4],%f30
srl %i5,1,%i4
st %i4,[%sp+64]; ld [%sp+64],%f28; fitod %f28,%f28
fmuld %f30,%f28,%f30
set 1,%i4
and %i5,%i4,%i5
st %i5,[%sp+64]; ld [%sp+64],%f28; fitod %f28,%f28
faddd %f30,%f28,%f30
set f,%i5
fdtos %f30,%f29
st %f29,[%i5]
set d,%i5
st2 %f30,[%i5]
set D,%i5
st2 %f30,[%i5]
call print; nop
set f,%i1
set .L5,%i0
ld [%i0],%f31
st %f31,[%i1]
ld [%i1],%f31
fstoi %f31,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
set c,%i0
mov %i1,%l7
stb %l7,[%i0]
set s,%i0
mov %i1,%l7
sth %l7,[%i0]
set i,%i0
st %i1,[%i0]
set l,%i0
st %i1,[%i0]
set .L9,%i1
ld [%i1],%f30
fcmpes %f31,%f30; nop; fbul .L7; nop
fsubs %f31,%f30,%f30
fstoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
set 0x80000000,%i0
add %i1,%i0,%i5
ba .L8; nop
.L7:
fstoi %f31,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
mov %i1,%i5
.L8:
set C,%i1
mov %i5,%i0
stb %i0,[%i1]
set f,%i1
ld [%i1],%f31
set .L9,%i1
ld [%i1],%f30
fcmpes %f31,%f30; nop; fbul .L11; nop
fsubs %f31,%f30,%f30
fstoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
set 0x80000000,%i0
add %i1,%i0,%i4
ba .L12; nop
.L11:
fstoi %f31,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
mov %i1,%i4
.L12:
set S,%i1
mov %i4,%i0
sth %i0,[%i1]
set f,%i1
ld [%i1],%f31
set .L9,%i1
ld [%i1],%f30
fcmpes %f31,%f30; nop; fbul .L14; nop
fsubs %f31,%f30,%f30
fstoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
set 0x80000000,%i0
add %i1,%i0,%i3
ba .L15; nop
.L14:
fstoi %f31,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
mov %i1,%i3
.L15:
set I,%i1
st %i3,[%i1]
set f,%i1
ld [%i1],%f31
set .L9,%i1
ld [%i1],%f30
fcmpes %f31,%f30; nop; fbul .L17; nop
fsubs %f31,%f30,%f30
fstoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
set 0x80000000,%i0
add %i1,%i0,%i2
ba .L18; nop
.L17:
fstoi %f31,%f0; st %f0,[%sp+64]; ld [%sp+64],%i1
mov %i1,%i2
.L18:
set L,%i1
st %i2,[%i1]
set f,%i1
ld [%i1],%f31
fstod %f31,%f30
set d,%i1
st2 %f30,[%i1]
set D,%i1
st2 %f30,[%i1]
call print; nop
set d,%l5
set .L19,%l4
ld2 [%l4],%f30
st2 %f30,[%l5]
ld2 [%l5],%f30
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
set c,%l4
mov %l5,%l3
stb %l3,[%l4]
set s,%l4
mov %l5,%l3
sth %l3,[%l4]
set i,%l4
st %l5,[%l4]
set l,%l4
st %l5,[%l4]
set .L23,%l5
ld2 [%l5],%f28
fcmped %f30,%f28; nop; fbul .L21; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
set 0x80000000,%l4
add %l5,%l4,%i1
ba .L22; nop
.L21:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
mov %l5,%i1
.L22:
set C,%l5
mov %i1,%l4
stb %l4,[%l5]
set d,%l5
ld2 [%l5],%f30
set .L23,%l5
ld2 [%l5],%f28
fcmped %f30,%f28; nop; fbul .L25; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
set 0x80000000,%l4
add %l5,%l4,%i0
ba .L26; nop
.L25:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
mov %l5,%i0
.L26:
set S,%l5
mov %i0,%l4
sth %l4,[%l5]
set d,%l5
ld2 [%l5],%f30
set .L23,%l5
ld2 [%l5],%f28
fcmped %f30,%f28; nop; fbul .L28; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
set 0x80000000,%l4
add %l5,%l4,%l7
ba .L29; nop
.L28:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
mov %l5,%l7
.L29:
set I,%l5
st %l7,[%l5]
set d,%l5
ld2 [%l5],%f30
set .L23,%l5
ld2 [%l5],%f28
fcmped %f30,%f28; nop; fbul .L31; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
set 0x80000000,%l4
add %l5,%l4,%l6
ba .L32; nop
.L31:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l5
mov %l5,%l6
.L32:
set L,%l5
st %l6,[%l5]
set d,%l5
ld2 [%l5],%f30
set f,%l5
fdtos %f30,%f29
st %f29,[%l5]
set D,%l5
st2 %f30,[%l5]
call print; nop
set D,%l3
set .L33,%l2
ld2 [%l2],%f30
st2 %f30,[%l3]
ld2 [%l3],%f30
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
set c,%l2
mov %l3,%l1
stb %l1,[%l2]
set s,%l2
mov %l3,%l1
sth %l1,[%l2]
set i,%l2
st %l3,[%l2]
set l,%l2
st %l3,[%l2]
set .L37,%l3
ld2 [%l3],%f28
fcmped %f30,%f28; nop; fbul .L35; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
set 0x80000000,%l2
add %l3,%l2,%l5
ba .L36; nop
.L35:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
mov %l3,%l5
.L36:
set C,%l3
mov %l5,%l2
stb %l2,[%l3]
set D,%l3
ld2 [%l3],%f30
set .L37,%l3
ld2 [%l3],%f28
fcmped %f30,%f28; nop; fbul .L39; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
set 0x80000000,%l2
add %l3,%l2,%l4
ba .L40; nop
.L39:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
mov %l3,%l4
.L40:
set S,%l3
mov %l4,%l2
sth %l2,[%l3]
set D,%l3
ld2 [%l3],%f30
set .L37,%l3
ld2 [%l3],%f28
fcmped %f30,%f28; nop; fbul .L42; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
set 0x80000000,%l2
add %l3,%l2,%l3
st %l3,[%fp+-4]
ba .L43; nop
.L42:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
st %l3,[%fp+-4]
.L43:
set I,%l3
ld [%fp+-4],%l2
st %l2,[%l3]
set D,%l3
ld2 [%l3],%f30
set .L37,%l3
ld2 [%l3],%f28
fcmped %f30,%f28; nop; fbul .L45; nop
fsubd %f30,%f28,%f28
fdtoi %f28,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
set 0x80000000,%l2
add %l3,%l2,%l3
st %l3,[%fp+-8]
ba .L46; nop
.L45:
fdtoi %f30,%f0; st %f0,[%sp+64]; ld [%sp+64],%l3
st %l3,[%fp+-8]
.L46:
set L,%l3
ld [%fp+-8],%l2
st %l2,[%l3]
set D,%l3
ld2 [%l3],%f30
set f,%l3
fdtos %f30,%f29
st %f29,[%l3]
set d,%l3
st2 %f30,[%l3]
call print; nop
set p,%l3
st %g0,[%l3]
st %g0,[%l3]
st %g0,[%l3]
st %g0,[%l3]
set P,%l2
ld [%l2],%l1
st %l1,[%l3]
mov %g0,%l1
st %l1,[%l2]
st %l1,[%l2]
st %l1,[%l2]
st %l1,[%l2]
ld [%l3],%l3
st %l3,[%l2]
mov %g0,%i0
.L3:
ret; restore
.type main,#function
.size main,.-main
.section ".bss"
.global P
.type P,#object
.size P,4
.common P,4,4
.global p
.type p,#object
.size p,4
.common p,4,4
.global D
.type D,#object
.size D,8
.common D,8,8
.global d
.type d,#object
.size d,8
.common d,8,8
.global f
.type f,#object
.size f,4
.common f,4,4
.global L
.type L,#object
.size L,4
.common L,4,4
.global I
.type I,#object
.size I,4
.common I,4,4
.global S
.type S,#object
.size S,2
.common S,2,2
.global C
.type C,#object
.size C,1
.common C,1,1
.global l
.type l,#object
.size l,4
.common l,4,4
.global i
.type i,#object
.size i,4
.common i,4,4
.global s
.type s,#object
.size s,2
.common s,2,2
.global c
.type c,#object
.size c,1
.common c,1,1
.section ".rodata"
.align 8
.L37:
.word 0x41e00000
.word 0x0
.align 8
.L33:
.word 0x40260000
.word 0x0
.align 8
.L23:
.word 0x41e00000
.word 0x0
.align 8
.L19:
.word 0x40240000
.word 0x0
.align 4
.L9:
.word 0x4f000000
.align 4
.L5:
.word 0x41100000
.align 8
.L4:
.word 0x40000000
.word 0x0
.align 1
.L2:
.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

View 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

View 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

View file

@ -0,0 +1,309 @@
.section ".data"
.global x
.type x,#object
.size x,16
.align 4
x:
.word 0x1
.byte 0x2
.skip 3
.byte 0x0
.byte 0x34
.skip 2
.byte 0xa
.byte 0x6
.skip 2
.global i
.type i,#object
.size i,4
.align 4
i:
.word 0x10
.global y
.type y,#object
.size y,8
.align 4
y:
.byte 0xe0
.skip 3
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x9
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
set .L4,%o0
set x,%i5
ld [%i5],%o1
set x+4,%i5
ldsb [%i5],%o2
set x+8,%i5
ld [%i5],%i5
sra %i5,20,%o3
set x+8,%i5
ld [%i5],%i5
sll %i5,12,%i5
sra %i5,28,%o4
set x+12,%i5
ld [%i5],%i5
sll %i5,4,%i5
sra %i5,29,%o5
set x+13,%i5
ldsb [%i5],%i5
st %i5,[%sp+4*6+68]
call printf; nop
set .L10,%o0
set y,%i5
ld [%i5],%i5
srl %i5,30,%i4
set 3,%i3
and %i4,%i3,%o1
srl %i5,26,%i5
set 15,%i4
and %i5,%i4,%o2
set y+4,%i5
ld [%i5],%o3
call printf; nop
set x+8,%i5
ld [%i5],%i4
set 0xfff0ffff,%i3
and %i4,%i3,%i4
set i,%i3
ld [%i3],%i3
sll %i3,28,%i3
sra %i3,28,%i3
sll %i3,16,%i3
set 0xf0000,%i2
and %i3,%i2,%i3
or %i4,%i3,%i4
st %i4,[%i5]
set x+12,%i5
ld [%i5],%i4
set 0xf1ffffff,%i3
and %i4,%i3,%i4
st %i4,[%i5]
set .L4,%o0
set x,%i5
ld [%i5],%o1
set x+4,%i5
ldsb [%i5],%o2
set x+8,%i5
ld [%i5],%i5
sra %i5,20,%o3
set x+8,%i5
ld [%i5],%i5
sll %i5,12,%i5
sra %i5,28,%o4
set x+12,%i5
ld [%i5],%i5
sll %i5,4,%i5
sra %i5,29,%o5
set x+13,%i5
ldsb [%i5],%i5
st %i5,[%sp+4*6+68]
call printf; nop
set y,%i5
ld [%i5],%i4
set 0x3fffffff,%i3
and %i4,%i3,%i4
set 0x80000000,%i3
or %i4,%i3,%i4
st %i4,[%i5]
set y+4,%i5
set i,%i4
ld [%i4],%i4
st %i4,[%i5]
set .L10,%o0
set y,%i5
ld [%i5],%i5
srl %i5,30,%i4
set 3,%i3
and %i4,%i3,%o1
srl %i5,26,%i5
set 15,%i4
and %i5,%i4,%o2
set y+4,%i5
ld [%i5],%o3
call printf; nop
set x,%o0
call f2; nop
mov %g0,%i0
.L3:
ret; restore
.type main,#function
.size main,.-main
.global f1
.align 4
f1:
save %sp,-96,%sp
ld [%i0],%i5
set 0xc3ffffff,%i4
and %i5,%i4,%i5
st %i5,[%i0]
ld [%i0],%i5
set 0x3fffffff,%i4
and %i5,%i4,%i5
set 3,%i4
and %g0,%i4,%i4
sll %i4,30,%i4
set 0xc0000000,%i3
and %i4,%i3,%i4
or %i5,%i4,%i5
st %i5,[%i0]
ld [%i0],%i5
set 0x3c000000,%i4
and %i5,%i4,%i5
cmp %i5,%g0; be .L22; nop
set .L24,%o0
call printf; nop
.L22:
ld [%i0],%i5
set 0xc0000000,%i4
or %i5,%i4,%i5
st %i5,[%i0]
ld [%i0],%i5
set 0x3c000000,%i4
or %i5,%i4,%i5
st %i5,[%i0]
set .L25,%o0
ld [%i0],%i5
srl %i5,30,%i4
set 3,%i3
and %i4,%i3,%o1
srl %i5,26,%i5
set 15,%i4
and %i5,%i4,%o2
call printf; nop
mov %g0,%i0
.L21:
ret; restore
.type f1,#function
.size f1,.-f1
.global f2
.align 4
f2:
save %sp,-96,%sp
set i,%i4
ld [%i4],%i4
cmp %i4,0; bne .L28; nop
set 1,%i5
ba .L29; nop
.L28:
mov %g0,%i5
.L29:
ld [%i0],%i4
set 0x3fffffff,%i3
and %i4,%i3,%i4
mov %i5,%i3
set 3,%i2
and %i3,%i2,%i3
sll %i3,30,%i3
set 0xc0000000,%i2
and %i3,%i2,%i3
or %i4,%i3,%i4
st %i4,[%i0]
mov %i0,%o0
call f1; nop
ld [%i0],%i4
set 0xc3ffffff,%i3
and %i4,%i3,%i4
mov %g0,%i3
set 15,%i2
and %i3,%i2,%i3
sll %i3,26,%i3
set 0x3c000000,%i2
and %i3,%i2,%i3
or %i4,%i3,%i4
st %i4,[%i0]
mov %g0,%i0
.L26:
ret; restore
.type f2,#function
.size f2,.-f2
.section ".rodata"
.align 1
.L25:
.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
.L24:
.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
.L10:
.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
.L4:
.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

View 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

View file

@ -0,0 +1,260 @@
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
mov %g0,%o0
call exit; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global nested
.align 4
nested:
cmp %o0,4; bge .L6; nop
cmp %o1,114; be .L9; nop
.L6:
cmp %o0,1; bne .L8; nop
cmp %o1,104; be .L9; nop
cmp %o1,105; be .L9; nop
.L8:
cmp %o0,2; bne .L3; nop
cmp %o1,111; be .L9; nop
cmp %o1,121; bne .L3; nop
.L9:
mov %o1,%o0
.L3:
mov %g0,%o0
.L2:
retl; nop
.type nested,#function
.size nested,.-nested
.global s
.align 4
s:
.L10:
retl; nop
.type s,#function
.size s,.-s
.section ".data"
.global Dy
.type Dy,#object
.size Dy,8
.align 4
Dy:
.word 0x0
.skip 4
.global Dz
.type Dz,#object
.size Dz,8
.align 4
Dz:
.word 0x1
.skip 4
.global Dfunc
.section ".text"
.align 4
Dfunc:
save %sp,-96,%sp
ret; restore
.type Dfunc,#function
.size Dfunc,.-Dfunc
.global f
.align 4
f:
retl; nop
.type f,#function
.size f,.-f
.global f1
.align 4
f1:
retl; nop
.type f1,#function
.size f1,.-f1
.global f2
.align 4
f2:
save %sp,-96,%sp
ret; restore
.type f2,#function
.size f2,.-f2
.global g
.align 4
g:
save %sp,-96,%sp
ret; restore
.type g,#function
.size g,.-g
.global h
.align 4
h:
save %sp,-96,%sp
ret; restore
.type h,#function
.size h,.-h
.global h1
.align 4
h1:
save %sp,-96,%sp
ret; restore
.type h1,#function
.size h1,.-h1
.global h2
.align 4
h2:
retl; nop
.type h2,#function
.size h2,.-h2
.section ".data"
.type .21,#object
.size .21,4
.align 4
.21:
.word 0x1
.global set1
.section ".text"
.align 4
set1:
retl; nop
.type set1,#function
.size set1,.-set1
.section ".data"
.type .23,#object
.size .23,4
.align 4
.23:
.word 0x2
.global set2
.section ".text"
.align 4
set2:
retl; nop
.type set2,#function
.size set2,.-set2
.align 4
goo:
retl; nop
.type goo,#function
.size goo,.-goo
.global sss
.align 4
sss:
retl; nop
.type sss,#function
.size sss,.-sss
.section ".bss"
.type .27,#object
.size .27,4
.local .27
.common .27,4,4
.global rrr
.section ".text"
.align 4
rrr:
retl; nop
.type rrr,#function
.size rrr,.-rrr
.global setstatic
.align 4
setstatic:
retl; nop
.type setstatic,#function
.size setstatic,.-setstatic
.global gx1
.align 4
gx1:
save %sp,-96,%sp
st %r24,[%fp+68]
st %r25,[%fp+72]
ret; restore
.type gx1,#function
.size gx1,.-gx1
.global ff1
.align 4
ff1:
save %sp,-96,%sp
st %r24,[%fp+68]
st %r25,[%fp+72]
ret; restore
.type ff1,#function
.size ff1,.-ff1
.global gg1
.align 4
gg1:
retl; nop
.type gg1,#function
.size gg1,.-gg1
.global hh1
.align 4
hh1:
retl; nop
.type hh1,#function
.size hh1,.-hh1
.global cmp
.align 4
cmp:
save %sp,-96,%sp
ret; restore
.type cmp,#function
.size cmp,.-cmp
.global sort
.align 4
sort:
save %sp,-96,%sp
ret; restore
.type sort,#function
.size sort,.-sort
.global onearg
.align 4
onearg:
save %sp,-96,%sp
ret; restore
.type onearg,#function
.size onearg,.-onearg
.section ".bss"
.global ss4
.type ss4,#object
.size ss4,4
.common ss4,4,4
.type ss2,#object
.size ss2,4
.local ss2
.common ss2,4,4
.type ss5,#object
.size ss5,4
.local ss5
.common ss5,4,4
.global ss3
.type ss3,#object
.size ss3,4
.common ss3,4,4
.type ss1,#object
.size ss1,4
.local ss1
.common ss1,4,4
.type yy,#object
.size yy,4
.local yy
.common yy,4,4
.global z
.type z,#object
.size z,4
.common z,4,4
.global y
.type y,#object
.size y,4
.common y,4,4
.global x
.type x,#object
.size x,4
.common x,4,4
.global b
.type b,#object
.size b,4
.common b,4,4
.global a
.type a,#object
.size a,4
.common a,4,4

View 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

View file

@ -0,0 +1,107 @@
.global main
.section ".text"
.align 4
main:
mov %g0,%o0
.L1:
retl; nop
.type main,#function
.size main,.-main
.global memchar
.align 4
memchar:
save %sp,-104,%sp
ld [%fp+-8],%i5
add %i5,1,%i4
st %i4,[%fp+-8]
ldsb [%i5],%i5
stb %i5,[%fp+-1]
ld [%fp+-8],%i5
add %i5,1,%i5
st %i5,[%fp+-8]
ldsb [%i5],%i5
stb %i5,[%fp+-1]
ld [%fp+-8],%i5
add %i5,-1,%i4
st %i4,[%fp+-8]
ldsb [%i5],%i5
stb %i5,[%fp+-1]
ld [%fp+-8],%i5
add %i5,-1,%i5
st %i5,[%fp+-8]
ldsb [%i5],%i5
stb %i5,[%fp+-1]
mov %g0,%i0
.L2:
ret; restore
.type memchar,#function
.size memchar,.-memchar
.global memint
.align 4
memint:
save %sp,-104,%sp
ld [%fp+-8],%i5
add %i5,4,%i4
st %i4,[%fp+-8]
ld [%i5],%i5
st %i5,[%fp+-4]
ld [%fp+-8],%i5
add %i5,4,%i5
st %i5,[%fp+-8]
ld [%i5],%i5
st %i5,[%fp+-4]
ld [%fp+-8],%i5
add %i5,-4,%i4
st %i4,[%fp+-8]
ld [%i5],%i5
st %i5,[%fp+-4]
ld [%fp+-8],%i5
add %i5,-4,%i5
st %i5,[%fp+-8]
ld [%i5],%i5
st %i5,[%fp+-4]
mov %g0,%i0
.L3:
ret; restore
.type memint,#function
.size memint,.-memint
.global regchar
.align 4
regchar:
mov %o4,%o3
add %o3,1,%o4
ldsb [%o3],%o5
add %o4,1,%o3
mov %o3,%o4
ldsb [%o3],%o5
mov %o4,%o3
add %o3,-1,%o4
ldsb [%o3],%o5
add %o4,-1,%o3
mov %o3,%o4
ldsb [%o3],%o5
mov %g0,%o0
.L4:
retl; nop
.type regchar,#function
.size regchar,.-regchar
.global regint
.align 4
regint:
mov %o4,%o3
add %o3,4,%o4
ld [%o3],%o5
add %o4,4,%o3
mov %o3,%o4
ld [%o3],%o5
mov %o4,%o3
add %o3,-4,%o4
ld [%o3],%o5
add %o4,-4,%o3
mov %o3,%o4
ld [%o3],%o5
mov %g0,%o0
.L5:
retl; nop
.type regint,#function
.size regint,.-regint

View 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

View 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

View file

@ -0,0 +1,277 @@
.section ".data"
.global words
.type words,#object
.align 4
words:
.word 0x1
.word 0x2
.word 0x3
.byte 105
.byte 102
.byte 0
.skip 3
.skip 2
.word 0x4
.word 0x5
.skip 4
.byte 102
.byte 111
.byte 114
.skip 3
.skip 2
.word 0x6
.word 0x7
.word 0x8
.byte 101
.byte 108
.byte 115
.byte 101
.byte 0
.skip 1
.skip 2
.word 0x9
.word 0xa
.word 0xb
.byte 119
.byte 104
.byte 105
.byte 108
.byte 101
.skip 1
.skip 2
.word 0x0
.skip 8
.skip 8
.size words,100
.global wordlist
.type wordlist,#object
.size wordlist,4
.align 4
wordlist:
.word words
.global x
.type x,#object
.align 4
x:
.word 0x1
.word 0x2
.word 0x3
.word 0x4
.word 0x0
.word 0x5
.word 0x6
.skip 12
.word 0x7
.skip 16
.size x,60
.global y
.type y,#object
.align 4
y:
.word x
.word x+20
.word x+40
.word 0x0
.size y,16
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
mov %g0,%i4
ba .L8; nop
.L5:
mov %g0,%i5
ba .L12; nop
.L9:
set .L13,%o0
sll %i5,2,%i3
sll %i4,2,%i2
set y,%i1
ld [%i2+%i1],%i2
ld [%i3+%i2],%o1
call printf; nop
.L10:
add %i5,1,%i5
.L12:
sll %i5,2,%i3
sll %i4,2,%i2
set y,%i1
ld [%i2+%i1],%i2
ld [%i3+%i2],%i3
cmp %i3,0; bne .L9; nop
set .L14,%o0
call printf; nop
.L6:
add %i4,1,%i4
.L8:
sll %i4,2,%i3
set y,%i2
ld [%i3+%i2],%i3
cmp %i3,%g0; bne .L5; nop
call f; nop
set wordlist,%i3
ld [%i3],%o0
call g; nop
mov %g0,%i0
.L4:
ret; restore
.type main,#function
.size main,.-main
.section ".data"
.type .16,#object
.align 4
.16:
.word .L17
.word .L18
.word .L19
.word .L20
.word 0x0
.size .16,20
.global f
.section ".text"
.align 4
f:
save %sp,-96,%sp
set .16,%i5
ba .L24; nop
.L21:
set .L25,%o0
ld [%i5],%o1
call printf; nop
.L22:
add %i5,4,%i5
.L24:
ld [%i5],%i4
cmp %i4,%g0; bne .L21; nop
mov %g0,%i0
.L15:
ret; restore
.type f,#function
.size f,.-f
.global g
.align 4
g:
save %sp,-96,%sp
ba .L30; nop
.L27:
mov %g0,%i5
ba .L34; nop
.L31:
set .L35,%o0
sll %i5,2,%i4
ld [%i4+%i0],%o1
call printf; nop
.L32:
add %i5,1,%i5
.L34:
mov %i5,%i4
set 3,%i3
cmp %i4,%i3; blu .L31; nop
set .L25,%o0
add %i0,12,%o1
call printf; nop
.L28:
add %i0,20,%i0
.L30:
ld [%i0],%i4
cmp %i4,0; bne .L27; nop
call h; nop
mov %g0,%i0
.L26:
ret; restore
.type g,#function
.size g,.-g
.global h
.align 4
h:
save %sp,-96,%sp
mov %g0,%i5
ba .L40; nop
.L37:
set .L41,%o0
smul %i5,20,%i4
set words,%i3
ld [%i4+%i3],%o1
set words+4,%i3
ld [%i4+%i3],%o2
set words+8,%i3
ld [%i4+%i3],%o3
set words+12,%i3
add %i4,%i3,%o4
call printf; nop
.L38:
add %i5,1,%i5
.L40:
mov %i5,%i4
set 5,%i3
cmp %i4,%i3; blu .L37; nop
mov %g0,%i0
.L36:
ret; restore
.type h,#function
.size h,.-h
.section ".rodata"
.align 1
.L41:
.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
.L35:
.byte 37
.byte 100
.byte 32
.byte 0
.align 1
.L25:
.byte 37
.byte 115
.byte 10
.byte 0
.align 1
.L20:
.byte 119
.byte 104
.byte 105
.byte 108
.byte 101
.byte 0
.align 1
.L19:
.byte 101
.byte 108
.byte 115
.byte 101
.byte 0
.align 1
.L18:
.byte 102
.byte 111
.byte 114
.byte 0
.align 1
.L17:
.byte 105
.byte 102
.byte 0
.align 1
.L14:
.byte 10
.byte 0
.align 1
.L13:
.byte 32
.byte 37
.byte 100
.byte 0

View 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

View file

@ -0,0 +1,384 @@
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
set .L2,%o0
set 255,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L3,%o0
set 65535,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L4,%o0
set 0xffffffff,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L5,%o0
set 0xffffffff,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L6,%o0
set 127,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L7,%o0
set 127,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L8,%o0
set 32767,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L9,%o0
set 2147483647,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L10,%o0
set 2147483647,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L11,%o0
set -128,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L12,%o0
set -128,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L13,%o0
set -32768,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L14,%o0
set -2147483648,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
set .L15,%o0
set -2147483648,%i5
mov %i5,%o1
mov %i5,%o2
call printf; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.section ".rodata"
.align 1
.L15:
.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
.L14:
.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
.L13:
.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
.L12:
.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
.L11:
.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
.L10:
.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
.L9:
.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
.L8:
.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
.L7:
.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
.L6:
.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
.L5:
.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
.L4:
.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
.L3:
.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
.L2:
.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

View file

@ -0,0 +1,178 @@
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 .
Diagnosis resumes after milestone Number 30 Page: 5
Subtraction appears to be normalized, as it should be.
Checking for guard digit in *, /, and -.
*, /, and - appear to have guard digits, as they should.
Diagnosis resumes after milestone Number 40 Page: 6
Checking rounding on multiply, divide and add/subtract.
Multiplication appears to round correctly.
Division appears to round correctly.
Addition/Subtraction appears to round correctly.
Checking for sticky bit.
Sticky bit apparently used correctly.
Does Multiplication commute? Testing on 20 random pairs.
No failures found in 20 integer pairs.
Running test of square root(x).
Testing if sqrt(X * X) == X for 20 Integers X.
Test for sqrt monotonicity.
sqrt has passed a test for Monotonicity.
Testing whether sqrt is rounded or chopped.
Square root appears to be correctly rounded.
Diagnosis resumes after milestone Number 90 Page: 7
Testing powers Z^i for small Integers Z and i.
... no discrepancis found.
Seeking Underflow thresholds UfThold and E0.
Smallest strictly positive number found is E0 = 4.94066e-324 .
Since comparison denies Z = 0, evaluating (Z + Z) / Z should be safe.
What the machine gets for (Z + Z) / Z is 2.00000000000000000e+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 = -Infinity .
Seems O.K.
Overflow threshold is V = 1.79769313486231571e+308 .
Overflow saturates at V0 = Infinity .
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 ... Infinity .
Trying to compute 0 / 0 produces ... NaN .
Diagnosis resumes after milestone Number 220 Page: 10
No failures, defects nor flaws have been discovered.
Rounding appears to conform to the proposed IEEE standard P754.
The arithmetic diagnosed appears to be Excellent!
END OF TEST.

View 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

File diff suppressed because it is too large Load diff

View 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

View 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

View file

@ -0,0 +1,202 @@
.section ".data"
.global in
.type in,#object
.align 4
in:
.word 0xa
.word 0x20
.word 0xffffffff
.word 0x237
.word 0x3
.word 0x12
.word 0x1
.word 0xffffffcd
.word 0x315
.word 0x0
.size in,40
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
set in,%o0
set 10,%o1
call sort; nop
mov %g0,%i5
ba .L5; nop
.L2:
sll %i5,2,%i4
set in,%i3
ld [%i4+%i3],%o0
call putd; nop
set 10,%o0
call putchar; nop
.L3:
add %i5,1,%i5
.L5:
mov %i5,%i4
set 10,%i3
cmp %i4,%i3; blu .L2; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global putd
.align 4
putd:
save %sp,-96,%sp
cmp %i0,0; bge .L7; nop
set 45,%o0
call putchar; nop
neg %i0,%i0
.L7:
sra %i0,31,%g1; wr %g0,%g1,%y; nop; nop; nop; sdiv %i0,10,%i5
cmp %i5,0; be .L9; nop
sra %i0,31,%g1; wr %g0,%g1,%y; nop; nop; nop; sdiv %i0,10,%o0
call putd; nop
.L9:
sra %i0,31,%g1; wr %g0,%g1,%y; nop; nop; nop; sdiv %i0,10,%g1
; smul %g1,10,%g1; sub %i0,%g1,%i5
add %i5,48,%o0
call putchar; nop
mov %g0,%i0
.L6:
ret; restore
.type putd,#function
.size putd,.-putd
.global sort
.align 4
sort:
save %sp,-96,%sp
set xx,%i5
st %i0,[%i5]
mov %i0,%o0
mov %g0,%o1
sub %i1,1,%i5
mov %i5,%i1
mov %i5,%o2
call quick; nop
mov %g0,%i0
.L11:
ret; restore
.type sort,#function
.size sort,.-sort
.global quick
.align 4
quick:
save %sp,-96,%sp
cmp %i1,%i2; bl .L13; nop
ba .L12; nop
.L13:
mov %i0,%o0
mov %i1,%o1
mov %i2,%o2
call partition; nop
mov %o0,%i5
mov %i0,%o0
mov %i1,%o1
sub %i5,1,%o2
call quick; nop
mov %i0,%o0
add %i5,1,%o1
mov %i2,%o2
call quick; nop
mov %g0,%i0
.L12:
ret; restore
.type quick,#function
.size quick,.-quick
.global partition
.align 4
partition:
save %sp,-96,%sp
add %i2,1,%i2
mov %i1,%i4
sll %i4,2,%i3
ld [%i3+%i0],%i5
ba .L17; nop
.L16:
add %i1,1,%i1
ba .L20; nop
.L19:
add %i1,1,%i1
.L20:
sll %i1,2,%i3
ld [%i3+%i0],%i3
cmp %i3,%i5; bl .L19; nop
sub %i2,1,%i2
ba .L23; nop
.L22:
sub %i2,1,%i2
.L23:
sll %i2,2,%i3
ld [%i3+%i0],%i3
cmp %i3,%i5; bg .L22; nop
cmp %i1,%i2; bge .L25; nop
sll %i1,2,%i3
add %i3,%i0,%o0
sll %i2,2,%i3
add %i3,%i0,%o1
call exchange; nop
.L25:
.L17:
cmp %i1,%i2; bl .L16; nop
sll %i4,2,%i3
add %i3,%i0,%o0
sll %i2,2,%i3
add %i3,%i0,%o1
call exchange; nop
mov %i2,%i0
.L15:
ret; restore
.type partition,#function
.size partition,.-partition
.global exchange
.align 4
exchange:
save %sp,-96,%sp
set .L28,%o0
set xx,%i4
ld [%i4],%i4
mov %i0,%i3
sub %i3,%i4,%i3
sra %i3,31,%g1; wr %g0,%g1,%y; nop; nop; nop; sdiv %i3,4,%o1
mov %i1,%i3
sub %i3,%i4,%i4
sra %i4,31,%g1; wr %g0,%g1,%y; nop; nop; nop; sdiv %i4,4,%o2
call printf; nop
ld [%i0],%i5
ld [%i1],%i4
st %i4,[%i0]
st %i5,[%i1]
mov %g0,%i0
.L27:
ret; restore
.type exchange,#function
.size exchange,.-exchange
.section ".bss"
.global xx
.type xx,#object
.size xx,4
.common xx,4,4
.section ".rodata"
.align 1
.L28:
.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

View 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

View file

@ -0,0 +1,207 @@
.global main
.section ".text"
.align 4
main:
mov %g0,%o0
.L1:
retl; nop
.type main,#function
.size main,.-main
.global f
.align 4
f:
save %sp,-96,%sp
call f; nop
mov %o0,%i5
call f; nop
add %i5,%o0,%i0
mov %g0,%i0
.L2:
ret; restore
.type f,#function
.size f,.-f
.global f2
.align 4
f2:
save %sp,-96,%sp
call f; nop
mov %o0,%i4
cmp %i0,0; be .L5; nop
call f; nop
mov %o0,%i3
mov %i3,%i5
ba .L6; nop
.L5:
set 1,%i5
.L6:
add %i4,%i5,%i0
mov %g0,%i0
.L3:
ret; restore
.type f2,#function
.size f2,.-f2
.global f3
.align 4
f3:
save %sp,-104,%sp
mov %g0,%i5
mov %g0,%i4
mov %g0,%i3
mov %g0,%i2
mov %g0,%l7
mov %g0,%l6
mov %g0,%l5
mov %g0,%l4
st %g0,[%fp+-4]
st %g0,[%fp+-8]
mov %i1,%l3
add %l3,4,%i1
cmp %i0,0; be .L9; nop
call f; nop
mov %o0,%l2
st %l2,[%fp+-12]
ba .L10; nop
.L9:
st %g0,[%fp+-12]
.L10:
ld [%fp+-12],%l2
st %l2,[%l3]
mov %g0,%i0
.L7:
ret; restore
.type f3,#function
.size f3,.-f3
.global f4
.align 4
f4:
save %sp,-96,%sp
mov %g0,%i5
mov %g0,%i4
mov %g0,%i3
mov %g0,%i2
mov %g0,%i1
mov %g0,%i0
set i,%l6
ld [%l6],%l6
sll %l6,3,%l5
set a,%l4
add %l5,%l4,%l4
ld2 [%l4],%f30
set b,%l4
add %l5,%l4,%l5
ld2 [%l5],%f28
set .L15,%l5
ld2 [%l5],%f26
faddd %f30,%f28,%f24
fcmped %f24,%f26; nop; fbue .L13; nop
cmp %l6,0; be .L13; nop
fsubd %f30,%f28,%f30
fcmped %f30,%f26; nop; fbue .L13; nop
set 1,%l7
ba .L14; nop
.L13:
mov %g0,%l7
.L14:
set i,%l6
st %l7,[%l6]
mov %g0,%i0
.L11:
ret; restore
.type f4,#function
.size f4,.-f4
.global f5
.align 4
f5:
save %sp,-96,%sp
set x,%i5
set k,%i4
ld [%i4],%i4
set m,%i3
ld [%i3],%i3
set A,%i2
ld [%i2],%i2
smul %i3,%i4,%i1
sll %i1,3,%i1
add %i1,%i2,%i1
set j,%i0
ld [%i0],%i0
smul %i3,%i0,%i3
sll %i3,3,%i3
add %i3,%i2,%i3
set n,%i2
ld [%i2],%i2
set B,%l7
ld [%l7],%l7
smul %i2,%i4,%i4
sll %i4,3,%i4
add %i4,%l7,%i4
smul %i2,%i0,%i2
sll %i2,3,%i2
add %i2,%l7,%i2
ld2 [%i1],%f30
ld2 [%i3],%f28
fmuld %f30,%f28,%f30
ld2 [%i4],%f28
ld2 [%i2],%f26
fmuld %f28,%f26,%f28
faddd %f30,%f28,%f30
st2 %f30,[%i5]
ld2 [%i1],%f30
ld2 [%i2],%f28
fmuld %f30,%f28,%f30
ld2 [%i4],%f28
ld2 [%i3],%f26
fmuld %f28,%f26,%f28
fsubd %f30,%f28,%f30
st2 %f30,[%i5]
mov %g0,%i0
.L16:
ret; restore
.type f5,#function
.size f5,.-f5
.section ".bss"
.global x
.type x,#object
.size x,8
.common x,8,8
.global B
.type B,#object
.size B,4
.common B,4,4
.global A
.type A,#object
.size A,4
.common A,4,4
.global n
.type n,#object
.size n,4
.common n,4,4
.global m
.type m,#object
.size m,4
.common m,4,4
.global k
.type k,#object
.size k,4
.common k,4,4
.global j
.type j,#object
.size j,4
.common j,4,4
.global i
.type i,#object
.size i,4
.common i,4,4
.global b
.type b,#object
.size b,80
.common b,80,8
.global a
.type a,#object
.size a,80
.common a,80,8
.section ".rodata"
.align 8
.L15:
.word 0x0
.word 0x0

View 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}

View file

@ -0,0 +1 @@
tst/stdarg.c:51: warning: missing return value

View file

@ -0,0 +1,376 @@
.section ".data"
.global x
.type x,#object
.size x,16
.align 4
x:
.word 0x1
.word 0x2
.word 0x3
.word 0x4
.global main
.section ".text"
.align 4
main:
save %sp,-192,%sp
set .L2,%o0
call print; nop
set .L3,%o0
set .L4,%o1
call print; nop
set .L5,%o0
set 3,%o1
set 10,%o2
call print; nop
set .L6,%o0
set .L7,%o1
set .L8,%o2
set 4,%o3
set 10,%o4
call print; nop
set .L9,%o0
set .L7,%o1
set .L8,%o2
set .L10,%i5
ld2 [%i5],%f30
st %f30,[%sp+4*3+68]
st %f31,[%sp+4*4+68]
ld [%sp+4*3+68],%o3
ld [%sp+4*4+68],%o4
set 10,%o5
call print; nop
set .L11,%o0
set x,%i5
add -16,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -16,%fp,%o1
add -32,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -32,%fp,%o2
add -48,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -48,%fp,%o3
add -64,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -64,%fp,%o4
add -80,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -80,%fp,%o5
add -96,%fp,%i4
ld [%r29+0],%r1
ld [%r29+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r29+8],%r1
ld [%r29+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -96,%fp,%i5
st %i5,[%sp+4*6+68]
call print; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global print
.align 4
print:
save %sp,-112,%sp
st %i1,[%fp+72]
st %i2,[%fp+76]
st %i3,[%fp+80]
st %i4,[%fp+84]
st %i5,[%fp+88]
st %i0,[%fp+68]
add 72,%fp,%i5
ba .L18; nop
.L15:
ld [%fp+68],%i4
ldsb [%i4],%i4
cmp %i4,37; bne .L19; nop
ld [%fp+68],%i3
add %i3,1,%i3
st %i3,[%fp+68]
ldsb [%i3],%i4
cmp %i4,115; be .L35; nop
cmp %i4,115; bg .L40; nop
.L39:
cmp %i4,98; bl .L21; nop
cmp %i4,102; bg .L21; nop
sll %i4,2,%i3
set .L41-392,%i2
ld [%i3+%i2],%i3
jmp %i3; nop
.section ".rodata"
.align 4
.L41:
.word .L24
.word .L29
.word .L31
.word .L21
.word .L37
.section ".text"
.L40:
cmp %i4,119; be .L33; nop
ba .L21; nop
.L24:
add %i5,4,%i3
mov %i3,%i5
add -16,%fp,%i2
ld [%i3+-4],%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r26+0]
st %r2,[%r26+4]
ld [%r27+8],%r1
ld [%r27+12],%r2
st %r1,[%r26+8]
st %r2,[%r26+12]
set .L25,%o0
ld [%fp+-16],%o1
ld [%fp+-12],%o2
ld [%fp+-8],%o3
ld [%fp+-4],%o4
call printf; nop
ba .L20; nop
.L29:
set .L30,%o0
add %i5,4,%i3
mov %i3,%i5
ldsb [%i3+-1],%o1
call printf; nop
ba .L20; nop
.L31:
set .L32,%o0
set 4,%i3
add %i5,%i3,%i3
mov %i3,%i5
ld [%i3+-4],%o1
call printf; nop
ba .L20; nop
.L33:
set .L34,%o0
add %i5,4,%i3
mov %i3,%i5
ldsh [%i3+-2],%o1
call printf; nop
ba .L20; nop
.L35:
set .L36,%o0
set 4,%i3
add %i5,%i3,%i3
mov %i3,%i5
ld [%i3+-4],%o1
call printf; nop
ba .L20; nop
.L37:
set .L38,%o0
set 8,%i3
add %i5,%i3,%i3
mov %i3,%i5
ld2 [%i3+-8],%f30
st %f30,[%sp+4*1+68]
st %f31,[%sp+4*2+68]
ld [%sp+4*1+68],%o1
ld [%sp+4*2+68],%o2
call printf; nop
ba .L20; nop
.L21:
set .L30,%o0
ld [%fp+68],%i3
ldsb [%i3],%o1
call printf; nop
ba .L20; nop
.L19:
set .L30,%o0
ld [%fp+68],%i3
ldsb [%i3],%o1
call printf; nop
.L20:
.L16:
ld [%fp+68],%i3
add %i3,1,%i3
st %i3,[%fp+68]
.L18:
ld [%fp+68],%i3
ldsb [%i3],%i3
cmp %i3,0; bne .L15; nop
mov %g0,%i0
.L12:
ret; restore
.type print,#function
.size print,.-print
.section ".rodata"
.align 1
.L38:
.byte 37
.byte 102
.byte 0
.align 1
.L36:
.byte 37
.byte 115
.byte 0
.align 1
.L34:
.byte 37
.byte 120
.byte 0
.align 1
.L32:
.byte 37
.byte 100
.byte 0
.align 1
.L30:
.byte 37
.byte 99
.byte 0
.align 1
.L25:
.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
.L11:
.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 8
.L10:
.word 0x40140000
.word 0x0
.align 1
.L9:
.byte 37
.byte 115
.byte 37
.byte 115
.byte 32
.byte 37
.byte 102
.byte 37
.byte 99
.byte 0
.align 1
.L8:
.byte 115
.byte 116
.byte 0
.align 1
.L7:
.byte 116
.byte 101
.byte 0
.align 1
.L6:
.byte 37
.byte 115
.byte 37
.byte 115
.byte 32
.byte 37
.byte 119
.byte 37
.byte 99
.byte 0
.align 1
.L5:
.byte 116
.byte 101
.byte 115
.byte 116
.byte 32
.byte 37
.byte 100
.byte 37
.byte 99
.byte 0
.align 1
.L4:
.byte 50
.byte 0
.align 1
.L3:
.byte 116
.byte 101
.byte 115
.byte 116
.byte 32
.byte 37
.byte 115
.byte 10
.byte 0
.align 1
.L2:
.byte 116
.byte 101
.byte 115
.byte 116
.byte 32
.byte 49
.byte 10
.byte 0

View 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

View file

@ -0,0 +1,2 @@
tst/struct.c:49: warning: missing return value
tst/struct.c:68: warning: missing return value

View file

@ -0,0 +1,377 @@
.global addpoint
.section ".text"
.align 4
addpoint:
save %sp,-96,%sp
ld [%i0],%i5
ld [%i1],%i4
add %i5,%i4,%i5
st %i5,[%i0]
add %i0,4,%i5
ld [%i5],%i4
ld [%i1+4],%i3
add %i4,%i3,%i4
st %i4,[%i5]
ld [%fp+64],%i5
ld [%r24+0],%r1
ld [%r24+4],%r2
st %r1,[%r29+0]
st %r2,[%r29+4]
.L1:
jmp %i7+12; restore
.type addpoint,#function
.size addpoint,.-addpoint
.global canonrect
.align 4
canonrect:
save %sp,-112,%sp
ld [%i0],%i3
ld [%i0+8],%i2
cmp %i3,%i2; bge .L6; nop
ld [%i0],%i5
ba .L7; nop
.L6:
ld [%i0+8],%i5
.L7:
st %i5,[%fp+-16]
ld [%i0+4],%i3
ld [%i0+12],%i2
cmp %i3,%i2; bge .L10; nop
ld [%i0+4],%i4
ba .L11; nop
.L10:
ld [%i0+12],%i4
.L11:
st %i4,[%fp+-12]
ld [%i0],%i2
ld [%i0+8],%i1
cmp %i2,%i1; ble .L14; nop
ld [%i0],%i3
ba .L15; nop
.L14:
ld [%i0+8],%i3
.L15:
st %i3,[%fp+-8]
ld [%i0+4],%i1
ld [%i0+12],%l7
cmp %i1,%l7; ble .L19; nop
ld [%i0+4],%i2
ba .L20; nop
.L19:
ld [%i0+12],%i2
.L20:
st %i2,[%fp+-4]
ld [%fp+64],%i1
add -16,%fp,%l7
ld [%r23+0],%r1
ld [%r23+4],%r2
st %r1,[%r25+0]
st %r2,[%r25+4]
ld [%r23+8],%r1
ld [%r23+12],%r2
st %r1,[%r25+8]
st %r2,[%r25+12]
.L3:
jmp %i7+12; restore
.type canonrect,#function
.size canonrect,.-canonrect
.global makepoint
.align 4
makepoint:
save %sp,-104,%sp
st %i0,[%fp+-8]
st %i1,[%fp+-4]
ld [%fp+64],%i5
add -8,%fp,%i4
ld [%r28+0],%r1
ld [%r28+4],%r2
st %r1,[%r29+0]
st %r2,[%r29+4]
.L21:
jmp %i7+12; restore
.type makepoint,#function
.size makepoint,.-makepoint
.global makerect
.align 4
makerect:
save %sp,-128,%sp
add -16,%fp,%i5
ld [%r24+0],%r1
ld [%r24+4],%r2
st %r1,[%r29+0]
st %r2,[%r29+4]
add -8,%fp,%i5
ld [%r25+0],%r1
ld [%r25+4],%r2
st %r1,[%r29+0]
st %r2,[%r29+4]
add -32,%fp,%i5
add -16,%fp,%i4
ld [%r28+0],%r1
ld [%r28+4],%r2
st %r1,[%r29+0]
st %r2,[%r29+4]
ld [%r28+8],%r1
ld [%r28+12],%r2
st %r1,[%r29+8]
st %r2,[%r29+12]
add -32,%fp,%o0
ld [%fp+64],%i5
call canonrect; st %i5,[%sp+64]; unimp 16&0xfff
.L24:
jmp %i7+12; restore
.type makerect,#function
.size makerect,.-makerect
.global ptinrect
.align 4
ptinrect:
ld [%o0],%o4
ld [%o1],%o3
cmp %o4,%o3; bl .L29; nop
ld [%o1+8],%o3
cmp %o4,%o3; bge .L29; nop
ld [%o0+4],%o4
ld [%o1+4],%o3
cmp %o4,%o3; bl .L29; nop
ld [%o1+12],%o3
cmp %o4,%o3; bge .L29; nop
set 1,%o5
ba .L30; nop
.L29:
mov %g0,%o5
.L30:
mov %o5,%o0
.L27:
retl; nop
.type ptinrect,#function
.size ptinrect,.-ptinrect
.section ".data"
.global y
.type y,#object
.size y,3
.align 1
y:
.byte 97
.byte 98
.byte 0
.global odd
.section ".text"
.align 4
odd:
save %sp,-96,%sp
add -3,%fp,%i5
ldub [%r24+0],%r1
ldub [%r24+1],%r2
stb %r1,[%r29+0]
stb %r2,[%r29+1]
ldub [%r24+2],%r1
stb %r1,[%r29+2]
set .L32,%o0
add -3,%fp,%o1
call printf; nop
mov %g0,%i0
.L31:
ret; restore
.type odd,#function
.size odd,.-odd
.section ".rodata"
.align 4
.L34:
.word 0x0
.word 0x0
.align 4
.L35:
.word 0x140
.word 0x140
.align 4
.L36:
.word 0xffffffff
.word 0xffffffff
.word 0x1
.word 0x1
.word 0x14
.word 0x12c
.word 0x1f4
.word 0x190
.global main
.section ".text"
.align 4
main:
save %sp,-240,%sp
add -64,%fp,%i4
set .L34,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
add -72,%fp,%i4
set .L35,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
add -32,%fp,%i4
set .L36,%i3
add %r27,32,%r27
add %r28,32,%r3
1: dec 8,%r3
ld [%r27+-8],%r1
ld [%r27+-4],%r2
st %r1,[%r3+0]
st %r2,[%r3+4]
cmp %r3,%r28; bgt 1b; dec 8,%r27
set -10,%i4
mov %i4,%o0
mov %i4,%o1
add -80,%fp,%i4
call makepoint; st %i4,[%sp+64]; unimp 8&0xfff
add -88,%fp,%i4
add -72,%fp,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
add -88,%fp,%o0
add -80,%fp,%o1
add -96,%fp,%i4
call addpoint; st %i4,[%sp+64]; unimp 8&0xfff
set 10,%i4
mov %i4,%o0
mov %i4,%o1
add -104,%fp,%i4
call makepoint; st %i4,[%sp+64]; unimp 8&0xfff
add -112,%fp,%i4
add -64,%fp,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
add -112,%fp,%o0
add -104,%fp,%o1
add -120,%fp,%i4
call addpoint; st %i4,[%sp+64]; unimp 8&0xfff
add -96,%fp,%o0
add -120,%fp,%o1
add -48,%fp,%i4
call makerect; st %i4,[%sp+64]; unimp 16&0xfff
mov %g0,%i5
ba .L40; nop
.L37:
sll %i5,3,%i4
add -32,%fp,%i3
ld [%i4+%i3],%o0
add -28,%fp,%i3
ld [%i4+%i3],%o1
add -56,%fp,%i4
call makepoint; st %i4,[%sp+64]; unimp 8&0xfff
set .L41,%o0
sll %i5,3,%i4
add -32,%fp,%i3
ld [%i4+%i3],%o1
ld [%fp+-52],%o2
call printf; nop
add -128,%fp,%i4
add -56,%fp,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
add -128,%fp,%o0
add -144,%fp,%i4
add -48,%fp,%i3
ld [%r27+0],%r1
ld [%r27+4],%r2
st %r1,[%r28+0]
st %r2,[%r28+4]
ld [%r27+8],%r1
ld [%r27+12],%r2
st %r1,[%r28+8]
st %r2,[%r28+12]
add -144,%fp,%o1
call ptinrect; nop
cmp %o0,0; bne .L44; nop
set .L46,%o0
call printf; nop
.L44:
set .L47,%o0
ld [%fp+-48],%o1
ld [%fp+-44],%o2
ld [%fp+-40],%o3
ld [%fp+-36],%o4
call printf; nop
.L38:
add %i5,1,%i5
.L40:
mov %i5,%i4
set 4,%i3
cmp %i4,%i3; blu .L37; nop
add -123,%fp,%i4
set y,%i3
ldub [%r27+0],%r1
ldub [%r27+1],%r2
stb %r1,[%r28+0]
stb %r2,[%r28+1]
ldub [%r27+2],%r1
stb %r1,[%r28+2]
add -123,%fp,%o0
call odd; nop
mov %g0,%o0
call exit; nop
mov %g0,%i0
.L33:
ret; restore
.type main,#function
.size main,.-main
.section ".rodata"
.align 1
.L47:
.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
.L46:
.byte 110
.byte 111
.byte 116
.byte 32
.byte 0
.align 1
.L41:
.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
.L32:
.byte 37
.byte 115
.byte 10
.byte 0

View 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

View 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

View file

@ -0,0 +1,713 @@
.global main
.section ".text"
.align 4
main:
save %sp,-96,%sp
set .L6,%i5
ba .L5; nop
.L2:
ldsb [%i5],%o0
call backslash; nop
mov %o0,%i3
set .L7,%o0
ldsb [%i5],%o1
mov %i3,%o2
call printf; nop
.L3:
add %i5,1,%i5
.L5:
ldsb [%i5],%i3
cmp %i3,0; bne .L2; nop
call f; nop
call g; nop
call h; nop
set 16777216,%i4
ba .L11; nop
.L8:
mov %i4,%o0
call big; nop
.L9:
set 16777216,%i3
add %i4,%i3,%i4
.L11:
set 117440512,%i3
and %i4,%i3,%i3
cmp %i3,0; bne .L8; nop
call limit; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global backslash
.align 4
backslash:
cmp %o0,102; be .L16; nop
cmp %o0,102; bg .L22; nop
.L21:
cmp %o0,98; be .L15; nop
ba .L13; nop
.L22:
cmp %o0,110; be .L17; nop
cmp %o0,110; bl .L13; nop
.L23:
cmp %o0,114; be .L18; nop
cmp %o0,116; be .L19; nop
cmp %o0,118; be .L20; nop
ba .L13; nop
.L15:
set 8,%o0
ba .L12; nop
.L16:
set 12,%o0
ba .L12; nop
.L17:
set 10,%o0
ba .L12; nop
.L18:
set 13,%o0
ba .L12; nop
.L19:
set 9,%o0
ba .L12; nop
.L20:
set 11,%o0
ba .L12; nop
.L13:
.L12:
retl; nop
.type backslash,#function
.size backslash,.-backslash
.global f
.align 4
f:
save %sp,-96,%sp
mov %g0,%i4
set .L25,%o0
call printf; nop
mov %g0,%i5
.L26:
mov %i5,%i3
cmp %i5,1; bl .L30; nop
cmp %i5,20; bg .L30; nop
sll %i5,2,%i2
set .L42-4,%i1
ld [%i2+%i1],%i2
jmp %i2; nop
.section ".rodata"
.align 4
.L42:
.word .L32
.word .L33
.word .L30
.word .L30
.word .L30
.word .L30
.word .L34
.word .L35
.word .L36
.word .L30
.word .L30
.word .L30
.word .L30
.word .L30
.word .L30
.word .L37
.word .L38
.word .L39
.word .L40
.word .L41
.section ".text"
.L32:
mov %i5,%i4
ba .L31; nop
.L33:
mov %i5,%i4
ba .L31; nop
.L34:
mov %i5,%i4
ba .L31; nop
.L35:
mov %i5,%i4
ba .L31; nop
.L36:
mov %i5,%i4
ba .L31; nop
.L37:
mov %i5,%i4
ba .L31; nop
.L38:
mov %i5,%i4
ba .L31; nop
.L39:
mov %i5,%i4
ba .L31; nop
.L40:
mov %i5,%i4
ba .L31; nop
.L41:
mov %i5,%i4
.L30:
.L31:
set .L44,%o0
mov %i4,%o1
call printf; nop
.L27:
add %i5,1,%i5
cmp %i5,20; ble .L26; nop
mov %g0,%i0
.L24:
ret; restore
.type f,#function
.size f,.-f
.global g
.align 4
g:
save %sp,-96,%sp
set .L46,%o0
call printf; nop
set 1,%i5
.L47:
cmp %i5,1001; bl .L64; nop
cmp %i5,1004; bg .L65; nop
sll %i5,2,%i4
set .L66-4004,%i3
ld [%i4+%i3],%i4
jmp %i4; nop
.section ".rodata"
.align 4
.L66:
.word .L60
.word .L60
.word .L60
.word .L60
.section ".text"
.L64:
cmp %i5,1; bl .L51; nop
cmp %i5,8; bg .L51; nop
sll %i5,2,%i4
set .L68-4,%i3
ld [%i4+%i3],%i4
jmp %i4; nop
.section ".rodata"
.align 4
.L68:
.word .L53
.word .L53
.word .L55
.word .L55
.word .L55
.word .L57
.word .L57
.word .L57
.section ".text"
.L65:
cmp %i5,3001; bl .L51; nop
cmp %i5,3004; bg .L51; nop
sll %i5,2,%i4
set .L70-12004,%i3
ld [%i4+%i3],%i4
jmp %i4; nop
.section ".rodata"
.align 4
.L70:
.word .L62
.word .L62
.word .L62
.word .L62
.section ".text"
.L53:
set .L54,%o0
mov %i5,%o1
call printf; nop
ba .L52; nop
.L55:
set .L56,%o0
mov %i5,%o1
call printf; nop
ba .L52; nop
.L57:
set .L58,%o0
mov %i5,%o1
call printf; nop
.L51:
set .L59,%o0
mov %i5,%o1
call printf; nop
ba .L52; nop
.L60:
set .L61,%o0
mov %i5,%o1
call printf; nop
ba .L52; nop
.L62:
set .L63,%o0
mov %i5,%o1
call printf; nop
.L52:
.L48:
add %i5,1,%i5
cmp %i5,10; ble .L47; nop
mov %g0,%i0
.L45:
ret; restore
.type g,#function
.size g,.-g
.global h
.align 4
h:
save %sp,-96,%sp
mov %g0,%i4
set .L73,%o0
call printf; nop
set 1,%i5
.L74:
cmp %i5,264; be .L86; nop
cmp %i5,264; bg .L94; nop
.L93:
cmp %i5,120; be .L84; nop
cmp %i5,120; bg .L96; nop
.L95:
cmp %i5,8; be .L83; nop
cmp %i5,8; bl .L78; nop
.L97:
cmp %i5,16; be .L82; nop
ba .L78; nop
.L96:
cmp %i5,128; be .L80; nop
cmp %i5,128; bl .L78; nop
.L98:
cmp %i5,248; be .L87; nop
ba .L78; nop
.L94:
cmp %i5,288; be .L91; nop
cmp %i5,288; bg .L100; nop
.L99:
cmp %i5,272; be .L88; nop
cmp %i5,272; bl .L78; nop
.L101:
cmp %i5,280; be .L85; nop
ba .L78; nop
.L100:
cmp %i5,304; be .L89; nop
cmp %i5,304; bg .L103; nop
.L102:
cmp %i5,296; be .L90; nop
ba .L78; nop
.L103:
cmp %i5,312; be .L92; nop
ba .L78; nop
.L78:
add %i4,1,%i4
ba .L75; nop
.L80:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L82:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L83:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L84:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L85:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L86:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L87:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L88:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L89:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L90:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L91:
set .L81,%o0
mov %i5,%o1
call printf; nop
ba .L79; nop
.L92:
set .L81,%o0
mov %i5,%o1
call printf; nop
.L79:
.L75:
add %i5,1,%i5
cmp %i5,500; ble .L74; nop
set .L104,%o0
mov %i4,%o1
call printf; nop
mov %g0,%i0
.L72:
ret; restore
.type h,#function
.size h,.-h
.global big
.align 4
big:
save %sp,-96,%sp
set 0x6000000,%i4
and %i0,%i4,%i5
set 33554432,%i3
cmp %i5,%i3; be .L111; nop
cmp %i5,%i3; bg .L115; nop
.L114:
cmp %i5,-2; be .L109; nop
cmp %i5,-1; be .L109; nop
cmp %i5,0; be .L109; nop
ba .L106; nop
.L115:
mov %i5,%i4
set 67108864,%i3
cmp %i4,%i3; be .L112; nop
ba .L106; nop
.L109:
set .L110,%o0
mov %i0,%o1
call printf; nop
ba .L107; nop
.L111:
set .L110,%o0
mov %i0,%o1
call printf; nop
ba .L107; nop
.L112:
set .L110,%o0
mov %i0,%o1
call printf; nop
ba .L107; nop
.L106:
set .L113,%o0
mov %i0,%o1
call printf; nop
.L107:
mov %g0,%i0
.L105:
ret; restore
.type big,#function
.size big,.-big
.global limit
.align 4
limit:
save %sp,-96,%sp
set -2147483648,%i5
.L117:
set -2147483648,%i4
cmp %i5,%i4; bl .L121; nop
set -2147483644,%i3
cmp %i5,%i3; bg .L121; nop
sll %i5,2,%i3
sll %i4,2,%i4
sub %i3,%i4,%i4
set .L134,%i3
ld [%i4+%i3],%i4
jmp %i4; nop
.section ".rodata"
.align 4
.L134:
.word .L123
.word .L125
.word .L127
.word .L129
.word .L131
.section ".text"
.L123:
set .L124,%o0
call printf; nop
ba .L122; nop
.L125:
set .L126,%o0
call printf; nop
ba .L122; nop
.L127:
set .L128,%o0
call printf; nop
ba .L122; nop
.L129:
set .L130,%o0
call printf; nop
ba .L122; nop
.L131:
set .L132,%o0
call printf; nop
ba .L122; nop
.L121:
set .L133,%o0
call printf; nop
.L122:
.L118:
add %i5,1,%i5
set -2147483643,%i4
cmp %i5,%i4; ble .L117; nop
set 2147483647,%i5
.L135:
set 2147483643,%i4
cmp %i5,%i4; bl .L139; nop
set 2147483647,%i3
cmp %i5,%i3; bg .L139; nop
sll %i5,2,%i3
sll %i4,2,%i4
sub %i3,%i4,%i4
set .L146,%i3
ld [%i4+%i3],%i4
jmp %i4; nop
.section ".rodata"
.align 4
.L146:
.word .L145
.word .L144
.word .L143
.word .L142
.word .L141
.section ".text"
.L141:
set .L124,%o0
call printf; nop
ba .L140; nop
.L142:
set .L126,%o0
call printf; nop
ba .L140; nop
.L143:
set .L128,%o0
call printf; nop
ba .L140; nop
.L144:
set .L130,%o0
call printf; nop
ba .L140; nop
.L145:
set .L132,%o0
call printf; nop
ba .L140; nop
.L139:
set .L133,%o0
call printf; nop
.L140:
.L136:
sub %i5,1,%i5
set 2147483642,%i4
cmp %i5,%i4; bge .L135; nop
mov %g0,%i0
.L116:
ret; restore
.type limit,#function
.size limit,.-limit
.section ".rodata"
.align 1
.L133:
.byte 53
.byte 10
.byte 0
.align 1
.L132:
.byte 52
.byte 10
.byte 0
.align 1
.L130:
.byte 51
.byte 10
.byte 0
.align 1
.L128:
.byte 50
.byte 10
.byte 0
.align 1
.L126:
.byte 49
.byte 10
.byte 0
.align 1
.L124:
.byte 48
.byte 10
.byte 0
.align 1
.L113:
.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
.L110:
.byte 120
.byte 32
.byte 61
.byte 32
.byte 48
.byte 120
.byte 37
.byte 120
.byte 10
.byte 0
.align 1
.L104:
.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
.L81:
.byte 105
.byte 32
.byte 61
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L73:
.byte 104
.byte 58
.byte 10
.byte 0
.align 1
.L63:
.byte 54
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L61:
.byte 53
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L59:
.byte 100
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L58:
.byte 51
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L56:
.byte 50
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L54:
.byte 49
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L46:
.byte 103
.byte 58
.byte 10
.byte 0
.align 1
.L44:
.byte 120
.byte 32
.byte 61
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 1
.L25:
.byte 102
.byte 58
.byte 10
.byte 0
.align 1
.L7:
.byte 37
.byte 99
.byte 32
.byte 61
.byte 32
.byte 48
.byte 120
.byte 37
.byte 120
.byte 10
.byte 0
.align 1
.L6:
.byte 98
.byte 102
.byte 110
.byte 114
.byte 116
.byte 118
.byte 120
.byte 0

View 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

View file

@ -0,0 +1,2 @@
tst/wf1.c:29: warning: missing return value
tst/wf1.c:87: warning: missing return value

View file

@ -0,0 +1,311 @@
.global main
.section ".text"
.align 4
main:
save %sp,-120,%sp
st %g0,[%fp+-24]
set next,%i5
st %g0,[%i5]
ba .L3; nop
.L2:
add -20,%fp,%o0
add -24,%fp,%o1
call lookup; nop
ld [%o0],%i4
add %i4,1,%i4
st %i4,[%o0]
.L3:
add -20,%fp,%o0
call getword; nop
cmp %o0,0; bne .L2; nop
ld [%fp+-24],%o0
call tprint; nop
mov %g0,%i0
.L1:
ret; restore
.type main,#function
.size main,.-main
.global err
.align 4
err:
save %sp,-96,%sp
set .L6,%o0
mov %i0,%o1
call printf; nop
set 1,%o0
call exit; nop
mov %g0,%i0
.L5:
ret; restore
.type err,#function
.size err,.-err
.global getword
.align 4
getword:
save %sp,-96,%sp
.L8:
.L9:
call getchar; nop
mov %o0,%i3
mov %i3,%i5
cmp %i3,-1; be .L11; nop
mov %i5,%o0
call isletter; nop
cmp %o0,0; be .L8; nop
.L11:
mov %i0,%i4
ba .L15; nop
.L12:
mov %i4,%i3
add %i3,1,%i4
mov %i5,%i2
stb %i2,[%i3]
.L13:
call getchar; nop
mov %o0,%i5
.L15:
mov %i5,%o0
call isletter; nop
mov %o0,%i5
cmp %o0,0; bne .L12; nop
stb %g0,[%i4]
mov %i4,%i3
mov %i0,%i2
cmp %i3,%i2; bleu .L16; nop
set 1,%i0
ba .L7; nop
.L16:
mov %g0,%i0
.L7:
ret; restore
.type getword,#function
.size getword,.-getword
.global isletter
.align 4
isletter:
cmp %o0,65; bl .L19; nop
cmp %o0,90; bg .L19; nop
add %o0,32,%o0
.L19:
cmp %o0,97; bl .L21; nop
cmp %o0,122; bg .L21; nop
ba .L18; nop
.L21:
mov %g0,%o0
.L18:
retl; nop
.type isletter,#function
.size isletter,.-isletter
.global lookup
.align 4
lookup:
save %sp,-96,%sp
ld [%i1],%i4
cmp %i4,%g0; be .L24; nop
mov %i0,%o0
ld [%i1],%i4
ld [%i4+12],%o1
call strcmp; nop
mov %o0,%i5
cmp %i5,0; bge .L26; nop
mov %i0,%o0
ld [%i1],%i4
add %i4,4,%o1
call lookup; nop
mov %o0,%i0
ba .L23; nop
.L26:
cmp %i5,0; ble .L28; nop
mov %i0,%o0
ld [%i1],%i4
add %i4,8,%o1
call lookup; nop
mov %o0,%i0
ba .L23; nop
.L28:
ld [%i1],%i0
ba .L23; nop
.L24:
set next,%i4
ld [%i4],%i4
cmp %i4,2000; bl .L30; nop
set .L32,%o0
call err; nop
.L30:
set next,%i4
ld [%i4],%i4
sll %i4,4,%i4
set words,%i3
st %g0,[%i4+%i3]
set next,%i4
ld [%i4],%i4
sll %i4,4,%i4
set words+8,%i2
st %g0,[%i4+%i2]
set words+4,%i2
st %g0,[%i4+%i2]
mov %i0,%o0
call strlen; nop
mov %o0,%i4
add %i4,1,%o0
call malloc; nop
set next,%i3
ld [%i3],%i3
sll %i3,4,%i3
set words+12,%i2
st %o0,[%i3+%i2]
set next,%i4
ld [%i4],%i4
sll %i4,4,%i4
set words+12,%i3
ld [%i4+%i3],%i4
cmp %i4,%g0; bne .L36; nop
set .L39,%o0
call err; nop
.L36:
set next,%i4
ld [%i4],%i4
sll %i4,4,%i4
set words+12,%i3
ld [%i4+%i3],%o0
mov %i0,%o1
call strcpy; nop
set next,%i4
ld [%i4],%i3
add %i3,1,%i2
st %i2,[%i4]
sll %i3,4,%i4
set words,%i3
add %i4,%i3,%i4
st %i4,[%i1]
mov %i4,%i0
.L23:
ret; restore
.type lookup,#function
.size lookup,.-lookup
.global tprint
.align 4
tprint:
save %sp,-96,%sp
mov %i0,%i5
cmp %i5,%g0; be .L42; nop
ld [%i0+4],%o0
call tprint; nop
set .L44,%o0
ld [%i0],%o1
ld [%i0+12],%o2
call printf; nop
ld [%i0+8],%o0
call tprint; nop
.L42:
mov %g0,%i0
.L41:
ret; restore
.type tprint,#function
.size tprint,.-tprint
.global strcmp
.align 4
strcmp:
save %sp,-96,%sp
ba .L47; nop
.L46:
mov %i0,%i5
add %i5,1,%i0
ldsb [%i5],%i5
cmp %i5,0; bne .L49; nop
mov %g0,%i0
ba .L45; nop
.L49:
add %i1,1,%i1
.L47:
ldsb [%i0],%i5
ldsb [%i1],%i4
cmp %i5,%i4; be .L46; nop
ldsb [%i0],%i5
cmp %i5,0; bne .L51; nop
set -1,%i0
ba .L45; nop
.L51:
ldsb [%i1],%i5
cmp %i5,0; bne .L53; nop
set 1,%i0
ba .L45; nop
.L53:
ldsb [%i0],%i5
ldsb [%i1],%i4
sub %i5,%i4,%i0
.L45:
ret; restore
.type strcmp,#function
.size strcmp,.-strcmp
.section ".bss"
.global next
.type next,#object
.size next,4
.common next,4,4
.global words
.type words,#object
.size words,32000
.common words,32000,4
.section ".rodata"
.align 1
.L44:
.byte 37
.byte 100
.byte 9
.byte 37
.byte 115
.byte 10
.byte 0
.align 1
.L39:
.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
.L32:
.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
.L6:
.byte 63
.byte 32
.byte 37
.byte 115
.byte 10
.byte 0

View file

@ -0,0 +1,10 @@
a
b
load
negate
push 5
c
load
multiply
add
store

View 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

File diff suppressed because it is too large Load diff