* 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,169 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
move $30,$0
L.2:
sll $24,$30,2
la $15,1
sw $15,down($24)
sw $15,up($24)
L.3:
la $30,1($30)
la $24,15
blt $30,$24,L.2
move $30,$0
L.6:
sll $24,$30,2
la $15,1
sw $15,rows($24)
L.7:
la $30,1($30)
la $24,8
blt $30,$24,L.6
move $4,$0
jal queens
move $2,$0
L.1:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end main
.globl queens
.text
.align 2
.ent queens
queens:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $30,$4
move $23,$0
L.11:
sll $15,$23,2
lw $15,rows($15)
beq $15,$0,L.15
subu $15,$23,$30
sll $15,$15,2
lw $15,up+28($15)
beq $15,$0,L.15
addu $15,$23,$30
sll $15,$15,2
lw $15,down($15)
beq $15,$0,L.15
addu $15,$23,$30
sll $15,$15,2
sw $0,down($15)
subu $15,$23,$30
sll $15,$15,2
sw $0,up+28($15)
sll $15,$23,2
sw $0,rows($15)
sll $24,$30,2
sw $23,x($24)
la $24,7
bne $30,$24,L.19
jal print
b L.20
L.19:
la $4,1($30)
jal queens
L.20:
la $24,1
addu $15,$23,$30
sll $15,$15,2
sw $24,down($15)
subu $15,$23,$30
sll $15,$15,2
sw $24,up+28($15)
sll $15,$23,2
sw $24,rows($15)
L.15:
L.12:
la $23,1($23)
la $24,8
blt $23,$24,L.11
move $2,$0
L.10:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end queens
.globl print
.text
.align 2
.ent print
print:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
move $30,$0
L.23:
la $4,L.27
sll $24,$30,2
lw $24,x($24)
la $5,49($24)
jal printf
L.24:
la $30,1($30)
la $24,8
blt $30,$24,L.23
la $4,L.28
jal printf
move $2,$0
L.22:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end print
.globl x
.comm x,32
.globl rows
.comm rows,32
.globl down
.comm down,60
.globl up
.comm up,60
.rdata
.align 0
L.28:
.byte 10
.byte 0
.align 0
L.27:
.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,235 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,88,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-88
.mask 0xc2c00000,-56
sw $22,16($sp)
sw $23,20($sp)
.cprestore 24
sw $30,28($sp)
sw $31,32($sp)
move $23,$0
L.2:
move $30,$0
L.6:
sll $24,$30,2
sll $15,$23,4
la $15,x($15)
addu $24,$24,$15
la $15,1000
mul $15,$15,$23
addu $15,$15,$30
sw $15,($24)
L.7:
la $30,1($30)
la $24,4
blt $30,$24,L.6
sll $24,$23,2
sll $15,$23,4
la $15,x($15)
sw $15,y($24)
L.3:
la $23,1($23)
la $24,3
blt $23,$24,L.2
jal f
move $23,$0
L.10:
sll $24,$23,4
la $15,-48+88($sp)
addu $24,$24,$15
move $22,$24
sll $15,$23,2
sw $24,y($15)
move $30,$0
L.14:
sll $24,$30,2
addu $15,$24,$22
sll $14,$23,4
la $14,x($14)
addu $24,$24,$14
lw $24,($24)
sw $24,($15)
L.15:
la $30,1($30)
la $24,4
blt $30,$24,L.14
L.11:
la $23,1($23)
la $24,3
blt $23,$24,L.10
la $4,-48+88($sp)
la $5,y
jal g
move $2,$0
L.1:
lw $22,16($sp)
lw $23,20($sp)
lw $25,24($sp)
lw $30,28($sp)
lw $31,32($sp)
addu $sp,$sp,88
j $31
.end main
.globl f
.text
.align 2
.ent f
f:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $23,$0
L.19:
move $30,$0
L.23:
la $4,L.27
sll $24,$30,2
sll $15,$23,4
la $15,x($15)
addu $24,$24,$15
lw $5,($24)
jal printf
L.24:
la $30,1($30)
la $24,4
blt $30,$24,L.23
L.20:
la $23,1($23)
la $24,3
blt $23,$24,L.19
la $4,L.28
jal printf
move $23,$0
L.29:
move $30,$0
L.33:
la $4,L.27
sll $24,$30,2
sll $15,$23,2
lw $15,y($15)
addu $24,$24,$15
lw $5,($24)
jal printf
L.34:
la $30,1($30)
la $24,4
blt $30,$24,L.33
L.30:
la $23,1($23)
la $24,3
blt $23,$24,L.29
la $4,L.28
jal printf
move $2,$0
L.18:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end f
.globl g
.text
.align 2
.ent g
g:
.frame $sp,40,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-40
.mask 0xc2e00000,-4
sw $21,16($sp)
sw $22,20($sp)
sw $23,24($sp)
.cprestore 28
sw $30,32($sp)
sw $31,36($sp)
move $30,$4
move $23,$5
move $21,$0
L.38:
move $22,$0
L.42:
la $4,L.27
sll $24,$22,2
sll $15,$21,4
addu $15,$15,$30
addu $24,$24,$15
lw $5,($24)
jal printf
L.43:
la $22,1($22)
la $24,4
blt $22,$24,L.42
L.39:
la $21,1($21)
la $24,3
blt $21,$24,L.38
la $4,L.28
jal printf
move $21,$0
L.46:
move $22,$0
L.50:
la $4,L.27
sll $24,$22,2
sll $15,$21,2
addu $15,$15,$23
lw $15,($15)
addu $24,$24,$15
lw $5,($24)
jal printf
L.51:
la $22,1($22)
la $24,4
blt $22,$24,L.50
L.47:
la $21,1($21)
la $24,3
blt $21,$24,L.46
la $4,L.28
jal printf
move $2,$0
L.37:
lw $21,16($sp)
lw $22,20($sp)
lw $23,24($sp)
lw $25,28($sp)
lw $30,32($sp)
lw $31,36($sp)
addu $sp,$sp,40
j $31
.end g
.globl y
.comm y,12
.globl x
.comm x,48
.rdata
.align 0
L.28:
.byte 10
.byte 0
.align 0
L.27:
.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,153 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,48,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-48
.fmask 0xc0000000,-32
.mask 0xc2c00000,-8
s.d $f30,16($sp)
sw $22,24($sp)
sw $23,28($sp)
.cprestore 32
sw $30,36($sp)
sw $31,40($sp)
sw $4,48($sp)
sw $5,52($sp)
lw $24,0+48($sp)
la $15,1
bgt $24,$15,L.2
l.s $f30,L.4
b L.3
L.2:
lw $24,4+48($sp)
lw $4,4($24)
jal atof
l.s $f16,L.5
div.s $f30,$f0,$f16
L.3:
move $30,$0
L.6:
move $24,$30
la $30,1($24)
sll $24,$24,2
l.s $f18,L.4
s.s $f18,f($24)
L.7:
la $24,127
ble $30,$24,L.6
move $23,$0
b L.11
L.10:
sll $24,$22,2
la $24,f($24)
l.s $f18,($24)
l.s $f16,L.13
add.s $f18,$f18,$f16
s.s $f18,($24)
la $23,1($23)
L.11:
jal getchar
move $22,$2
la $15,-1
bne $2,$15,L.10
la $4,L.14
jal printf
move $30,$0
L.15:
sll $24,$30,2
l.s $f18,f($24)
l.s $f16,L.4
c.eq.s $f18,$f16; bc1t L.19
mtc1 $23,$f16; cvt.s.w $f16,$f16
div.s $f18,$f18,$f16
c.lt.s $f18,$f30; bc1t L.19
la $24,32
bgt $30,$24,L.21
la $4,L.23
move $5,$30
jal printf
b L.22
L.21:
la $4,L.24
move $5,$30
jal printf
L.22:
la $4,L.25
l.s $f18,L.5
sll $24,$30,2
l.s $f16,f($24)
mul.s $f18,$f18,$f16
mtc1 $23,$f16; cvt.s.w $f16,$f16
div.s $f18,$f18,$f16
cvt.d.s $f18,$f18
mfc1.d $6,$f18
jal printf
L.19:
L.16:
la $30,1($30)
la $24,127
ble $30,$24,L.15
move $2,$0
L.1:
l.d $f30,16($sp)
lw $22,24($sp)
lw $23,28($sp)
lw $25,32($sp)
lw $30,36($sp)
lw $31,40($sp)
addu $sp,$sp,48
j $31
.end main
.globl f
.comm f,512
.rdata
.align 0
L.25:
.byte 9
.byte 37
.byte 46
.byte 49
.byte 102
.byte 10
.byte 0
.align 0
L.24:
.byte 37
.byte 99
.byte 0
.align 0
L.23:
.byte 37
.byte 48
.byte 51
.byte 111
.byte 0
.align 0
L.14:
.byte 99
.byte 104
.byte 97
.byte 114
.byte 9
.byte 102
.byte 114
.byte 101
.byte 113
.byte 10
.byte 0
.align 2
L.13:
.word 0x3f800000
.align 2
L.5:
.word 0x42c80000
.align 2
L.4:
.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,557 @@
.set reorder
.globl print
.text
.text
.align 2
.ent print
print:
.frame $sp,72,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-72
.mask 0x82000000,-4
.cprestore 64
sw $31,68($sp)
la $4,L.2
lb $5,c
lh $6,s
lw $7,i
lw $24,l
sw $24,16($sp)
lbu $24,C
sw $24,20($sp)
lhu $24,S
sw $24,24($sp)
lw $24,I
sw $24,28($sp)
lw $24,L
sw $24,32($sp)
l.s $f18,f
cvt.d.s $f18,$f18
s.d $f18,40($sp)
l.d $f18,d
s.d $f18,48($sp)
l.d $f18,D
s.d $f18,56($sp)
jal printf
L.1:
lw $25,64($sp)
lw $31,68($sp)
addu $sp,$sp,72
j $31
.end print
.globl main
.text
.align 2
.ent main
main:
.frame $sp,72,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-72
.mask 0xc2ff0000,-16
sw $16,16($sp)
sw $17,20($sp)
sw $18,24($sp)
sw $19,28($sp)
sw $20,32($sp)
sw $21,36($sp)
sw $22,40($sp)
sw $23,44($sp)
.cprestore 48
sw $30,52($sp)
sw $31,56($sp)
la $24,1
sb $24,c
lb $24,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
move $15,$24
move $14,$15
sb $14,C
move $14,$15
sh $14,S
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,2
sh $24,s
lh $24,s
move $15,$24
sb $15,c
sw $24,i
sw $24,l
move $15,$24
move $14,$15
sb $14,C
move $14,$15
sh $14,S
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,3
sw $24,i
lw $24,i
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,l
move $15,$24
move $14,$15
sb $14,C
move $14,$15
sh $14,S
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,4
sw $24,l
lw $24,l
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
move $15,$24
move $14,$15
sb $14,C
move $14,$15
sh $14,S
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,5
sb $24,C
lbu $24,C
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
move $15,$24
move $14,$15
sh $14,S
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,6
sh $24,S
lhu $24,S
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
move $15,$24
move $14,$15
sb $14,C
sw $15,I
sw $15,L
mtc1 $24,$f18; cvt.s.w $f18,$f18
s.s $f18,f
mtc1 $24,$f18; cvt.d.w $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
la $24,7
sw $24,I
lw $24,I
move $14,$24
sb $14,c
move $14,$24
sh $14,s
sw $24,i
sw $24,l
move $15,$24
sb $15,C
move $15,$24
sh $15,S
sw $24,L
l.d $f18,L.4
srl $15,$24,1
mtc1 $15,$f16; cvt.d.w $f16,$f16
mul.d $f18,$f18,$f16
and $24,$24,1
mtc1 $24,$f16; cvt.d.w $f16,$f16
add.d $f18,$f18,$f16
cvt.s.d $f16,$f18
s.s $f16,f
s.d $f18,d
s.d $f18,D
jal print
la $24,8
sw $24,L
lw $24,L
move $14,$24
sb $14,c
move $14,$24
sh $14,s
sw $24,i
sw $24,l
move $15,$24
sb $15,C
move $15,$24
sh $15,S
lhu $15,S
sw $15,I
l.d $f18,L.4
srl $15,$24,1
mtc1 $15,$f16; cvt.d.w $f16,$f16
mul.d $f18,$f18,$f16
and $24,$24,1
mtc1 $24,$f16; cvt.d.w $f16,$f16
add.d $f18,$f18,$f16
cvt.s.d $f16,$f18
s.s $f16,f
s.d $f18,d
s.d $f18,D
jal print
l.s $f18,L.5
s.s $f18,f
l.s $f18,f
trunc.w.s $f2,$f18,$24; mfc1 $24,$f2
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
l.s $f16,L.9
c.lt.s $f18,$f16; bc1t L.7
sub.s $f16,$f18,$f16
trunc.w.s $f2,$f16,$24; mfc1 $24,$f2
la $30,0x80000000($24)
b L.8
L.7:
trunc.w.s $f2,$f18,$24; mfc1 $24,$f2
move $30,$24
L.8:
move $24,$30
sb $24,C
l.s $f18,f
l.s $f16,L.9
c.lt.s $f18,$f16; bc1t L.11
sub.s $f16,$f18,$f16
trunc.w.s $f2,$f16,$24; mfc1 $24,$f2
la $23,0x80000000($24)
b L.12
L.11:
trunc.w.s $f2,$f18,$24; mfc1 $24,$f2
move $23,$24
L.12:
move $24,$23
sh $24,S
l.s $f18,f
l.s $f16,L.9
c.lt.s $f18,$f16; bc1t L.14
sub.s $f16,$f18,$f16
trunc.w.s $f2,$f16,$24; mfc1 $24,$f2
la $22,0x80000000($24)
b L.15
L.14:
trunc.w.s $f2,$f18,$24; mfc1 $24,$f2
move $22,$24
L.15:
sw $22,I
l.s $f18,f
l.s $f16,L.9
c.lt.s $f18,$f16; bc1t L.17
sub.s $f16,$f18,$f16
trunc.w.s $f2,$f16,$24; mfc1 $24,$f2
la $21,0x80000000($24)
b L.18
L.17:
trunc.w.s $f2,$f18,$24; mfc1 $24,$f2
move $21,$24
L.18:
sw $21,L
l.s $f18,f
cvt.d.s $f18,$f18
s.d $f18,d
s.d $f18,D
jal print
l.d $f18,L.19
s.d $f18,d
l.d $f18,d
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
l.d $f16,L.23
c.lt.d $f18,$f16; bc1t L.21
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $20,0x80000000($24)
b L.22
L.21:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $20,$24
L.22:
move $24,$20
sb $24,C
l.d $f18,d
l.d $f16,L.23
c.lt.d $f18,$f16; bc1t L.25
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $19,0x80000000($24)
b L.26
L.25:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $19,$24
L.26:
move $24,$19
sh $24,S
l.d $f18,d
l.d $f16,L.23
c.lt.d $f18,$f16; bc1t L.28
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $18,0x80000000($24)
b L.29
L.28:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $18,$24
L.29:
sw $18,I
l.d $f18,d
l.d $f16,L.23
c.lt.d $f18,$f16; bc1t L.31
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $17,0x80000000($24)
b L.32
L.31:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $17,$24
L.32:
sw $17,L
l.d $f18,d
cvt.s.d $f16,$f18
s.s $f16,f
s.d $f18,D
jal print
l.d $f18,L.33
s.d $f18,D
l.d $f18,D
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $15,$24
sb $15,c
move $15,$24
sh $15,s
sw $24,i
sw $24,l
l.d $f16,L.37
c.lt.d $f18,$f16; bc1t L.35
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $16,0x80000000($24)
b L.36
L.35:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
move $16,$24
L.36:
move $24,$16
sb $24,C
l.d $f18,D
l.d $f16,L.37
c.lt.d $f18,$f16; bc1t L.39
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $24,0x80000000($24)
sw $24,-4+72($sp)
b L.40
L.39:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
sw $24,-4+72($sp)
L.40:
lw $24,-4+72($sp)
sh $24,S
l.d $f18,D
l.d $f16,L.37
c.lt.d $f18,$f16; bc1t L.42
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $24,0x80000000($24)
sw $24,-8+72($sp)
b L.43
L.42:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
sw $24,-8+72($sp)
L.43:
lw $24,-8+72($sp)
sw $24,I
l.d $f18,D
l.d $f16,L.37
c.lt.d $f18,$f16; bc1t L.45
sub.d $f16,$f18,$f16
trunc.w.d $f2,$f16,$24; mfc1 $24,$f2
la $24,0x80000000($24)
sw $24,-12+72($sp)
b L.46
L.45:
trunc.w.d $f2,$f18,$24; mfc1 $24,$f2
sw $24,-12+72($sp)
L.46:
lw $24,-12+72($sp)
sw $24,L
l.d $f18,D
cvt.s.d $f16,$f18
s.s $f16,f
s.d $f18,d
jal print
sw $0,p
sw $0,p
sw $0,p
sw $0,p
lw $24,P
sw $24,p
sw $0,P
sw $0,P
sw $0,P
sw $0,P
lw $24,p
sw $24,P
move $2,$0
L.3:
lw $16,16($sp)
lw $17,20($sp)
lw $18,24($sp)
lw $19,28($sp)
lw $20,32($sp)
lw $21,36($sp)
lw $22,40($sp)
lw $23,44($sp)
lw $25,48($sp)
lw $30,52($sp)
lw $31,56($sp)
addu $sp,$sp,72
j $31
.end main
.globl P
.comm P,4
.globl p
.comm p,4
.globl D
.comm D,8
.globl d
.comm d,8
.globl f
.comm f,4
.globl L
.comm L,4
.globl I
.comm I,4
.globl S
.comm S,2
.globl C
.comm C,1
.globl l
.comm l,4
.globl i
.comm i,4
.globl s
.comm s,2
.globl c
.comm c,1
.rdata
.align 3
L.37:
.word 0x41e00000
.word 0x0
.align 3
L.33:
.word 0x40260000
.word 0x0
.align 3
L.23:
.word 0x41e00000
.word 0x0
.align 3
L.19:
.word 0x40240000
.word 0x0
.align 2
L.9:
.word 0x4f000000
.align 2
L.5:
.word 0x41100000
.align 3
L.4:
.word 0x40000000
.word 0x0
.align 0
L.2:
.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,304 @@
.set reorder
.globl x
.data
.align 2
x:
.word 0x1
.byte 0x2
.space 3
.byte 0x0
.byte 0x34
.space 2
.byte 0xa
.byte 0x6
.space 2
.globl i
.sdata
.align 2
i:
.word 0x10
.globl y
.sdata
.align 2
y:
.byte 0xe0
.space 3
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x9
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,40,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-40
.mask 0x82000000,-8
.cprestore 28
sw $31,32($sp)
la $4,L.4
lw $5,x
lb $6,x+4
lw $24,x+8
sra $7,$24,20
lw $24,x+8
sll $24,$24,12
sra $24,$24,28
sw $24,16($sp)
lw $24,x+12
sll $24,$24,4
sra $24,$24,29
sw $24,20($sp)
lb $24,x+13
sw $24,24($sp)
jal printf
la $4,L.10
lw $24,y
srl $15,$24,30
and $5,$15,3
srl $24,$24,26
and $6,$24,15
lw $7,y+4
jal printf
lw $24,x+8
and $24,$24,0xfff0ffff
lw $15,i
sll $15,$15,28
sra $15,$15,28
sll $15,$15,16
and $15,$15,0xf0000
or $24,$24,$15
sw $24,x+8
lw $24,x+12
and $24,$24,0xf1ffffff
sw $24,x+12
la $4,L.4
lw $5,x
lb $6,x+4
lw $24,x+8
sra $7,$24,20
lw $24,x+8
sll $24,$24,12
sra $24,$24,28
sw $24,16($sp)
lw $24,x+12
sll $24,$24,4
sra $24,$24,29
sw $24,20($sp)
lb $24,x+13
sw $24,24($sp)
jal printf
lw $24,y
and $24,$24,0x3fffffff
or $24,$24,0x80000000
sw $24,y
lw $24,i
sw $24,y+4
la $4,L.10
lw $24,y
srl $15,$24,30
and $5,$15,3
srl $24,$24,26
and $6,$24,15
lw $7,y+4
jal printf
la $4,x
jal f2
move $2,$0
L.3:
lw $25,28($sp)
lw $31,32($sp)
addu $sp,$sp,40
j $31
.end main
.globl f1
.text
.align 2
.ent f1
f1:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
move $30,$4
lw $24,($30)
and $24,$24,0xc3ffffff
sw $24,($30)
lw $24,($30)
and $24,$24,0x3fffffff
and $15,$0,3
sll $15,$15,30
and $15,$15,0xc0000000
or $24,$24,$15
sw $24,($30)
lw $24,($30)
and $24,$24,0x3c000000
beq $24,$0,L.22
la $4,L.24
jal printf
L.22:
lw $24,($30)
or $24,$24,0xc0000000
sw $24,($30)
lw $24,($30)
or $24,$24,0x3c000000
sw $24,($30)
la $4,L.25
lw $24,($30)
srl $15,$24,30
and $5,$15,3
srl $24,$24,26
and $6,$24,15
jal printf
move $2,$0
L.21:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end f1
.globl f2
.text
.align 2
.ent f2
f2:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $30,$4
lw $24,i
bne $24,$0,L.28
la $23,1
b L.29
L.28:
move $23,$0
L.29:
lw $24,($30)
and $24,$24,0x3fffffff
move $15,$23
and $15,$15,3
sll $15,$15,30
and $15,$15,0xc0000000
or $24,$24,$15
sw $24,($30)
move $4,$30
jal f1
lw $24,($30)
and $24,$24,0xc3ffffff
move $15,$0
and $15,$15,15
sll $15,$15,26
and $15,$15,0x3c000000
or $24,$24,$15
sw $24,($30)
move $2,$0
L.26:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end f2
.rdata
.align 0
L.25:
.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 0
L.24:
.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 0
L.10:
.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 0
L.4:
.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,416 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
move $4,$0
jal exit
move $2,$0
L.1:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end main
.globl nested
.text
.align 2
.ent nested
nested:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
la $24,4
bge $4,$24,L.6
la $24,114
beq $5,$24,L.9
L.6:
la $24,1
bne $4,$24,L.8
la $24,104
beq $5,$24,L.9
la $24,105
beq $5,$24,L.9
L.8:
la $24,2
bne $4,$24,L.3
la $24,111
beq $5,$24,L.9
la $24,121
bne $5,$24,L.3
L.9:
move $4,$5
L.3:
move $2,$0
L.2:
j $31
.end nested
.globl s
.text
.align 2
.ent s
s:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
L.10:
j $31
.end s
.globl Dy
.sdata
.align 2
Dy:
.word 0x0
.space 4
.globl Dz
.sdata
.align 2
Dz:
.word 0x1
.space 4
.globl Dfunc
.text
.text
.align 2
.ent Dfunc
Dfunc:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end Dfunc
.globl f
.text
.align 2
.ent f
f:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end f
.globl f1
.text
.align 2
.ent f1
f1:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end f1
.globl f2
.text
.align 2
.ent f2
f2:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
sw $5,28($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end f2
.globl g
.text
.align 2
.ent g
g:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end g
.globl h
.text
.align 2
.ent h
h:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end h
.globl h1
.text
.align 2
.ent h1
h1:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
sw $5,28($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end h1
.globl h2
.text
.align 2
.ent h2
h2:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end h2
.sdata
.align 2
L.21:
.word 0x1
.globl set1
.text
.text
.align 2
.ent set1
set1:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end set1
.sdata
.align 2
L.23:
.word 0x2
.globl set2
.text
.text
.align 2
.ent set2
set2:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end set2
.text
.align 2
.ent goo
goo:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end goo
.globl sss
.text
.align 2
.ent sss
sss:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end sss
.lcomm L.27,4
.globl rrr
.text
.text
.align 2
.ent rrr
rrr:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end rrr
.globl setstatic
.text
.align 2
.ent setstatic
setstatic:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end setstatic
.globl gx1
.text
.align 2
.ent gx1
gx1:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
s.d $f12,24($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end gx1
.globl ff1
.text
.align 2
.ent ff1
ff1:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end ff1
.globl gg1
.text
.align 2
.ent gg1
gg1:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end gg1
.globl hh1
.text
.align 2
.ent hh1
hh1:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
j $31
.end hh1
.globl cmp
.text
.align 2
.ent cmp
cmp:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
sw $5,28($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end cmp
.globl sort
.text
.align 2
.ent sort
sort:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end sort
.globl onearg
.text
.align 2
.ent onearg
onearg:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end onearg
.extern xr 4
.globl ss4
.comm ss4,4
.lcomm ss2,4
.lcomm ss5,4
.globl ss3
.comm ss3,4
.lcomm ss1,4
.lcomm yy,4
.globl z
.comm z,4
.globl y
.comm y,4
.globl x
.comm x,4
.globl b
.comm b,4
.globl a
.comm a,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,149 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
move $2,$0
L.1:
j $31
.end main
.globl memchar
.text
.align 2
.ent memchar
memchar:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
lw $24,-8+8($sp)
la $15,1($24)
sw $15,-8+8($sp)
lb $24,($24)
sb $24,-1+8($sp)
lw $24,-8+8($sp)
la $24,1($24)
sw $24,-8+8($sp)
lb $24,($24)
sb $24,-1+8($sp)
lw $24,-8+8($sp)
la $15,-1($24)
sw $15,-8+8($sp)
lb $24,($24)
sb $24,-1+8($sp)
lw $24,-8+8($sp)
la $24,-1($24)
sw $24,-8+8($sp)
lb $24,($24)
sb $24,-1+8($sp)
move $2,$0
L.2:
addu $sp,$sp,8
j $31
.end memchar
.globl memint
.text
.align 2
.ent memint
memint:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
lw $24,-8+8($sp)
la $15,4($24)
sw $15,-8+8($sp)
lw $24,($24)
sw $24,-4+8($sp)
lw $24,-8+8($sp)
la $24,4($24)
sw $24,-8+8($sp)
lw $24,($24)
sw $24,-4+8($sp)
lw $24,-8+8($sp)
la $15,-4($24)
sw $15,-8+8($sp)
lw $24,($24)
sw $24,-4+8($sp)
lw $24,-8+8($sp)
la $24,-4($24)
sw $24,-8+8($sp)
lw $24,($24)
sw $24,-4+8($sp)
move $2,$0
L.3:
addu $sp,$sp,8
j $31
.end memint
.globl regchar
.text
.align 2
.ent regchar
regchar:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
.mask 0x40800000,-4
sw $23,0($sp)
sw $30,4($sp)
move $24,$23
la $23,1($24)
lb $30,($24)
la $24,1($23)
move $23,$24
lb $30,($24)
move $24,$23
la $23,-1($24)
lb $30,($24)
la $24,-1($23)
move $23,$24
lb $30,($24)
move $2,$0
L.4:
lw $23,0($sp)
lw $30,4($sp)
addu $sp,$sp,8
j $31
.end regchar
.globl regint
.text
.align 2
.ent regint
regint:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
.mask 0x40800000,-4
sw $23,0($sp)
sw $30,4($sp)
move $24,$23
la $23,4($24)
lw $30,($24)
la $24,4($23)
move $23,$24
lw $30,($24)
move $24,$23
la $23,-4($24)
lw $30,($24)
la $24,-4($23)
move $23,$24
lw $30,($24)
move $2,$0
L.5:
lw $23,0($sp)
lw $30,4($sp)
addu $sp,$sp,8
j $31
.end 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,325 @@
.set reorder
.globl words
.data
.align 2
words:
.word 0x1
.word 0x2
.word 0x3
.byte 105
.byte 102
.byte 0
.space 3
.space 2
.word 0x4
.word 0x5
.space 4
.byte 102
.byte 111
.byte 114
.space 3
.space 2
.word 0x6
.word 0x7
.word 0x8
.byte 101
.byte 108
.byte 115
.byte 101
.byte 0
.space 1
.space 2
.word 0x9
.word 0xa
.word 0xb
.byte 119
.byte 104
.byte 105
.byte 108
.byte 101
.space 1
.space 2
.word 0x0
.space 8
.space 8
.globl wordlist
.sdata
.align 2
wordlist:
.word words
.globl x
.data
.align 2
x:
.word 0x1
.word 0x2
.word 0x3
.word 0x4
.word 0x0
.word 0x5
.word 0x6
.space 12
.word 0x7
.space 16
.globl y
.data
.align 2
y:
.word x
.word x+20
.word x+40
.word 0x0
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $23,$0
b L.8
L.5:
move $30,$0
b L.12
L.9:
la $4,L.13
sll $24,$30,2
sll $15,$23,2
lw $15,y($15)
addu $24,$24,$15
lw $5,($24)
jal printf
L.10:
la $30,1($30)
L.12:
sll $24,$30,2
sll $15,$23,2
lw $15,y($15)
addu $24,$24,$15
lw $24,($24)
bne $24,$0,L.9
la $4,L.14
jal printf
L.6:
la $23,1($23)
L.8:
sll $24,$23,2
lw $24,y($24)
bne $24,$0,L.5
jal f
lw $4,wordlist
jal g
move $2,$0
L.4:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end main
.data
.align 2
L.16:
.word L.17
.word L.18
.word L.19
.word L.20
.word 0x0
.globl f
.text
.text
.align 2
.ent f
f:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
la $30,L.16
b L.24
L.21:
la $4,L.25
lw $5,($30)
jal printf
L.22:
la $30,4($30)
L.24:
lw $24,($30)
bne $24,$0,L.21
move $2,$0
L.15:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end f
.globl g
.text
.align 2
.ent g
g:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $30,$4
b L.30
L.27:
move $23,$0
b L.34
L.31:
la $4,L.35
sll $24,$23,2
addu $24,$24,$30
lw $5,($24)
jal printf
L.32:
la $23,1($23)
L.34:
move $24,$23
la $15,3
bltu $24,$15,L.31
la $4,L.25
la $5,12($30)
jal printf
L.28:
la $30,20($30)
L.30:
lw $24,($30)
bne $24,$0,L.27
jal h
move $2,$0
L.26:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end g
.globl h
.text
.align 2
.ent h
h:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-4
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $30,$0
b L.40
L.37:
la $4,L.41
la $24,20
mul $24,$24,$30
lw $5,words($24)
lw $6,words+4($24)
lw $7,words+8($24)
la $24,words+12($24)
sw $24,16($sp)
jal printf
L.38:
la $30,1($30)
L.40:
move $24,$30
la $15,5
bltu $24,$15,L.37
move $2,$0
L.36:
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end h
.rdata
.align 0
L.41:
.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 0
L.35:
.byte 37
.byte 100
.byte 32
.byte 0
.align 0
L.25:
.byte 37
.byte 115
.byte 10
.byte 0
.align 0
L.20:
.byte 119
.byte 104
.byte 105
.byte 108
.byte 101
.byte 0
.align 0
L.19:
.byte 101
.byte 108
.byte 115
.byte 101
.byte 0
.align 0
L.18:
.byte 102
.byte 111
.byte 114
.byte 0
.align 0
L.17:
.byte 105
.byte 102
.byte 0
.align 0
L.14:
.byte 10
.byte 0
.align 0
L.13:
.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

View file

@ -0,0 +1,396 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
la $4,L.2
la $24,255
move $5,$24
move $6,$24
jal printf
la $4,L.3
la $24,65535
move $5,$24
move $6,$24
jal printf
la $4,L.4
la $24,0xffffffff
move $5,$24
move $6,$24
jal printf
la $4,L.5
la $24,0xffffffff
move $5,$24
move $6,$24
jal printf
la $4,L.6
la $24,127
move $5,$24
move $6,$24
jal printf
la $4,L.7
la $24,127
move $5,$24
move $6,$24
jal printf
la $4,L.8
la $24,32767
move $5,$24
move $6,$24
jal printf
la $4,L.9
la $24,2147483647
move $5,$24
move $6,$24
jal printf
la $4,L.10
la $24,2147483647
move $5,$24
move $6,$24
jal printf
la $4,L.11
la $24,-128
move $5,$24
move $6,$24
jal printf
la $4,L.12
la $24,-128
move $5,$24
move $6,$24
jal printf
la $4,L.13
la $24,-32768
move $5,$24
move $6,$24
jal printf
la $4,L.14
la $24,-2147483648
move $5,$24
move $6,$24
jal printf
la $4,L.15
la $24,-2147483648
move $5,$24
move $6,$24
jal printf
move $2,$0
L.1:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end main
.rdata
.align 0
L.15:
.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 0
L.14:
.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 0
L.13:
.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 0
L.12:
.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 0
L.11:
.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 0
L.10:
.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 0
L.9:
.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 0
L.8:
.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 0
L.7:
.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 0
L.6:
.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 0
L.5:
.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 0
L.4:
.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 0
L.3:
.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 0
L.2:
.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.22507385850720190e-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.38905609893065220e+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.79769313486231570e+308 .
Overflow saturates at V0 = inf .
No Overflow should be signaled for V * 1 = 1.79769313486231570e+308
nor for V / 1 = 1.79769313486231570e+308 .
Any overflow signal separating this * from the one
above is a DEFECT.
Diagnosis resumes after milestone Number 190 Page: 9
What message and/or values does Division by Zero produce?
Trying to compute 1 / 0 produces ... inf .
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,308 @@
.set reorder
.globl in
.data
.align 2
in:
.word 0xa
.word 0x20
.word 0xffffffff
.word 0x237
.word 0x3
.word 0x12
.word 0x1
.word 0xffffffcd
.word 0x315
.word 0x0
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
la $4,in
la $5,10
jal sort
move $30,$0
b L.5
L.2:
sll $24,$30,2
lw $4,in($24)
jal putd
la $4,10
jal putchar
L.3:
la $30,1($30)
L.5:
move $24,$30
la $15,10
bltu $24,$15,L.2
move $2,$0
L.1:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end main
.globl putd
.text
.align 2
.ent putd
putd:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
move $30,$4
bge $30,$0,L.7
la $4,45
jal putchar
negu $30,$30
L.7:
la $24,10
div $24,$30,$24
beq $24,$0,L.9
la $24,10
div $4,$30,$24
jal putd
L.9:
la $24,10
rem $24,$30,$24
la $4,48($24)
jal putchar
move $2,$0
L.6:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end putd
.globl sort
.text
.align 2
.ent sort
sort:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
sw $5,28($sp)
lw $24,0+24($sp)
sw $24,xx
move $4,$24
move $5,$0
lw $24,4+24($sp)
subu $24,$24,1
sw $24,4+24($sp)
move $6,$24
jal quick
move $2,$0
L.11:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end sort
.globl quick
.text
.align 2
.ent quick
quick:
.frame $sp,40,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-40
.mask 0xc2e00000,-4
sw $21,16($sp)
sw $22,20($sp)
sw $23,24($sp)
.cprestore 28
sw $30,32($sp)
sw $31,36($sp)
move $30,$4
move $23,$5
move $22,$6
blt $23,$22,L.13
b L.12
L.13:
move $4,$30
move $5,$23
move $6,$22
jal partition
move $21,$2
move $4,$30
move $5,$23
subu $6,$21,1
jal quick
move $4,$30
la $5,1($21)
move $6,$22
jal quick
move $2,$0
L.12:
lw $21,16($sp)
lw $22,20($sp)
lw $23,24($sp)
lw $25,28($sp)
lw $30,32($sp)
lw $31,36($sp)
addu $sp,$sp,40
j $31
.end quick
.globl partition
.text
.align 2
.ent partition
partition:
.frame $sp,48,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-48
.mask 0xc2f00000,-8
sw $20,16($sp)
sw $21,20($sp)
sw $22,24($sp)
sw $23,28($sp)
.cprestore 32
sw $30,36($sp)
sw $31,40($sp)
move $30,$4
move $23,$5
move $22,$6
la $22,1($22)
move $20,$23
sll $24,$20,2
addu $24,$24,$30
lw $21,($24)
b L.17
L.16:
la $23,1($23)
b L.20
L.19:
la $23,1($23)
L.20:
sll $24,$23,2
addu $24,$24,$30
lw $24,($24)
blt $24,$21,L.19
subu $22,$22,1
b L.23
L.22:
subu $22,$22,1
L.23:
sll $24,$22,2
addu $24,$24,$30
lw $24,($24)
bgt $24,$21,L.22
bge $23,$22,L.25
sll $24,$23,2
addu $4,$24,$30
sll $24,$22,2
addu $5,$24,$30
jal exchange
L.25:
L.17:
blt $23,$22,L.16
sll $24,$20,2
addu $4,$24,$30
sll $24,$22,2
addu $5,$24,$30
jal exchange
move $2,$22
L.15:
lw $20,16($sp)
lw $21,20($sp)
lw $22,24($sp)
lw $23,28($sp)
lw $25,32($sp)
lw $30,36($sp)
lw $31,40($sp)
addu $sp,$sp,48
j $31
.end partition
.globl exchange
.text
.align 2
.ent exchange
exchange:
.frame $sp,40,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-40
.mask 0xc2800000,-12
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $30,$4
move $23,$5
la $4,L.28
lw $24,xx
la $15,4
move $14,$30
subu $14,$14,$24
div $5,$14,$15
move $14,$23
subu $24,$14,$24
div $6,$24,$15
jal printf
lw $24,($30)
sw $24,-4+40($sp)
lw $24,($23)
sw $24,($30)
lw $24,-4+40($sp)
sw $24,($23)
move $2,$0
L.27:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,40
j $31
.end exchange
.globl xx
.comm xx,4
.rdata
.align 0
L.28:
.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,271 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
move $2,$0
L.1:
j $31
.end main
.globl f
.text
.align 2
.ent f
f:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0x82000000,-12
.cprestore 16
sw $31,20($sp)
sw $4,32($sp)
jal f
move $24,$2
sw $24,-4+32($sp)
jal f
lw $15,-4+32($sp)
addu $24,$15,$2
sw $24,0+32($sp)
move $2,$0
L.2:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,32
j $31
.end f
.globl f2
.text
.align 2
.ent f2
f2:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
sw $4,32($sp)
jal f
move $24,$2
sw $24,-4+32($sp)
lw $15,0+32($sp)
beq $15,$0,L.5
jal f
move $24,$2
move $30,$24
b L.6
L.5:
la $30,1
L.6:
lw $24,-4+32($sp)
addu $24,$24,$30
sw $24,0+32($sp)
move $2,$0
L.3:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end f2
.globl f3
.text
.align 2
.ent f3
f3:
.frame $sp,72,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-72
.mask 0xc2ff0000,-16
sw $16,16($sp)
sw $17,20($sp)
sw $18,24($sp)
sw $19,28($sp)
sw $20,32($sp)
sw $21,36($sp)
sw $22,40($sp)
sw $23,44($sp)
.cprestore 48
sw $30,52($sp)
sw $31,56($sp)
sw $4,72($sp)
sw $5,76($sp)
move $30,$0
move $23,$0
move $22,$0
move $21,$0
move $20,$0
move $19,$0
move $18,$0
move $17,$0
move $16,$0
sw $0,-4+72($sp)
lw $24,4+72($sp)
sw $24,-12+72($sp)
la $15,4($24)
sw $15,4+72($sp)
lw $15,0+72($sp)
beq $15,$0,L.9
jal f
move $24,$2
sw $24,-8+72($sp)
b L.10
L.9:
sw $0,-8+72($sp)
L.10:
lw $24,-8+72($sp)
lw $15,-12+72($sp)
sw $24,($15)
move $2,$0
L.7:
lw $16,16($sp)
lw $17,20($sp)
lw $18,24($sp)
lw $19,28($sp)
lw $20,32($sp)
lw $21,36($sp)
lw $22,40($sp)
lw $23,44($sp)
lw $25,48($sp)
lw $30,52($sp)
lw $31,56($sp)
addu $sp,$sp,72
j $31
.end f3
.globl f4
.text
.align 2
.ent f4
f4:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0x40fc0000,-8
sw $18,0($sp)
sw $19,4($sp)
sw $20,8($sp)
sw $21,12($sp)
sw $22,16($sp)
sw $23,20($sp)
sw $30,24($sp)
move $30,$0
move $23,$0
move $22,$0
move $21,$0
move $20,$0
move $19,$0
lw $24,i
sll $15,$24,3
l.d $f18,a($15)
l.d $f16,b($15)
l.d $f10,L.15
add.d $f8,$f18,$f16
c.eq.d $f8,$f10; bc1t L.13
beq $24,$0,L.13
sub.d $f18,$f18,$f16
c.eq.d $f18,$f10; bc1t L.13
la $18,1
b L.14
L.13:
move $18,$0
L.14:
sw $18,i
move $2,$0
L.11:
lw $18,0($sp)
lw $19,4($sp)
lw $20,8($sp)
lw $21,12($sp)
lw $22,16($sp)
lw $23,20($sp)
lw $30,24($sp)
addu $sp,$sp,32
j $31
.end f4
.globl f5
.text
.align 2
.ent f5
f5:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
lw $24,k
lw $15,m
lw $14,A
mul $13,$24,$15
sll $13,$13,3
addu $13,$13,$14
lw $12,j
mul $15,$12,$15
sll $15,$15,3
addu $15,$15,$14
lw $14,n
lw $11,B
mul $24,$24,$14
sll $24,$24,3
addu $24,$24,$11
mul $14,$12,$14
sll $14,$14,3
addu $14,$14,$11
l.d $f18,($13)
l.d $f16,($15)
mul.d $f18,$f18,$f16
l.d $f16,($24)
l.d $f10,($14)
mul.d $f16,$f16,$f10
add.d $f18,$f18,$f16
s.d $f18,x
l.d $f18,($13)
l.d $f16,($14)
mul.d $f18,$f18,$f16
l.d $f16,($24)
l.d $f10,($15)
mul.d $f16,$f16,$f10
sub.d $f18,$f18,$f16
s.d $f18,x
move $2,$0
L.16:
j $31
.end f5
.globl x
.comm x,8
.globl B
.comm B,4
.globl A
.comm A,4
.globl n
.comm n,4
.globl m
.comm m,4
.globl k
.comm k,4
.globl j
.comm j,4
.globl i
.comm i,4
.globl b
.comm b,80
.globl a
.comm a,80
.rdata
.align 3
L.15:
.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,395 @@
.set reorder
.globl x
.data
.align 2
x:
.word 0x1
.word 0x2
.word 0x3
.word 0x4
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,112,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-112
.mask 0x82000000,-8
.cprestore 100
sw $31,104($sp)
la $4,L.2
jal print
la $4,L.3
la $5,L.4
jal print
la $4,L.5
la $5,3
la $6,10
jal print
la $4,L.6
la $5,L.7
la $6,L.8
la $7,4
la $24,10
sw $24,16($sp)
jal print
la $4,L.9
la $5,L.7
la $6,L.8
l.d $f18,L.10
s.d $f18,16($sp)
la $24,10
sw $24,24($sp)
jal print
la $4,L.11
la $24,x
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,4($29)
sw $9,8($29)
lw $3,8($8)
lw $9,12($8)
sw $3,12($29)
sw $9,16($29)
lw $5,4($sp)
lw $6,8($sp)
lw $7,12($sp)
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,20($29)
sw $9,24($29)
lw $3,8($8)
lw $9,12($8)
sw $3,28($29)
sw $9,32($29)
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,36($29)
sw $9,40($29)
lw $3,8($8)
lw $9,12($8)
sw $3,44($29)
sw $9,48($29)
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,52($29)
sw $9,56($29)
lw $3,8($8)
lw $9,12($8)
sw $3,60($29)
sw $9,64($29)
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,68($29)
sw $9,72($29)
lw $3,8($8)
lw $9,12($8)
sw $3,76($29)
sw $9,80($29)
move $8,$24
lw $3,0($8)
lw $9,4($8)
sw $3,84($29)
sw $9,88($29)
lw $3,8($8)
lw $9,12($8)
sw $3,92($29)
sw $9,96($29)
jal print
move $2,$0
L.1:
lw $25,100($sp)
lw $31,104($sp)
addu $sp,$sp,112
j $31
.end main
.globl print
.text
.align 2
.ent print
print:
.frame $sp,56,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-56
.mask 0xc2800000,-24
sw $23,20($sp)
.cprestore 24
sw $30,28($sp)
sw $31,32($sp)
sw $4,56($sp)
sw $5,60($sp)
sw $6,64($sp)
sw $7,68($sp)
la $30,4+56($sp)
b L.18
L.15:
lw $24,0+56($sp)
lb $24,($24)
la $15,37
bne $24,$15,L.19
lw $24,0+56($sp)
la $24,1($24)
sw $24,0+56($sp)
lb $23,($24)
la $24,115
beq $23,$24,L.35
bgt $23,$24,L.40
L.39:
la $24,98
blt $23,$24,L.21
la $24,102
bgt $23,$24,L.21
sll $24,$23,2
lw $24,L.41-392($24)
.cpadd $24
j $24
.rdata
.align 2
L.41:
.gpword L.24
.gpword L.29
.gpword L.31
.gpword L.21
.gpword L.37
.text
L.40:
la $24,119
beq $23,$24,L.33
b L.21
L.24:
la $24,16($30)
move $30,$24
la $15,-16+56($sp)
la $8,-16($24)
lw $3,0($8)
lw $9,4($8)
sw $3,0($15)
sw $9,4($15)
lw $3,8($8)
lw $9,12($8)
sw $3,8($15)
sw $9,12($15)
la $4,L.25
lw $5,-16+56($sp)
lw $6,-12+56($sp)
lw $7,-8+56($sp)
lw $24,-4+56($sp)
sw $24,16($sp)
jal printf
b L.20
L.29:
la $4,L.30
la $24,4($30)
move $30,$24
lb $5,-1($24)
jal printf
b L.20
L.31:
la $4,L.32
la $24,4($30)
move $30,$24
lw $5,-4($24)
jal printf
b L.20
L.33:
la $4,L.34
la $24,4($30)
move $30,$24
lh $5,-2($24)
jal printf
b L.20
L.35:
la $4,L.36
la $24,4($30)
move $30,$24
lw $5,-4($24)
jal printf
b L.20
L.37:
la $4,L.38
move $24,$30
la $24,15($24)
and $24,$24,0xfffffff8
move $30,$24
l.d $f18,-8($24)
mfc1.d $6,$f18
jal printf
b L.20
L.21:
la $4,L.30
lw $24,0+56($sp)
lb $5,($24)
jal printf
b L.20
L.19:
la $4,L.30
lw $24,0+56($sp)
lb $5,($24)
jal printf
L.20:
L.16:
lw $24,0+56($sp)
la $24,1($24)
sw $24,0+56($sp)
L.18:
lw $24,0+56($sp)
lb $24,($24)
bne $24,$0,L.15
move $2,$0
L.12:
lw $23,20($sp)
lw $25,24($sp)
lw $30,28($sp)
lw $31,32($sp)
addu $sp,$sp,56
j $31
.end print
.rdata
.align 0
L.38:
.byte 37
.byte 102
.byte 0
.align 0
L.36:
.byte 37
.byte 115
.byte 0
.align 0
L.34:
.byte 37
.byte 120
.byte 0
.align 0
L.32:
.byte 37
.byte 100
.byte 0
.align 0
L.30:
.byte 37
.byte 99
.byte 0
.align 0
L.25:
.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 0
L.11:
.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 3
L.10:
.word 0x40140000
.word 0x0
.align 0
L.9:
.byte 37
.byte 115
.byte 37
.byte 115
.byte 32
.byte 37
.byte 102
.byte 37
.byte 99
.byte 0
.align 0
L.8:
.byte 115
.byte 116
.byte 0
.align 0
L.7:
.byte 116
.byte 101
.byte 0
.align 0
L.6:
.byte 37
.byte 115
.byte 37
.byte 115
.byte 32
.byte 37
.byte 119
.byte 37
.byte 99
.byte 0
.align 0
L.5:
.byte 116
.byte 101
.byte 115
.byte 116
.byte 32
.byte 37
.byte 100
.byte 37
.byte 99
.byte 0
.align 0
L.4:
.byte 50
.byte 0
.align 0
L.3:
.byte 116
.byte 101
.byte 115
.byte 116
.byte 32
.byte 37
.byte 115
.byte 10
.byte 0
.align 0
L.2:
.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,485 @@
.set reorder
.globl addpoint
.text
.text
.align 2
.ent addpoint
addpoint:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
sw $5,4($sp)
sw $6,8($sp)
sw $7,12($sp)
lw $24,4+0($sp)
lw $15,12+0($sp)
addu $24,$24,$15
sw $24,4+0($sp)
lw $24,8+0($sp)
lw $15,16+0($sp)
addu $24,$24,$15
sw $24,8+0($sp)
la $8,4+0($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($4)
sw $9,4($4)
L.1:
j $31
.end addpoint
.globl canonrect
.text
.align 2
.ent canonrect
canonrect:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0x40e00000,-20
sw $21,0($sp)
sw $22,4($sp)
sw $23,8($sp)
sw $30,12($sp)
sw $5,36($sp)
sw $6,40($sp)
sw $7,44($sp)
lw $24,4+32($sp)
lw $15,12+32($sp)
bge $24,$15,L.10
lw $30,4+32($sp)
b L.11
L.10:
lw $30,12+32($sp)
L.11:
sw $30,-16+32($sp)
lw $24,8+32($sp)
lw $15,16+32($sp)
bge $24,$15,L.20
lw $23,8+32($sp)
b L.21
L.20:
lw $23,16+32($sp)
L.21:
sw $23,-12+32($sp)
lw $24,4+32($sp)
lw $15,12+32($sp)
ble $24,$15,L.26
lw $22,4+32($sp)
b L.27
L.26:
lw $22,12+32($sp)
L.27:
sw $22,-8+32($sp)
lw $24,8+32($sp)
lw $15,16+32($sp)
ble $24,$15,L.37
lw $21,8+32($sp)
b L.38
L.37:
lw $21,16+32($sp)
L.38:
sw $21,-4+32($sp)
la $8,-16+32($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($4)
sw $9,4($4)
lw $3,8($8)
lw $9,12($8)
sw $3,8($4)
sw $9,12($4)
L.5:
lw $21,0($sp)
lw $22,4($sp)
lw $23,8($sp)
lw $30,12($sp)
addu $sp,$sp,32
j $31
.end canonrect
.globl makepoint
.text
.align 2
.ent makepoint
makepoint:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
sw $5,-8+8($sp)
sw $6,-4+8($sp)
la $8,-8+8($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($4)
sw $9,4($4)
L.39:
addu $sp,$sp,8
j $31
.end makepoint
.globl makerect
.text
.align 2
.ent makerect
makerect:
.frame $sp,48,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-48
.mask 0x82000000,-24
.cprestore 20
sw $31,24($sp)
sw $4,48($sp)
sw $5,52($sp)
sw $6,56($sp)
sw $7,60($sp)
la $24,-16+48($sp)
la $8,4+48($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($24)
sw $9,4($24)
la $24,-8+48($sp)
la $8,12+48($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($24)
sw $9,4($24)
lw $4,0+48($sp)
la $8,-16+48($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,4($29)
sw $9,8($29)
lw $3,8($8)
lw $9,12($8)
sw $3,12($29)
sw $9,16($29)
lw $5,4($sp)
lw $6,8($sp)
lw $7,12($sp)
jal canonrect
L.42:
lw $25,20($sp)
lw $31,24($sp)
addu $sp,$sp,48
j $31
.end makerect
.globl ptinrect
.text
.align 2
.ent ptinrect
ptinrect:
.frame $sp,8,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-8
.mask 0x40000000,-8
sw $30,0($sp)
sw $4,8($sp)
sw $5,12($sp)
sw $6,16($sp)
sw $7,20($sp)
lw $24,0+8($sp)
lw $15,8+8($sp)
blt $24,$15,L.53
lw $15,16+8($sp)
bge $24,$15,L.53
lw $24,4+8($sp)
lw $15,12+8($sp)
blt $24,$15,L.53
lw $24,4+8($sp)
lw $15,20+8($sp)
bge $24,$15,L.53
la $30,1
b L.54
L.53:
move $30,$0
L.54:
move $2,$30
L.45:
lw $30,0($sp)
addu $sp,$sp,8
j $31
.end ptinrect
.globl y
.sdata
.align 0
y:
.byte 97
.byte 98
.byte 0
.globl odd
.text
.text
.align 2
.ent odd
odd:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0x82000000,-12
.cprestore 16
sw $31,20($sp)
sw $4,32($sp)
la $24,-3+32($sp)
la $8,0+32($sp)
ulhu $3,0($8)
ush $3,0($24)
lbu $3,2($8)
sb $3,2($24)
la $4,L.56
la $5,-3+32($sp)
jal printf
move $2,$0
L.55:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,32
j $31
.end odd
.rdata
.align 2
L.58:
.word 0x0
.word 0x0
.align 2
L.59:
.word 0x140
.word 0x140
.align 2
L.60:
.word 0xffffffff
.word 0xffffffff
.word 0x1
.word 0x1
.word 0x14
.word 0x12c
.word 0x1f4
.word 0x190
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,144,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-144
.mask 0xc2000000,-112
.cprestore 24
sw $30,28($sp)
sw $31,32($sp)
la $24,-64+144($sp)
la $8,L.58
lw $3,0($8)
lw $9,4($8)
sw $3,0($24)
sw $9,4($24)
la $24,-72+144($sp)
la $8,L.59
lw $3,0($8)
lw $9,4($8)
sw $3,0($24)
sw $9,4($24)
la $24,-32+144($sp)
la $8,L.60
addu $8,$8,32
addu $10,$24,32
L.76:
addu $8,$8,-8
addu $10,$10,-8
lw $3,0($8)
lw $9,4($8)
sw $3,0($10)
sw $9,4($10)
bltu $24,$10,L.76
la $4,-80+144($sp)
la $24,-10
move $5,$24
move $6,$24
jal makepoint
la $4,-88+144($sp)
la $8,-72+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,4($29)
sw $9,8($29)
lw $5,4($sp)
lw $6,8($sp)
la $8,-80+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,12($29)
sw $9,16($29)
lw $7,12($sp)
jal addpoint
la $4,-96+144($sp)
la $24,10
move $5,$24
move $6,$24
jal makepoint
la $4,-104+144($sp)
la $8,-64+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,4($29)
sw $9,8($29)
lw $5,4($sp)
lw $6,8($sp)
la $8,-96+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,12($29)
sw $9,16($29)
lw $7,12($sp)
jal addpoint
la $4,-48+144($sp)
la $8,-88+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,4($29)
sw $9,8($29)
lw $5,4($sp)
lw $6,8($sp)
la $8,-104+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,12($29)
sw $9,16($29)
lw $7,12($sp)
jal makerect
move $30,$0
b L.64
L.61:
la $4,-56+144($sp)
sll $24,$30,3
la $15,-32+144($sp)
addu $15,$24,$15
lw $5,($15)
la $15,-28+144($sp)
addu $24,$24,$15
lw $6,($24)
jal makepoint
la $4,L.65
sll $24,$30,3
la $15,-32+144($sp)
addu $24,$24,$15
lw $5,($24)
lw $6,-52+144($sp)
jal printf
la $8,-56+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,0($29)
sw $9,4($29)
lw $4,0($sp)
lw $5,4($sp)
la $8,-48+144($sp)
lw $3,0($8)
lw $9,4($8)
sw $3,8($29)
sw $9,12($29)
lw $3,8($8)
lw $9,12($8)
sw $3,16($29)
sw $9,20($29)
lw $6,8($sp)
lw $7,12($sp)
jal ptinrect
bne $2,$0,L.68
la $4,L.70
jal printf
L.68:
la $4,L.71
lw $5,-48+144($sp)
lw $6,-44+144($sp)
lw $7,-40+144($sp)
lw $24,-36+144($sp)
sw $24,16($sp)
jal printf
L.62:
la $30,1($30)
L.64:
move $24,$30
la $15,4
bltu $24,$15,L.61
la $8,y
ulhu $3,0($8)
sh $3,0($29)
lbu $3,2($8)
sb $3,2($29)
lw $4,0($sp)
jal odd
move $4,$0
jal exit
move $2,$0
L.57:
lw $25,24($sp)
lw $30,28($sp)
lw $31,32($sp)
addu $sp,$sp,144
j $31
.end main
.rdata
.align 0
L.71:
.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 0
L.70:
.byte 110
.byte 111
.byte 116
.byte 32
.byte 0
.align 0
L.65:
.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 0
L.56:
.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,836 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
la $30,L.6
b L.5
L.2:
lb $4,($30)
jal backslash
move $24,$2
la $4,L.7
lb $5,($30)
move $6,$24
jal printf
L.3:
la $30,1($30)
L.5:
lb $24,($30)
bne $24,$0,L.2
jal f
jal g
jal h
la $23,16777216
b L.11
L.8:
move $4,$23
jal big
L.9:
la $23,16777216($23)
L.11:
and $24,$23,117440512
bne $24,$0,L.8
jal limit
move $2,$0
L.1:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end main
.globl backslash
.text
.align 2
.ent backslash
backslash:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
la $24,102
beq $4,$24,L.16
bgt $4,$24,L.22
L.21:
la $24,98
beq $4,$24,L.15
b L.13
L.22:
la $24,110
beq $4,$24,L.17
blt $4,$24,L.13
L.23:
la $24,114
beq $4,$24,L.18
la $24,116
beq $4,$24,L.19
la $24,118
beq $4,$24,L.20
b L.13
L.15:
la $2,8
b L.12
L.16:
la $2,12
b L.12
L.17:
la $2,10
b L.12
L.18:
la $2,13
b L.12
L.19:
la $2,9
b L.12
L.20:
la $2,11
b L.12
L.13:
move $2,$4
L.12:
j $31
.end backslash
.globl f
.text
.align 2
.ent f
f:
.frame $sp,40,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-40
.mask 0xc2c00000,-8
sw $22,16($sp)
sw $23,20($sp)
.cprestore 24
sw $30,28($sp)
sw $31,32($sp)
move $23,$0
la $4,L.25
jal printf
move $30,$0
L.26:
move $22,$30
la $24,1
blt $30,$24,L.30
la $24,20
bgt $30,$24,L.30
sll $24,$30,2
lw $24,L.42-4($24)
.cpadd $24
j $24
.rdata
.align 2
L.42:
.gpword L.32
.gpword L.33
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.34
.gpword L.35
.gpword L.36
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.30
.gpword L.37
.gpword L.38
.gpword L.39
.gpword L.40
.gpword L.41
.text
L.32:
move $23,$30
b L.31
L.33:
move $23,$30
b L.31
L.34:
move $23,$30
b L.31
L.35:
move $23,$30
b L.31
L.36:
move $23,$30
b L.31
L.37:
move $23,$30
b L.31
L.38:
move $23,$30
b L.31
L.39:
move $23,$30
b L.31
L.40:
move $23,$30
b L.31
L.41:
move $23,$30
L.30:
L.31:
la $4,L.44
move $5,$23
jal printf
L.27:
la $30,1($30)
la $24,20
ble $30,$24,L.26
move $2,$0
L.24:
lw $22,16($sp)
lw $23,20($sp)
lw $25,24($sp)
lw $30,28($sp)
lw $31,32($sp)
addu $sp,$sp,40
j $31
.end f
.globl g
.text
.align 2
.ent g
g:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
la $4,L.46
jal printf
la $30,1
L.47:
la $24,1001
blt $30,$24,L.64
la $24,1004
bgt $30,$24,L.65
sll $24,$30,2
lw $24,L.66-4004($24)
.cpadd $24
j $24
.rdata
.align 2
L.66:
.gpword L.60
.gpword L.60
.gpword L.60
.gpword L.60
.text
L.64:
la $24,1
blt $30,$24,L.51
la $24,8
bgt $30,$24,L.51
sll $24,$30,2
lw $24,L.68-4($24)
.cpadd $24
j $24
.rdata
.align 2
L.68:
.gpword L.53
.gpword L.53
.gpword L.55
.gpword L.55
.gpword L.55
.gpword L.57
.gpword L.57
.gpword L.57
.text
L.65:
la $24,3001
blt $30,$24,L.51
la $24,3004
bgt $30,$24,L.51
sll $24,$30,2
lw $24,L.70-12004($24)
.cpadd $24
j $24
.rdata
.align 2
L.70:
.gpword L.62
.gpword L.62
.gpword L.62
.gpword L.62
.text
L.53:
la $4,L.54
move $5,$30
jal printf
b L.52
L.55:
la $4,L.56
move $5,$30
jal printf
b L.52
L.57:
la $4,L.58
move $5,$30
jal printf
L.51:
la $4,L.59
move $5,$30
jal printf
b L.52
L.60:
la $4,L.61
move $5,$30
jal printf
b L.52
L.62:
la $4,L.63
move $5,$30
jal printf
L.52:
L.48:
la $30,1($30)
la $24,10
ble $30,$24,L.47
move $2,$0
L.45:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end g
.globl h
.text
.align 2
.ent h
h:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
move $23,$0
la $4,L.73
jal printf
la $30,1
L.74:
la $24,264
beq $30,$24,L.86
bgt $30,$24,L.94
L.93:
la $24,120
beq $30,$24,L.84
bgt $30,$24,L.96
L.95:
la $24,8
beq $30,$24,L.83
blt $30,$24,L.78
L.97:
la $24,16
beq $30,$24,L.82
b L.78
L.96:
la $24,128
beq $30,$24,L.80
blt $30,$24,L.78
L.98:
la $24,248
beq $30,$24,L.87
b L.78
L.94:
la $24,288
beq $30,$24,L.91
bgt $30,$24,L.100
L.99:
la $24,272
beq $30,$24,L.88
blt $30,$24,L.78
L.101:
la $24,280
beq $30,$24,L.85
b L.78
L.100:
la $24,304
beq $30,$24,L.89
bgt $30,$24,L.103
L.102:
la $24,296
beq $30,$24,L.90
b L.78
L.103:
la $24,312
beq $30,$24,L.92
b L.78
L.78:
la $23,1($23)
b L.75
L.80:
la $4,L.81
move $5,$30
jal printf
b L.79
L.82:
la $4,L.81
move $5,$30
jal printf
b L.79
L.83:
la $4,L.81
move $5,$30
jal printf
b L.79
L.84:
la $4,L.81
move $5,$30
jal printf
b L.79
L.85:
la $4,L.81
move $5,$30
jal printf
b L.79
L.86:
la $4,L.81
move $5,$30
jal printf
b L.79
L.87:
la $4,L.81
move $5,$30
jal printf
b L.79
L.88:
la $4,L.81
move $5,$30
jal printf
b L.79
L.89:
la $4,L.81
move $5,$30
jal printf
b L.79
L.90:
la $4,L.81
move $5,$30
jal printf
b L.79
L.91:
la $4,L.81
move $5,$30
jal printf
b L.79
L.92:
la $4,L.81
move $5,$30
jal printf
L.79:
L.75:
la $30,1($30)
la $24,500
ble $30,$24,L.74
la $4,L.104
move $5,$23
jal printf
move $2,$0
L.72:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end h
.globl big
.text
.align 2
.ent big
big:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
sw $4,32($sp)
lw $24,0+32($sp)
and $30,$24,0x6000000
la $15,33554432
beq $30,$15,L.111
bgt $30,$15,L.115
L.114:
la $15,-2
beq $30,$15,L.109
la $15,-1
beq $30,$15,L.109
beq $30,$0,L.109
b L.106
L.115:
move $24,$30
la $15,67108864
beq $24,$15,L.112
b L.106
L.109:
la $4,L.110
lw $5,0+32($sp)
jal printf
b L.107
L.111:
la $4,L.110
lw $5,0+32($sp)
jal printf
b L.107
L.112:
la $4,L.110
lw $5,0+32($sp)
jal printf
b L.107
L.106:
la $4,L.113
lw $5,0+32($sp)
jal printf
L.107:
move $2,$0
L.105:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end big
.globl limit
.text
.align 2
.ent limit
limit:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
la $30,-2147483648
L.117:
la $24,-2147483648
blt $30,$24,L.121
la $15,-2147483644
bgt $30,$15,L.121
sll $15,$30,2
sll $24,$24,2
subu $24,$15,$24
lw $24,L.134($24)
.cpadd $24
j $24
.rdata
.align 2
L.134:
.gpword L.123
.gpword L.125
.gpword L.127
.gpword L.129
.gpword L.131
.text
L.123:
la $4,L.124
jal printf
b L.122
L.125:
la $4,L.126
jal printf
b L.122
L.127:
la $4,L.128
jal printf
b L.122
L.129:
la $4,L.130
jal printf
b L.122
L.131:
la $4,L.132
jal printf
b L.122
L.121:
la $4,L.133
jal printf
L.122:
L.118:
la $30,1($30)
la $24,-2147483643
ble $30,$24,L.117
la $30,2147483647
L.135:
la $24,2147483643
blt $30,$24,L.139
la $15,2147483647
bgt $30,$15,L.139
sll $15,$30,2
sll $24,$24,2
subu $24,$15,$24
lw $24,L.146($24)
.cpadd $24
j $24
.rdata
.align 2
L.146:
.gpword L.145
.gpword L.144
.gpword L.143
.gpword L.142
.gpword L.141
.text
L.141:
la $4,L.124
jal printf
b L.140
L.142:
la $4,L.126
jal printf
b L.140
L.143:
la $4,L.128
jal printf
b L.140
L.144:
la $4,L.130
jal printf
b L.140
L.145:
la $4,L.132
jal printf
b L.140
L.139:
la $4,L.133
jal printf
L.140:
L.136:
subu $30,$30,1
la $24,2147483642
bge $30,$24,L.135
move $2,$0
L.116:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end limit
.rdata
.align 0
L.133:
.byte 53
.byte 10
.byte 0
.align 0
L.132:
.byte 52
.byte 10
.byte 0
.align 0
L.130:
.byte 51
.byte 10
.byte 0
.align 0
L.128:
.byte 50
.byte 10
.byte 0
.align 0
L.126:
.byte 49
.byte 10
.byte 0
.align 0
L.124:
.byte 48
.byte 10
.byte 0
.align 0
L.113:
.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 0
L.110:
.byte 120
.byte 32
.byte 61
.byte 32
.byte 48
.byte 120
.byte 37
.byte 120
.byte 10
.byte 0
.align 0
L.104:
.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 0
L.81:
.byte 105
.byte 32
.byte 61
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.73:
.byte 104
.byte 58
.byte 10
.byte 0
.align 0
L.63:
.byte 54
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.61:
.byte 53
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.59:
.byte 100
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.58:
.byte 51
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.56:
.byte 50
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.54:
.byte 49
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.46:
.byte 103
.byte 58
.byte 10
.byte 0
.align 0
L.44:
.byte 120
.byte 32
.byte 61
.byte 32
.byte 37
.byte 100
.byte 10
.byte 0
.align 0
L.25:
.byte 102
.byte 58
.byte 10
.byte 0
.align 0
L.7:
.byte 37
.byte 99
.byte 32
.byte 61
.byte 32
.byte 48
.byte 120
.byte 37
.byte 120
.byte 10
.byte 0
.align 0
L.6:
.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,378 @@
.set reorder
.globl main
.text
.text
.align 2
.ent main
main:
.frame $sp,48,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-48
.mask 0x82000000,-28
.cprestore 16
sw $31,20($sp)
sw $0,-24+48($sp)
sw $0,next
b L.3
L.2:
la $4,-20+48($sp)
la $5,-24+48($sp)
jal lookup
lw $15,($2)
la $15,1($15)
sw $15,($2)
L.3:
la $4,-20+48($sp)
jal getword
bne $2,$0,L.2
lw $4,-24+48($sp)
jal tprint
move $2,$0
L.1:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,48
j $31
.end main
.globl err
.text
.align 2
.ent err
err:
.frame $sp,24,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-24
.mask 0x82000000,-4
.cprestore 16
sw $31,20($sp)
sw $4,24($sp)
la $4,L.6
lw $5,0+24($sp)
jal printf
la $4,1
jal exit
move $2,$0
L.5:
lw $25,16($sp)
lw $31,20($sp)
addu $sp,$sp,24
j $31
.end err
.globl getword
.text
.align 2
.ent getword
getword:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2800000,-4
sw $23,16($sp)
.cprestore 20
sw $30,24($sp)
sw $31,28($sp)
sw $4,32($sp)
L.8:
L.9:
jal getchar
move $24,$2
move $30,$24
la $15,-1
beq $24,$15,L.11
move $4,$30
jal isletter
beq $2,$0,L.8
L.11:
lw $23,0+32($sp)
b L.15
L.12:
move $24,$23
la $23,1($24)
move $15,$30
sb $15,($24)
L.13:
jal getchar
move $30,$2
L.15:
move $4,$30
jal isletter
move $30,$2
bne $2,$0,L.12
sb $0,($23)
move $24,$23
lw $15,0+32($sp)
bleu $24,$15,L.16
la $2,1
b L.7
L.16:
move $2,$0
L.7:
lw $23,16($sp)
lw $25,20($sp)
lw $30,24($sp)
lw $31,28($sp)
addu $sp,$sp,32
j $31
.end getword
.globl isletter
.text
.align 2
.ent isletter
isletter:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
la $24,65
blt $4,$24,L.19
la $24,90
bgt $4,$24,L.19
la $4,32($4)
L.19:
la $24,97
blt $4,$24,L.21
la $24,122
bgt $4,$24,L.21
move $2,$4
b L.18
L.21:
move $2,$0
L.18:
j $31
.end isletter
.globl lookup
.text
.align 2
.ent lookup
lookup:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
sw $4,32($sp)
move $30,$5
lw $24,($30)
beq $24,$0,L.24
lw $4,0+32($sp)
lw $24,($30)
lw $5,12($24)
jal strcmp
sw $2,-4+32($sp)
lw $24,-4+32($sp)
bge $24,$0,L.26
lw $4,0+32($sp)
lw $24,($30)
la $5,4($24)
jal lookup
move $24,$2
b L.23
L.26:
lw $24,-4+32($sp)
ble $24,$0,L.28
lw $4,0+32($sp)
lw $24,($30)
la $5,8($24)
jal lookup
move $24,$2
b L.23
L.28:
lw $2,($30)
b L.23
L.24:
lw $24,next
la $15,2000
blt $24,$15,L.30
la $4,L.32
jal err
L.30:
lw $24,next
sll $24,$24,4
sw $0,words($24)
lw $24,next
sll $24,$24,4
sw $0,words+8($24)
sw $0,words+4($24)
lw $4,0+32($sp)
jal strlen
move $24,$2
la $4,1($24)
jal malloc
lw $15,next
sll $15,$15,4
sw $2,words+12($15)
lw $24,next
sll $24,$24,4
lw $24,words+12($24)
bne $24,$0,L.36
la $4,L.39
jal err
L.36:
lw $24,next
sll $24,$24,4
lw $4,words+12($24)
lw $5,0+32($sp)
jal strcpy
lw $24,next
la $15,1($24)
sw $15,next
sll $24,$24,4
la $24,words($24)
sw $24,($30)
move $2,$24
L.23:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end lookup
.globl tprint
.text
.align 2
.ent tprint
tprint:
.frame $sp,32,$31
.set noreorder
.cpload $25
.set reorder
addu $sp,$sp,-32
.mask 0xc2000000,-8
.cprestore 16
sw $30,20($sp)
sw $31,24($sp)
move $30,$4
move $24,$30
beq $24,$0,L.42
lw $4,4($30)
jal tprint
la $4,L.44
lw $5,($30)
lw $6,12($30)
jal printf
lw $4,8($30)
jal tprint
L.42:
move $2,$0
L.41:
lw $25,16($sp)
lw $30,20($sp)
lw $31,24($sp)
addu $sp,$sp,32
j $31
.end tprint
.globl strcmp
.text
.align 2
.ent strcmp
strcmp:
.frame $sp,0,$31
.set noreorder
.cpload $25
.set reorder
b L.47
L.46:
move $24,$4
la $4,1($24)
lb $24,($24)
bne $24,$0,L.49
move $2,$0
b L.45
L.49:
la $5,1($5)
L.47:
lb $24,($4)
lb $15,($5)
beq $24,$15,L.46
lb $24,($4)
bne $24,$0,L.51
la $2,-1
b L.45
L.51:
lb $24,($5)
bne $24,$0,L.53
la $2,1
b L.45
L.53:
lb $24,($4)
lb $15,($5)
subu $2,$24,$15
L.45:
j $31
.end strcmp
.globl next
.comm next,4
.globl words
.comm words,32000
.rdata
.align 0
L.44:
.byte 37
.byte 100
.byte 9
.byte 37
.byte 115
.byte 10
.byte 0
.align 0
L.39:
.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 0
L.32:
.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 0
L.6:
.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