Commit 06bb955c authored by Taddeus Kroes's avatar Taddeus Kroes

Merge branch 'master' of github.com:taddeus/peephole

parents e340aadb 134aea82
......@@ -2,6 +2,10 @@
*.pdf
*.pyc
*~
*.aux
*.log
*.out
*.toc
.coverage
coverage/
build/
......
Common subexpression elimination
Loop through statements of each block
for each binary operator, look back for usage of rs and rt. If rs or rt are
assigned, break. If exact same operator is found, add it to the list of
common subexpressions. If you reach the end of the block, or rs or rt are
assigned, make new destination address, and change each occurence of this
expression with a move from the new register address.
Jump/branch end of basoc block, Label begin of BB
instr writing to register and immediatly overwritten by second instruction
(general case of second optimization in table practicum assignment)
.file 1 "acron.c"
# GNU C 2.7.2.3 [AL 1.1, MM 40, tma 0.1] SimpleScalar running sstrix compiled by GNU C
# Cc1 defaults:
# -mgas -mgpOPT
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -O0 -o
gcc2_compiled.:
__gnu_compiled_c:
.globl w
.data
.align 2
w:
.word $LC0
.word $LC1
.word $LC2
.word $LC3
.word $LC4
.word $LC5
.sdata
.align 2
$LC5:
.ascii "Eephole\000"
.rdata
.align 2
$LC4:
.ascii "Peephole\000"
.align 2
$LC3:
.ascii "Optimization\000"
.align 2
$LC2:
.ascii "Practicum\000"
.align 2
$LC1:
.ascii "Ertalerbouw\000"
.align 2
$LC0:
.ascii "Vertalerbouw\000"
.text
.align 2
.globl is_vowel
.sdata
.align 2
$LC6:
.ascii "%s\000"
.align 2
$LC7:
.ascii " %s\000"
.align 2
$LC8:
.ascii "\n\000"
.text
.align 2
.globl do_perm
.align 2
.globl main
.comm acron,12
.comm command,100
.comm done,24
.comm pindex,28
.text
.loc 1 10
.ent is_vowel
is_vowel:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
move $3,$4
sb $3,0($fp)
move $2,$0
lb $4,0($fp)
li $5,0x00000041 # 65
beq $4,$5,$L3
lb $4,0($fp)
li $5,0x00000045 # 69
beq $4,$5,$L3
lb $4,0($fp)
li $5,0x00000049 # 73
beq $4,$5,$L3
lb $4,0($fp)
li $5,0x0000004f # 79
beq $4,$5,$L3
lb $4,0($fp)
li $5,0x00000055 # 85
beq $4,$5,$L3
lb $4,0($fp)
li $5,0x00000059 # 89
bne $4,$5,$L2
$L3:
li $2,0x00000001 # 1
$L2:
j $L1
$L1:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end is_vowel
.loc 1 15
.ent do_perm
do_perm:
.frame $fp,56,$31 # vars= 24, regs= 4/0, args= 16, extra= 0
.mask 0xc0030000,-4
.fmask 0x00000000,0
subu $sp,$sp,56
sw $31,52($sp)
sw $fp,48($sp)
sw $17,44($sp)
sw $16,40($sp)
move $fp,$sp
sw $4,56($fp)
sw $5,60($fp)
sw $6,64($fp)
sw $7,68($fp)
sw $0,24($fp)
lw $2,64($fp)
li $3,0x00000001 # 1
bne $2,$3,$L5
lw $2,pindex
move $3,$2
sll $2,$3,2
la $3,w
addu $2,$2,$3
lw $3,0($2)
lb $4,0($3)
jal is_vowel
bne $2,$0,$L5
lw $2,56($fp)
move $3,$2
sll $2,$3,2
la $3,w
addu $2,$2,$3
lw $3,0($2)
lb $4,0($3)
jal is_vowel
beq $2,$0,$L4
$L5:
lw $2,64($fp)
slt $3,$2,2
bne $3,$0,$L6
lw $2,64($fp)
move $3,$2
sll $2,$3,2
la $3,pindex-8
addu $2,$2,$3
lw $3,0($2)
move $2,$3
sll $3,$2,2
la $4,w
addu $2,$3,$4
lw $3,0($2)
lb $4,0($3)
jal is_vowel
move $16,$2
lw $2,64($fp)
move $3,$2
sll $2,$3,2
la $3,pindex-4
addu $2,$2,$3
lw $3,0($2)
move $2,$3
sll $3,$2,2
la $4,w
addu $2,$3,$4
lw $3,0($2)
lb $4,0($3)
jal is_vowel
move $17,$2
lw $2,56($fp)
move $3,$2
sll $2,$3,2
la $3,w
addu $2,$2,$3
lw $3,0($2)
lb $4,0($3)
jal is_vowel
addu $3,$16,$17
addu $2,$3,$2
sw $2,24($fp)
lw $2,24($fp)
beq $2,$0,$L8
lw $2,24($fp)
li $3,0x00000003 # 3
bne $2,$3,$L7
$L8:
j $L4
$L7:
$L6:
lw $2,64($fp)
addu $3,$2,1
sw $3,64($fp)
sll $3,$2,2
la $4,pindex
addu $2,$3,$4
lw $3,56($fp)
sw $3,0($2)
lw $2,64($fp)
slt $3,$2,6
beq $3,$0,$L9
lw $3,68($fp)
subu $2,$3,1
move $3,$2
sw $3,68($fp)
beq $3,$0,$L9
sw $0,16($fp)
$L10:
lw $2,16($fp)
slt $3,$2,6
beq $3,$0,$L11
$L13:
lw $2,16($fp)
move $3,$2
sll $2,$3,2
lw $3,60($fp)
addu $2,$2,$3
lw $3,0($2)
bne $3,$0,$L14
lw $2,16($fp)
move $3,$2
sll $2,$3,2
lw $3,60($fp)
addu $2,$2,$3
li $3,0x00000001 # 1
sw $3,0($2)
lw $4,16($fp)
lw $5,60($fp)
lw $6,64($fp)
lw $7,68($fp)
jal do_perm
lw $2,16($fp)
move $3,$2
sll $2,$3,2
lw $3,60($fp)
addu $2,$2,$3
sw $0,0($2)
$L14:
$L12:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L10
$L11:
j $L15
$L9:
sw $0,28($fp)
sw $0,20($fp)
$L16:
lw $2,20($fp)
lw $3,64($fp)
slt $2,$2,$3
beq $2,$0,$L17
$L19:
sw $0,32($fp)
$L20:
lw $2,20($fp)
move $3,$2
sll $2,$3,2
la $3,pindex
addu $2,$2,$3
lw $3,0($2)
move $2,$3
sll $3,$2,2
la $4,w
addu $2,$3,$4
lw $3,0($2)
lw $4,32($fp)
addu $2,$3,$4
lb $4,0($2)
jal isupper
beq $2,$0,$L21
$L22:
lw $2,28($fp)
addu $3,$2,1
sw $3,28($fp)
lw $3,20($fp)
move $4,$3
sll $3,$4,2
la $4,pindex
addu $3,$3,$4
lw $4,0($3)
move $3,$4
sll $4,$3,2
la $5,w
addu $3,$4,$5
lw $4,32($fp)
addu $5,$4,1
sw $5,32($fp)
lw $5,0($3)
addu $3,$4,$5
lbu $4,0($3)
sb $4,acron($2)
j $L20
$L21:
$L18:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L16
$L17:
lw $2,28($fp)
la $3,acron
addu $2,$2,$3
sb $0,0($2)
la $4,$LC6
la $5,acron
jal printf
sw $0,20($fp)
$L23:
lw $2,20($fp)
lw $3,64($fp)
slt $2,$2,$3
beq $2,$0,$L24
$L26:
lw $2,20($fp)
move $3,$2
sll $2,$3,2
la $3,pindex
addu $2,$2,$3
lw $3,0($2)
move $2,$3
sll $3,$2,2
la $4,w
addu $2,$3,$4
la $4,$LC7
lw $5,0($2)
jal printf
$L25:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L23
$L24:
la $4,$LC8
jal printf
$L15:
$L4:
move $sp,$fp # sp not trusted here
lw $31,52($sp)
lw $fp,48($sp)
lw $17,44($sp)
lw $16,40($sp)
addu $sp,$sp,56
j $31
.end do_perm
.loc 1 53
.ent main
main:
.frame $fp,32,$31 # vars= 8, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,32
sw $31,28($sp)
sw $fp,24($sp)
move $fp,$sp
jal __main
li $2,0x00000004 # 4
sw $2,20($fp)
$L28:
lw $2,20($fp)
slt $3,$2,7
beq $3,$0,$L29
$L31:
sw $0,16($fp)
$L32:
lw $2,16($fp)
slt $3,$2,6
beq $3,$0,$L33
$L35:
lw $2,16($fp)
move $3,$2
sll $2,$3,2
la $3,done
addu $2,$2,$3
li $3,0x00000001 # 1
sw $3,0($2)
lw $4,16($fp)
la $5,done
move $6,$0
lw $7,20($fp)
jal do_perm
lw $2,16($fp)
move $3,$2
sll $2,$3,2
la $3,done
addu $2,$2,$3
sw $0,0($2)
$L34:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L32
$L33:
$L30:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L28
$L29:
$L27:
move $sp,$fp # sp not trusted here
lw $31,28($sp)
lw $fp,24($sp)
addu $sp,$sp,32
j $31
.end main
\ No newline at end of file
.file 1 "clinpack.c"
# GNU C 2.7.2.3 [AL 1.1, MM 40, tma 0.1] SimpleScalar running sstrix compiled by GNU C
# Cc1 defaults:
# -mgas -mgpOPT
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -O0 -o
gcc2_compiled.:
__gnu_compiled_c:
.lcomm aa.2,320000
.lcomm a.3,321600
.lcomm b.4,1600
.lcomm x.5,1600
.lcomm ipvt.6,800
.lcomm n.7,4
.lcomm i.8,4
.lcomm ntimes.9,4
.lcomm info.10,4
.lcomm lda.11,4
.lcomm ldaa.12,4
.lcomm kflops.13,4
.rdata
.align 2
$LC1:
.ascii "Unrolled \000"
.sdata
.align 2
$LC2:
.ascii "Double \000"
.rdata
.align 2
$LC3:
.ascii "Precision Linpack\n\n\000"
.align 2
$LC6:
.ascii " norm. resid resid machep\000"
.align 2
$LC7:
.ascii " x[0]-1 x[n-1]-1\n\000"
.align 2
$LC8:
.ascii "%8.1f %16.8e%16.8e%16.8e%16.8e\n\000"
.align 2
$LC9:
.ascii " times are reported for matrices of order %5d\n\000"
.align 2
$LC10:
.ascii " dgefa dgesl total kflops unit\000"
.align 2
$LC11:
.ascii " ratio\n\000"
.align 2
$LC14:
.ascii " times for array with leading dimension of%5d\n\000"
.align 2
$LC16:
.ascii " times for array with leading dimension of%4d\n\000"
.align 2
$LC17:
.ascii " Precision %5d Kflops ; %d Reps \n\000"
.sdata
.align 3
$LC0:
.word 0x3126e979 # 0.056000000000000001166
.word 0x3facac08
.align 3
$LC4:
.word 0x00000000 # 3
.word 0x40080000
.align 3
$LC5:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC12:
.word 0x00000000 # 1000
.word 0x408f4000
.align 3
$LC13:
.word 0x00000000 # 2000
.word 0x409f4000
.align 3
$LC15:
.word 0x00000000 # 0.5
.word 0x3fe00000
.text
.align 2
.globl main
.rdata
.align 2
$LC18:
.ascii "%11.2f%11.2f%11.2f%11.0f%11.2f%11.2f\n\000"
.text
.align 2
.globl print_time
.sdata
.align 3
$LC19:
.word 0x00000000 # 32768
.word 0x40e00000
.align 3
$LC20:
.word 0x00000000 # 16384
.word 0x40d00000
.text
.align 2
.globl matgen
.sdata
.align 3
$LC21:
.word 0x00000000 # -1
.word 0xbff00000
.text
.align 2
.globl dgefa
.align 2
.globl dgesl
.align 2
.globl daxpy
.align 2
.globl ddot
.align 2
.globl dscal
.align 2
.globl idamax
.sdata
.align 3
$LC22:
.word 0x55555555 # 1.3333333333333332593
.word 0x3ff55555
.align 3
$LC23:
.word 0x00000000 # 1
.word 0x3ff00000
.text
.align 2
.globl epslon
.align 2
.globl dmxpy
.sdata
.align 3
$LC24:
.word 0xa0b5ed8d # 9.9999999999999995475e-07
.word 0x3eb0c6f7
.text
.align 2
.globl dtime
.lcomm st,384
.comm rusage,72
.text
.loc 1 72
.ent main
main:
.frame $fp,168,$31 # vars= 96, regs= 2/2, args= 48, extra= 0
.mask 0xc0000000,-20
.fmask 0x00f00000,-4
subu $sp,$sp,168
sw $31,148($sp)
sw $fp,144($sp)
s.d $f22,160($sp)
s.d $f20,152($sp)
move $fp,$sp
jal __main
li $2,0x000000c9 # 201
sw $2,lda.11
li $2,0x000000c8 # 200
sw $2,ldaa.12
l.d $f0,$LC0
s.d $f0,48($fp)
li $2,0x00000019 # 25
sw $2,n.7
la $4,$LC1
jal printf
la $4,$LC2
jal printf
la $4,$LC3
jal printf
lw $2,n.7
lw $3,n.7
mult $2,$3
mflo $2
lw $3,n.7
mult $2,$3
mflo $2
mtc1 $2,$f20
#nop
cvt.d.w $f20,$f20
add.d $f0,$f20,$f20
l.d $f2,$LC4
div.d $f0,$f0,$f2
lw $2,n.7
lw $3,n.7
mult $2,$3
mflo $2
mtc1 $2,$f22
#nop
cvt.d.w $f22,$f22
add.d $f2,$f22,$f22
add.d $f0,$f0,$f2
s.d $f0,56($fp)
addu $2,$fp,72
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+48
l.d $f0,st
l.d $f2,st+48
add.d $f0,$f0,$f2
s.d $f0,64($fp)
sw $0,i.8
$L2:
lw $2,i.8
lw $3,n.7
slt $2,$2,$3
bne $2,$0,$L5
j $L3
$L5:
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,x.5
addu $2,$2,$3
lw $3,i.8
move $4,$3
sll $3,$4,3
la $4,b.4
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
$L4:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L2
$L3:
addu $2,$fp,72
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,b.4
jal matgen
sw $0,i.8
$L6:
lw $2,i.8
lw $3,n.7
slt $2,$2,$3
bne $2,$0,$L9
j $L7
$L9:
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,b.4
addu $2,$2,$3
lw $3,i.8
move $4,$3
sll $3,$4,3
la $4,b.4
addu $3,$3,$4
l.d $f0,0($3)
neg.d $f2,$f0
s.d $f2,0($2)
$L8:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L6
$L7:
la $2,x.5
sw $2,16($sp)
la $2,a.3
sw $2,20($sp)
lw $4,n.7
la $5,b.4
lw $6,n.7
lw $7,lda.11
jal dmxpy
dsz 88($fp)
dsz 80($fp)
sw $0,i.8
$L10:
lw $2,i.8
lw $3,n.7
slt $2,$2,$3
bne $2,$0,$L13
j $L11
$L13:
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,b.4
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,88($fp)
c.lt.d $f0,$f2
bc1f $L14
l.d $f0,88($fp)
j $L15
$L14:
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,b.4
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
$L15:
s.d $f0,88($fp)
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,x.5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,80($fp)
c.lt.d $f0,$f2
bc1f $L16
l.d $f0,80($fp)
j $L17
$L16:
lw $2,i.8
move $3,$2
sll $2,$3,3
la $3,x.5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
$L17:
s.d $f0,80($fp)
$L12:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L10
$L11:
l.d $f12,$LC5
jal epslon
s.d $f0,104($fp)
l.s $f0,n.7
#nop
cvt.d.w $f0,$f0
l.d $f2,72($fp)
mul.d $f0,$f0,$f2
l.d $f2,80($fp)
mul.d $f0,$f0,$f2
l.d $f2,104($fp)
mul.d $f0,$f0,$f2
l.d $f2,88($fp)
div.d $f0,$f2,$f0
s.d $f0,96($fp)
la $4,$LC6
jal printf
la $4,$LC7
jal printf
l.d $f0,88($fp)
s.d $f0,16($sp)
l.d $f0,104($fp)
s.d $f0,24($sp)
l.d $f0,x.5
l.d $f2,$LC5
sub.d $f0,$f0,$f2
s.d $f0,32($sp)
lw $2,n.7
move $3,$2
sll $2,$3,3
addu $2,$2,$3
l.d $f0,0($2)
l.d $f2,$LC5
sub.d $f0,$f0,$f2
s.d $f0,40($sp)
la $4,$LC8
dlw $6,96($fp)
jal printf
la $4,$LC9
lw $5,n.7
jal printf
la $4,$LC10
jal printf
la $4,$LC11
jal printf
l.d $f0,64($fp)
s.d $f0,st+96
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+144
l.d $f0,$LC13
l.d $f2,st+144
div.d $f0,$f0,$f2
s.d $f0,st+192
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+240
la $4,$LC14
lw $5,lda.11
jal printf
move $4,$0
jal print_time
addu $2,$fp,72
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+8
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+56
l.d $f0,st+8
l.d $f2,st+56
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+104
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+152
l.d $f0,$LC13
l.d $f2,st+152
div.d $f0,$f0,$f2
s.d $f0,st+200
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+248
addu $2,$fp,72
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+16
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+64
l.d $f0,st+16
l.d $f2,st+64
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+112
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+160
l.d $f0,$LC13
l.d $f2,st+160
div.d $f0,$f0,$f2
s.d $f0,st+208
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+256
li $2,0x00000001 # 1
sw $2,ntimes.9
dsz 136($fp)
jal dtime
s.d $f0,120($fp)
sw $0,i.8
$L18:
lw $2,i.8
lw $3,ntimes.9
slt $2,$2,$3
bne $2,$0,$L21
j $L19
$L21:
jal dtime
s.d $f0,128($fp)
addu $2,$fp,72
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
l.d $f2,136($fp)
add.d $f0,$f0,$f2
l.d $f2,128($fp)
sub.d $f0,$f0,$f2
s.d $f0,136($fp)
la $2,info.10
sw $2,16($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgefa
$L20:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L18
$L19:
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
l.d $f2,136($fp)
sub.d $f0,$f0,$f2
l.s $f2,ntimes.9
#nop
cvt.d.w $f2,$f2
div.d $f0,$f0,$f2
s.d $f0,st+24
jal dtime
s.d $f0,120($fp)
sw $0,i.8
$L22:
lw $2,i.8
lw $3,ntimes.9
slt $2,$2,$3
bne $2,$0,$L25
j $L23
$L25:
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,a.3
lw $5,lda.11
lw $6,n.7
la $7,ipvt.6
jal dgesl
$L24:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L22
$L23:
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
l.s $f2,ntimes.9
#nop
cvt.d.w $f2,$f2
div.d $f0,$f0,$f2
s.d $f0,st+72
l.d $f0,st+24
l.d $f2,st+72
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+120
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+168
l.d $f0,$LC13
l.d $f2,st+168
div.d $f0,$f0,$f2
s.d $f0,st+216
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+264
li $4,0x00000001 # 1
jal print_time
li $4,0x00000002 # 2
jal print_time
li $4,0x00000003 # 3
jal print_time
addu $2,$fp,72
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+32
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+80
l.d $f0,st+32
l.d $f2,st+80
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+128
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+176
l.d $f0,$LC13
l.d $f2,st+176
div.d $f0,$f0,$f2
s.d $f0,st+224
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+272
addu $2,$fp,72
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+40
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+88
l.d $f0,st+40
l.d $f2,st+88
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+136
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+184
l.d $f0,$LC13
l.d $f2,st+184
div.d $f0,$f0,$f2
s.d $f0,st+232
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+280
addu $2,$fp,72
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
s.d $f0,120($fp)
la $2,info.10
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgefa
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+48
jal dtime
s.d $f0,120($fp)
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgesl
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
s.d $f0,st+96
l.d $f0,st+48
l.d $f2,st+96
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+144
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+192
l.d $f0,$LC13
l.d $f2,st+192
div.d $f0,$f0,$f2
s.d $f0,st+240
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+288
li $2,0x00000001 # 1
sw $2,ntimes.9
dsz 136($fp)
jal dtime
s.d $f0,120($fp)
sw $0,i.8
$L26:
lw $2,i.8
lw $3,ntimes.9
slt $2,$2,$3
bne $2,$0,$L29
j $L27
$L29:
jal dtime
s.d $f0,128($fp)
addu $2,$fp,72
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,b.4
jal matgen
jal dtime
l.d $f2,136($fp)
add.d $f0,$f0,$f2
l.d $f2,128($fp)
sub.d $f0,$f0,$f2
s.d $f0,136($fp)
la $2,info.10
sw $2,16($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgefa
$L28:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L26
$L27:
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
l.d $f2,136($fp)
sub.d $f0,$f0,$f2
l.s $f2,ntimes.9
#nop
cvt.d.w $f2,$f2
div.d $f0,$f0,$f2
s.d $f0,st+56
jal dtime
s.d $f0,120($fp)
sw $0,i.8
$L30:
lw $2,i.8
lw $3,ntimes.9
slt $2,$2,$3
bne $2,$0,$L33
j $L31
$L33:
la $2,b.4
sw $2,16($sp)
sw $0,20($sp)
la $4,aa.2
lw $5,ldaa.12
lw $6,n.7
la $7,ipvt.6
jal dgesl
$L32:
lw $3,i.8
addu $2,$3,1
move $3,$2
sw $3,i.8
j $L30
$L31:
jal dtime
l.d $f2,120($fp)
sub.d $f0,$f0,$f2
l.s $f2,ntimes.9
#nop
cvt.d.w $f2,$f2
div.d $f0,$f0,$f2
s.d $f0,st+104
l.d $f0,st+56
l.d $f2,st+104
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.d $f0,64($fp)
s.d $f0,st+152
l.d $f0,64($fp)
l.d $f2,$LC12
mul.d $f0,$f0,$f2
l.d $f2,56($fp)
div.d $f0,$f2,$f0
s.d $f0,st+200
l.d $f0,$LC13
l.d $f2,st+200
div.d $f0,$f0,$f2
s.d $f0,st+248
l.d $f0,64($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
s.d $f0,st+296
l.d $f0,st+168
mtc1 $0,$f2
mtc1 $0,$f3
c.lt.d $f0,$f2
bc1f $L34
dsz st+168
$L34:
l.d $f0,st+200
mtc1 $0,$f2
mtc1 $0,$f3
c.lt.d $f0,$f2
bc1f $L35
dsz st+200
$L35:
l.d $f0,st+168
s.d $f0,112($fp)
l.d $f0,st+200
l.d $f2,st+168
c.lt.d $f0,$f2
bc1f $L36
l.d $f0,st+200
s.d $f0,112($fp)
$L36:
l.d $f0,112($fp)
l.d $f2,$LC15
add.d $f0,$f0,$f2
trunc.w.d $f4,$f0,$8
s.s $f4,kflops.13
la $4,$LC16
lw $5,ldaa.12
jal printf
li $4,0x00000004 # 4
jal print_time
li $4,0x00000005 # 5
jal print_time
li $4,0x00000006 # 6
jal print_time
li $4,0x00000007 # 7
jal print_time
la $4,$LC1
jal printf
la $4,$LC2
jal printf
la $4,$LC17
lw $5,kflops.13
li $6,0x00000001 # 1
jal printf
$L1:
move $sp,$fp # sp not trusted here
lw $31,148($sp)
lw $fp,144($sp)
l.d $f22,160($sp)
l.d $f20,152($sp)
addu $sp,$sp,168
j $31
.end main
.loc 1 300
.ent print_time
print_time:
.frame $fp,64,$31 # vars= 0, regs= 2/0, args= 56, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,64
sw $31,60($sp)
sw $fp,56($sp)
move $fp,$sp
sw $4,64($fp)
lw $2,64($fp)
move $3,$2
sll $2,$3,3
la $3,st
addu $2,$2,$3
lw $3,64($fp)
move $4,$3
sll $3,$4,3
la $4,st+48
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,16($sp)
lw $3,64($fp)
move $4,$3
sll $3,$4,3
la $4,st+96
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,24($sp)
lw $3,64($fp)
move $4,$3
sll $3,$4,3
la $4,st+144
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,32($sp)
lw $3,64($fp)
move $4,$3
sll $3,$4,3
la $4,st+192
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,40($sp)
lw $3,64($fp)
move $4,$3
sll $3,$4,3
la $4,st+240
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,48($sp)
la $4,$LC18
dlw $6,0($2)
jal printf
$L37:
move $sp,$fp # sp not trusted here
lw $31,60($sp)
lw $fp,56($sp)
addu $sp,$sp,64
j $31
.end print_time
.loc 1 309
.ent matgen
matgen:
.frame $fp,24,$31 # vars= 16, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,24
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
sw $5,28($fp)
sw $6,32($fp)
sw $7,36($fp)
li $2,0x0000052d # 1325
sw $2,0($fp)
lw $2,40($fp)
dsz 0($2)
sw $0,8($fp)
$L39:
lw $2,8($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L42
j $L40
$L42:
sw $0,4($fp)
$L43:
lw $2,4($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L46
j $L44
$L46:
lw $3,0($fp)
move $4,$3
sll $2,$4,1
addu $2,$2,$3
sll $4,$2,6
addu $2,$2,$4
sll $4,$2,2
addu $4,$4,$3
sll $2,$4,2
addu $2,$2,$3
move $3,$2
bgez $3,$L47
li $4,0x0000ffff # 65535
addu $3,$3,$4
$L47:
sra $3,$3,16
move $4,$3
sll $3,$4,16
subu $2,$2,$3
sw $2,0($fp)
lw $2,28($fp)
lw $3,8($fp)
mult $2,$3
mflo $2
lw $3,4($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,24($fp)
addu $2,$2,$3
l.s $f0,0($fp)
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC19
sub.d $f0,$f0,$f2
l.d $f2,$LC20
div.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,40($fp)
lw $3,28($fp)
lw $4,8($fp)
mult $3,$4
mflo $3
lw $4,4($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,24($fp)
addu $3,$3,$4
lw $4,40($fp)
l.d $f0,0($3)
l.d $f2,0($4)
c.lt.d $f2,$f0
bc1f $L48
lw $3,28($fp)
lw $4,8($fp)
mult $3,$4
mflo $3
lw $4,4($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,24($fp)
addu $3,$3,$4
l.d $f0,0($3)
j $L49
$L48:
lw $3,40($fp)
l.d $f0,0($3)
$L49:
s.d $f0,0($2)
$L45:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L43
$L44:
$L41:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L39
$L40:
.set noreorder
nop
.set reorder
sw $0,4($fp)
$L50:
lw $2,4($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L53
j $L51
$L53:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
dsz 0($2)
$L52:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L50
$L51:
.set noreorder
nop
.set reorder
sw $0,8($fp)
$L54:
lw $2,8($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L57
j $L55
$L57:
sw $0,4($fp)
$L58:
lw $2,4($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L61
j $L59
$L61:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,36($fp)
addu $3,$3,$4
lw $4,28($fp)
lw $5,8($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,24($fp)
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
add.d $f0,$f0,$f2
s.d $f0,0($2)
$L60:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L58
$L59:
$L56:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L54
$L55:
$L38:
move $sp,$fp # sp not trusted here
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end matgen
.loc 1 339
.ent dgefa
dgefa:
.frame $fp,72,$31 # vars= 32, regs= 2/0, args= 32, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,72
sw $31,68($sp)
sw $fp,64($sp)
move $fp,$sp
sw $4,72($fp)
sw $5,76($fp)
sw $6,80($fp)
sw $7,84($fp)
lw $2,88($fp)
sw $0,0($2)
lw $2,80($fp)
subu $3,$2,1
sw $3,56($fp)
lw $2,56($fp)
bltz $2,$L63
sw $0,44($fp)
$L64:
lw $2,44($fp)
lw $3,56($fp)
slt $2,$2,$3
bne $2,$0,$L67
j $L65
$L67:
lw $2,44($fp)
addu $3,$2,1
sw $3,48($fp)
lw $2,80($fp)
lw $3,44($fp)
subu $2,$2,$3
lw $3,76($fp)
lw $4,44($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,72($fp)
addu $3,$3,$4
move $4,$2
move $5,$3
li $6,0x00000001 # 1
jal idamax
lw $3,44($fp)
addu $2,$2,$3
sw $2,52($fp)
lw $2,44($fp)
move $3,$2
sll $2,$3,2
lw $3,84($fp)
addu $2,$2,$3
lw $3,52($fp)
sw $3,0($2)
lw $2,76($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
lw $3,52($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,0($2)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1t $L68
lw $2,52($fp)
lw $3,44($fp)
beq $2,$3,$L69
lw $2,76($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
lw $3,52($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,32($fp)
lw $2,76($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
lw $3,52($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
lw $3,76($fp)
lw $4,44($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,72($fp)
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
lw $2,76($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
lw $3,44($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,32($fp)
s.d $f0,0($2)
$L69:
lw $2,76($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
lw $3,44($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,$LC21
l.d $f2,0($2)
div.d $f0,$f0,$f2
s.d $f0,32($fp)
lw $3,80($fp)
subu $2,$3,1
lw $3,44($fp)
subu $2,$2,$3
lw $3,76($fp)
lw $4,44($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $3,72($fp)
addu $4,$3,$4
sw $4,16($sp)
li $3,0x00000001 # 1
sw $3,20($sp)
move $4,$2
dlw $6,32($fp)
jal dscal
lw $2,48($fp)
sw $2,40($fp)
$L70:
lw $2,40($fp)
lw $3,80($fp)
slt $2,$2,$3
bne $2,$0,$L73
j $L71
$L73:
lw $2,76($fp)
lw $3,40($fp)
mult $2,$3
mflo $2
lw $3,52($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,32($fp)
lw $2,52($fp)
lw $3,44($fp)
beq $2,$3,$L74
lw $2,76($fp)
lw $3,40($fp)
mult $2,$3
mflo $2
lw $3,52($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
lw $3,76($fp)
lw $4,40($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,72($fp)
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
lw $2,76($fp)
lw $3,40($fp)
mult $2,$3
mflo $2
lw $3,44($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
l.d $f0,32($fp)
s.d $f0,0($2)
$L74:
lw $3,80($fp)
subu $2,$3,1
lw $3,44($fp)
subu $2,$2,$3
lw $3,76($fp)
lw $4,44($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $3,72($fp)
addu $4,$3,$4
sw $4,16($sp)
li $3,0x00000001 # 1
sw $3,20($sp)
lw $3,76($fp)
lw $4,40($fp)
mult $3,$4
mflo $3
lw $4,44($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $3,72($fp)
addu $4,$3,$4
sw $4,24($sp)
li $3,0x00000001 # 1
sw $3,28($sp)
move $4,$2
dlw $6,32($fp)
jal daxpy
$L72:
lw $3,40($fp)
addu $2,$3,1
move $3,$2
sw $3,40($fp)
j $L70
$L71:
j $L75
$L68:
lw $2,88($fp)
lw $3,44($fp)
sw $3,0($2)
$L75:
$L66:
lw $3,44($fp)
addu $2,$3,1
move $3,$2
sw $3,44($fp)
j $L64
$L65:
$L63:
lw $2,80($fp)
move $3,$2
sll $2,$3,2
lw $4,84($fp)
addu $3,$2,$4
subu $2,$3,4
lw $3,80($fp)
subu $4,$3,1
sw $4,0($2)
lw $3,80($fp)
subu $2,$3,1
lw $3,76($fp)
mult $2,$3
mflo $2
lw $3,80($fp)
addu $2,$2,$3
move $3,$2
sll $2,$3,3
lw $3,72($fp)
addu $2,$2,$3
subu $3,$2,8
l.d $f0,0($3)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1f $L76
lw $2,88($fp)
lw $3,80($fp)
subu $4,$3,1
sw $4,0($2)
$L76:
$L62:
move $sp,$fp # sp not trusted here
lw $31,68($sp)
lw $fp,64($sp)
addu $sp,$sp,72
j $31
.end dgefa
.loc 1 455
.ent dgesl
dgesl:
.frame $fp,64,$31 # vars= 24, regs= 2/0, args= 32, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,64
sw $31,60($sp)
sw $fp,56($sp)
move $fp,$sp
sw $4,64($fp)
sw $5,68($fp)
sw $6,72($fp)
sw $7,76($fp)
lw $2,72($fp)
subu $3,$2,1
sw $3,52($fp)
lw $2,84($fp)
bne $2,$0,$L78
lw $2,52($fp)
blez $2,$L79
sw $0,40($fp)
$L80:
lw $2,40($fp)
lw $3,52($fp)
slt $2,$2,$3
bne $2,$0,$L83
j $L81
$L83:
lw $2,40($fp)
move $3,$2
sll $2,$3,2
lw $3,76($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,48($fp)
lw $2,48($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,32($fp)
lw $2,48($fp)
lw $3,40($fp)
beq $2,$3,$L84
lw $2,48($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
lw $3,40($fp)
move $4,$3
sll $3,$4,3
lw $4,80($fp)
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
l.d $f0,32($fp)
s.d $f0,0($2)
$L84:
lw $3,72($fp)
subu $2,$3,1
lw $3,40($fp)
subu $2,$2,$3
lw $3,68($fp)
lw $4,40($fp)
mult $3,$4
mflo $3
lw $4,40($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $3,64($fp)
addu $4,$3,$4
sw $4,16($sp)
li $3,0x00000001 # 1
sw $3,20($sp)
lw $3,40($fp)
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $3,80($fp)
addu $4,$3,$4
sw $4,24($sp)
li $3,0x00000001 # 1
sw $3,28($sp)
move $4,$2
dlw $6,32($fp)
jal daxpy
$L82:
lw $3,40($fp)
addu $2,$3,1
move $3,$2
sw $3,40($fp)
j $L80
$L81:
$L79:
.set noreorder
nop
.set reorder
sw $0,44($fp)
$L85:
lw $2,44($fp)
lw $3,72($fp)
slt $2,$2,$3
bne $2,$0,$L88
j $L86
$L88:
lw $3,72($fp)
subu $2,$3,1
lw $3,44($fp)
subu $2,$2,$3
sw $2,40($fp)
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
lw $3,40($fp)
move $4,$3
sll $3,$4,3
lw $4,80($fp)
addu $3,$3,$4
lw $4,68($fp)
lw $5,40($fp)
mult $4,$5
mflo $4
lw $5,40($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,64($fp)
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
div.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
l.d $f0,0($2)
neg.d $f2,$f0
s.d $f2,32($fp)
lw $2,68($fp)
lw $3,40($fp)
mult $2,$3
mflo $2
move $3,$2
sll $2,$3,3
lw $3,64($fp)
addu $2,$3,$2
sw $2,16($sp)
li $2,0x00000001 # 1
sw $2,20($sp)
lw $2,80($fp)
sw $2,24($sp)
li $2,0x00000001 # 1
sw $2,28($sp)
lw $4,40($fp)
dlw $6,32($fp)
jal daxpy
$L87:
lw $3,44($fp)
addu $2,$3,1
move $3,$2
sw $3,44($fp)
j $L85
$L86:
j $L89
$L78:
sw $0,40($fp)
$L90:
lw $2,40($fp)
lw $3,72($fp)
slt $2,$2,$3
bne $2,$0,$L93
j $L91
$L93:
lw $2,68($fp)
lw $3,40($fp)
mult $2,$3
mflo $2
move $3,$2
sll $2,$3,3
lw $3,64($fp)
addu $2,$2,$3
li $3,0x00000001 # 1
sw $3,16($sp)
lw $4,40($fp)
move $5,$2
li $6,0x00000001 # 1
lw $7,80($fp)
jal ddot
s.d $f0,32($fp)
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
lw $3,40($fp)
move $4,$3
sll $3,$4,3
lw $4,80($fp)
addu $3,$3,$4
l.d $f0,0($3)
l.d $f2,32($fp)
sub.d $f0,$f0,$f2
lw $3,68($fp)
lw $4,40($fp)
mult $3,$4
mflo $3
lw $4,40($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
lw $4,64($fp)
addu $3,$3,$4
l.d $f2,0($3)
div.d $f0,$f0,$f2
s.d $f0,0($2)
$L92:
lw $3,40($fp)
addu $2,$3,1
move $3,$2
sw $3,40($fp)
j $L90
$L91:
lw $2,52($fp)
blez $2,$L94
li $2,0x00000001 # 1
sw $2,44($fp)
$L95:
lw $2,44($fp)
lw $3,52($fp)
slt $2,$2,$3
bne $2,$0,$L98
j $L96
$L98:
lw $3,72($fp)
subu $2,$3,1
lw $3,44($fp)
subu $2,$2,$3
sw $2,40($fp)
lw $3,72($fp)
subu $2,$3,1
lw $3,40($fp)
subu $2,$2,$3
lw $3,68($fp)
lw $4,40($fp)
mult $3,$4
mflo $3
lw $4,40($fp)
addu $3,$3,$4
move $4,$3
sll $3,$4,3
addu $4,$3,8
lw $5,64($fp)
addu $3,$4,$5
lw $4,40($fp)
move $5,$4
sll $4,$5,3
addu $5,$4,8
lw $4,80($fp)
addu $7,$5,$4
li $4,0x00000001 # 1
sw $4,16($sp)
move $4,$2
move $5,$3
li $6,0x00000001 # 1
jal ddot
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
lw $3,40($fp)
move $4,$3
sll $3,$4,3
lw $4,80($fp)
addu $3,$3,$4
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
lw $2,40($fp)
move $3,$2
sll $2,$3,2
lw $3,76($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,48($fp)
lw $2,48($fp)
lw $3,40($fp)
beq $2,$3,$L99
lw $2,48($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,32($fp)
lw $2,48($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
lw $3,40($fp)
move $4,$3
sll $3,$4,3
lw $4,80($fp)
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,80($fp)
addu $2,$2,$3
l.d $f0,32($fp)
s.d $f0,0($2)
$L99:
$L97:
lw $3,44($fp)
addu $2,$3,1
move $3,$2
sw $3,44($fp)
j $L95
$L96:
$L94:
$L89:
$L77:
move $sp,$fp # sp not trusted here
lw $31,60($sp)
lw $fp,56($sp)
addu $sp,$sp,64
j $31
.end dgesl
.loc 1 585
.ent daxpy
daxpy:
.frame $fp,32,$31 # vars= 24, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,32
sw $fp,24($sp)
move $fp,$sp
sw $4,32($fp)
dsw $6,40($fp)
lw $2,32($fp)
bgtz $2,$L101
j $L100
$L101:
l.d $f0,40($fp)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1f $L102
j $L100
$L102:
lw $2,52($fp)
li $3,0x00000001 # 1
bne $2,$3,$L104
lw $2,60($fp)
li $3,0x00000001 # 1
bne $2,$3,$L104
j $L103
$L104:
li $2,0x00000001 # 1
sw $2,4($fp)
li $2,0x00000001 # 1
sw $2,8($fp)
lw $2,52($fp)
bgez $2,$L105
lw $3,32($fp)
subu $2,$0,$3
addu $3,$2,1
lw $4,52($fp)
mult $3,$4
mflo $2
addu $3,$2,1
sw $3,4($fp)
$L105:
lw $2,60($fp)
bgez $2,$L106
lw $3,32($fp)
subu $2,$0,$3
addu $3,$2,1
lw $4,60($fp)
mult $3,$4
mflo $2
addu $3,$2,1
sw $3,8($fp)
$L106:
.set noreorder
nop
.set reorder
sw $0,0($fp)
$L107:
lw $2,0($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L110
j $L108
$L110:
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $3,56($fp)
addu $2,$2,$3
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,56($fp)
addu $3,$3,$4
lw $4,4($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
l.d $f0,40($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
lw $2,4($fp)
lw $3,52($fp)
addu $2,$2,$3
sw $2,4($fp)
lw $2,8($fp)
lw $3,60($fp)
addu $2,$2,$3
sw $2,8($fp)
$L109:
lw $3,0($fp)
addu $2,$3,1
move $3,$2
sw $3,0($fp)
j $L107
$L108:
j $L100
$L103:
lw $2,32($fp)
move $3,$2
bgez $3,$L111
addu $3,$3,3
$L111:
sra $3,$3,2
move $4,$3
sll $3,$4,2
subu $2,$2,$3
sw $2,12($fp)
lw $2,12($fp)
beq $2,$0,$L112
sw $0,0($fp)
$L113:
lw $2,0($fp)
lw $3,12($fp)
slt $2,$2,$3
bne $2,$0,$L116
j $L114
$L116:
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $3,56($fp)
addu $2,$2,$3
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,56($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
l.d $f0,40($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
$L115:
lw $3,0($fp)
addu $2,$3,1
move $3,$2
sw $3,0($fp)
j $L113
$L114:
lw $2,32($fp)
slt $3,$2,4
bne $3,$0,$L100
$L117:
$L112:
.set noreorder
nop
.set reorder
lw $2,12($fp)
sw $2,0($fp)
$L118:
lw $2,0($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L121
j $L119
$L121:
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $3,56($fp)
addu $2,$2,$3
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,56($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
l.d $f0,40($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,56($fp)
addu $3,$2,$4
addu $2,$3,8
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,56($fp)
addu $4,$3,$5
addu $3,$4,8
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
addu $5,$4,8
l.d $f0,40($fp)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,56($fp)
addu $3,$2,$4
addu $2,$3,16
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,56($fp)
addu $4,$3,$5
addu $3,$4,16
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
addu $5,$4,16
l.d $f0,40($fp)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,56($fp)
addu $3,$2,$4
addu $2,$3,24
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,56($fp)
addu $4,$3,$5
addu $3,$4,24
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,48($fp)
addu $4,$4,$5
addu $5,$4,24
l.d $f0,40($fp)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
$L120:
lw $2,0($fp)
addu $3,$2,4
sw $3,0($fp)
j $L118
$L119:
$L100:
move $sp,$fp # sp not trusted here
lw $fp,24($sp)
addu $sp,$sp,32
j $31
.end daxpy
.loc 1 641
.ent ddot
ddot:
.frame $fp,40,$31 # vars= 32, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,40
sw $fp,32($sp)
move $fp,$sp
sw $4,40($fp)
sw $5,44($fp)
sw $6,48($fp)
sw $7,52($fp)
dsz 0($fp)
lw $2,40($fp)
bgtz $2,$L123
mtc1 $0,$f0
mtc1 $0,$f1
j $L122
$L123:
lw $2,48($fp)
li $3,0x00000001 # 1
bne $2,$3,$L125
lw $2,56($fp)
li $3,0x00000001 # 1
bne $2,$3,$L125
j $L124
$L125:
sw $0,12($fp)
sw $0,16($fp)
lw $2,48($fp)
bgez $2,$L126
lw $3,40($fp)
subu $2,$0,$3
addu $3,$2,1
lw $2,48($fp)
mult $3,$2
mflo $3
sw $3,12($fp)
$L126:
lw $2,56($fp)
bgez $2,$L127
lw $3,40($fp)
subu $2,$0,$3
addu $3,$2,1
lw $2,56($fp)
mult $3,$2
mflo $3
sw $3,16($fp)
$L127:
.set noreorder
nop
.set reorder
sw $0,8($fp)
$L128:
lw $2,8($fp)
lw $3,40($fp)
slt $2,$2,$3
bne $2,$0,$L131
j $L129
$L131:
lw $2,12($fp)
move $3,$2
sll $2,$3,3
lw $3,44($fp)
addu $2,$2,$3
lw $3,16($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
l.d $f2,0($fp)
add.d $f0,$f2,$f0
s.d $f0,0($fp)
lw $2,12($fp)
lw $3,48($fp)
addu $2,$2,$3
sw $2,12($fp)
lw $2,16($fp)
lw $3,56($fp)
addu $2,$2,$3
sw $2,16($fp)
$L130:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L128
$L129:
l.d $f0,0($fp)
j $L122
$L124:
lw $2,40($fp)
li $6,0x66666667 # 1717986919
mult $2,$6
mfhi $5
mflo $4
srl $6,$5,0
move $7,$0
sra $3,$6,1
sra $4,$2,31
subu $3,$3,$4
move $5,$3
sll $4,$5,2
addu $4,$4,$3
subu $2,$2,$4
sw $2,20($fp)
lw $2,20($fp)
beq $2,$0,$L132
sw $0,8($fp)
$L133:
lw $2,8($fp)
lw $3,20($fp)
slt $2,$2,$3
bne $2,$0,$L136
j $L134
$L136:
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $3,44($fp)
addu $2,$2,$3
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
l.d $f2,0($fp)
add.d $f0,$f2,$f0
s.d $f0,0($fp)
$L135:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L133
$L134:
lw $2,40($fp)
slt $3,$2,5
beq $3,$0,$L137
l.d $f0,0($fp)
j $L122
$L137:
$L132:
.set noreorder
nop
.set reorder
lw $2,20($fp)
sw $2,8($fp)
$L138:
lw $2,8($fp)
lw $3,40($fp)
slt $2,$2,$3
bne $2,$0,$L141
j $L139
$L141:
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $3,44($fp)
addu $2,$2,$3
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
l.d $f2,0($fp)
add.d $f0,$f0,$f2
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $4,44($fp)
addu $3,$2,$4
addu $2,$3,8
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
addu $4,$3,8
l.d $f2,0($2)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $4,44($fp)
addu $3,$2,$4
addu $2,$3,16
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
addu $4,$3,16
l.d $f2,0($2)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $4,44($fp)
addu $3,$2,$4
addu $2,$3,24
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
addu $4,$3,24
l.d $f2,0($2)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $4,44($fp)
addu $3,$2,$4
addu $2,$3,32
lw $3,8($fp)
move $4,$3
sll $3,$4,3
lw $4,52($fp)
addu $3,$3,$4
addu $4,$3,32
l.d $f2,0($2)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,0($fp)
$L140:
lw $2,8($fp)
addu $3,$2,5
sw $3,8($fp)
j $L138
$L139:
l.d $f0,0($fp)
j $L122
$L122:
move $sp,$fp # sp not trusted here
lw $fp,32($sp)
addu $sp,$sp,40
j $31
.end ddot
.loc 1 699
.ent dscal
dscal:
.frame $fp,24,$31 # vars= 16, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,24
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
dsw $6,32($fp)
lw $2,24($fp)
bgtz $2,$L143
j $L142
$L143:
lw $2,44($fp)
li $3,0x00000001 # 1
beq $2,$3,$L144
lw $2,24($fp)
lw $3,44($fp)
mult $2,$3
mflo $2
sw $2,12($fp)
sw $0,0($fp)
$L145:
lw $2,0($fp)
lw $3,12($fp)
slt $2,$2,$3
bne $2,$0,$L148
j $L146
$L148:
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $3,40($fp)
addu $2,$2,$3
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
l.d $f0,32($fp)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L147:
lw $2,0($fp)
lw $3,44($fp)
addu $2,$2,$3
sw $2,0($fp)
j $L145
$L146:
j $L142
$L144:
lw $2,24($fp)
li $6,0x66666667 # 1717986919
mult $2,$6
mfhi $5
mflo $4
srl $6,$5,0
move $7,$0
sra $3,$6,1
sra $4,$2,31
subu $3,$3,$4
move $5,$3
sll $4,$5,2
addu $4,$4,$3
subu $2,$2,$4
sw $2,4($fp)
lw $2,4($fp)
beq $2,$0,$L149
sw $0,0($fp)
$L150:
lw $2,0($fp)
lw $3,4($fp)
slt $2,$2,$3
bne $2,$0,$L153
j $L151
$L153:
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $3,40($fp)
addu $2,$2,$3
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
l.d $f0,32($fp)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L152:
lw $3,0($fp)
addu $2,$3,1
move $3,$2
sw $3,0($fp)
j $L150
$L151:
lw $2,24($fp)
slt $3,$2,5
bne $3,$0,$L142
$L154:
$L149:
.set noreorder
nop
.set reorder
lw $2,4($fp)
sw $2,0($fp)
$L155:
lw $2,0($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L158
j $L156
$L158:
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $3,40($fp)
addu $2,$2,$3
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
l.d $f0,32($fp)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,40($fp)
addu $3,$2,$4
addu $2,$3,8
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
addu $4,$3,8
l.d $f0,32($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,40($fp)
addu $3,$2,$4
addu $2,$3,16
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
addu $4,$3,16
l.d $f0,32($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,40($fp)
addu $3,$2,$4
addu $2,$3,24
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
addu $4,$3,24
l.d $f0,32($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,3
lw $4,40($fp)
addu $3,$2,$4
addu $2,$3,32
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
addu $4,$3,32
l.d $f0,32($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L157:
lw $2,0($fp)
addu $3,$2,5
sw $3,0($fp)
j $L155
$L156:
$L142:
move $sp,$fp # sp not trusted here
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end dscal
.loc 1 748
.ent idamax
idamax:
.frame $fp,32,$31 # vars= 24, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,32
sw $fp,24($sp)
move $fp,$sp
sw $4,32($fp)
sw $5,36($fp)
sw $6,40($fp)
lw $2,32($fp)
bgtz $2,$L160
li $2,-1 # 0xffffffff
j $L159
$L160:
lw $2,32($fp)
li $3,0x00000001 # 1
bne $2,$3,$L161
move $2,$0
j $L159
$L161:
lw $2,40($fp)
li $3,0x00000001 # 1
beq $2,$3,$L162
li $2,0x00000001 # 1
sw $2,12($fp)
lw $2,36($fp)
l.d $f0,0($2)
abs.d $f2,$f0
s.d $f2,0($fp)
lw $2,12($fp)
lw $3,40($fp)
addu $2,$2,$3
sw $2,12($fp)
li $2,0x00000001 # 1
sw $2,8($fp)
$L163:
lw $2,8($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L166
j $L164
$L166:
lw $2,12($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,0($fp)
c.lt.d $f2,$f0
bc1f $L167
lw $2,8($fp)
sw $2,16($fp)
lw $2,12($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
l.d $f0,0($2)
abs.d $f2,$f0
s.d $f2,0($fp)
$L167:
lw $2,12($fp)
lw $3,40($fp)
addu $2,$2,$3
sw $2,12($fp)
$L165:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L163
$L164:
j $L168
$L162:
sw $0,16($fp)
lw $2,36($fp)
l.d $f0,0($2)
abs.d $f2,$f0
s.d $f2,0($fp)
li $2,0x00000001 # 1
sw $2,8($fp)
$L169:
lw $2,8($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L172
j $L170
$L172:
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,0($fp)
c.lt.d $f2,$f0
bc1f $L173
lw $2,8($fp)
sw $2,16($fp)
lw $2,8($fp)
move $3,$2
sll $2,$3,3
lw $3,36($fp)
addu $2,$2,$3
l.d $f0,0($2)
abs.d $f2,$f0
s.d $f2,0($fp)
$L173:
$L171:
lw $3,8($fp)
addu $2,$3,1
move $3,$2
sw $3,8($fp)
j $L169
$L170:
$L168:
lw $2,16($fp)
j $L159
$L159:
move $sp,$fp # sp not trusted here
lw $fp,24($sp)
addu $sp,$sp,32
j $31
.end idamax
.loc 1 789
.ent epslon
epslon:
.frame $fp,40,$31 # vars= 32, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,40
sw $fp,32($sp)
move $fp,$sp
s.d $f12,40($fp)
l.d $f0,$LC22
s.d $f0,0($fp)
dsz 24($fp)
$L175:
l.d $f0,24($fp)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1t $L177
j $L176
$L177:
l.d $f0,0($fp)
l.d $f2,$LC23
sub.d $f0,$f0,$f2
s.d $f0,8($fp)
l.d $f0,8($fp)
l.d $f2,8($fp)
add.d $f0,$f0,$f2
l.d $f2,8($fp)
add.d $f0,$f0,$f2
s.d $f0,16($fp)
l.d $f0,16($fp)
l.d $f2,$LC23
sub.d $f0,$f0,$f2
abs.d $f2,$f0
s.d $f2,24($fp)
j $L175
$L176:
l.d $f2,40($fp)
abs.d $f0,$f2
l.d $f4,24($fp)
mul.d $f2,$f0,$f4
mov.d $f0,$f2
j $L174
$L174:
move $sp,$fp # sp not trusted here
lw $fp,32($sp)
addu $sp,$sp,40
j $31
.end epslon
.loc 1 836
.ent dmxpy
dmxpy:
.frame $fp,24,$31 # vars= 16, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,24
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
sw $5,28($fp)
sw $6,32($fp)
sw $7,36($fp)
lw $2,32($fp)
sra $3,$2,31
srl $4,$3,31
addu $5,$2,$4
sra $3,$5,1
move $4,$3
sll $3,$4,1
subu $2,$2,$3
sw $2,0($fp)
lw $2,0($fp)
blez $2,$L179
lw $2,0($fp)
subu $3,$2,1
sw $3,0($fp)
sw $0,4($fp)
$L180:
lw $2,4($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L183
j $L181
$L183:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,28($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,28($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $5,40($fp)
addu $4,$4,$5
lw $5,36($fp)
lw $6,0($fp)
mult $5,$6
mflo $5
lw $6,4($fp)
addu $5,$5,$6
move $6,$5
sll $5,$6,3
lw $6,44($fp)
addu $5,$5,$6
l.d $f0,0($4)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f2,$f0
s.d $f0,0($2)
$L182:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L180
$L181:
$L179:
lw $2,32($fp)
move $3,$2
bgez $3,$L184
addu $3,$3,3
$L184:
sra $3,$3,2
move $4,$3
sll $3,$4,2
subu $2,$2,$3
sw $2,0($fp)
lw $2,0($fp)
slt $3,$2,2
bne $3,$0,$L185
lw $2,0($fp)
subu $3,$2,1
sw $3,0($fp)
sw $0,4($fp)
$L186:
lw $2,4($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L189
j $L187
$L189:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,28($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,28($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $6,40($fp)
addu $5,$4,$6
subu $4,$5,8
lw $6,0($fp)
subu $5,$6,1
lw $6,36($fp)
mult $5,$6
mflo $5
lw $6,4($fp)
addu $5,$5,$6
move $6,$5
sll $5,$6,3
lw $6,44($fp)
addu $5,$5,$6
l.d $f0,0($4)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
lw $4,36($fp)
lw $5,0($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,0($2)
$L188:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L186
$L187:
$L185:
lw $2,32($fp)
move $3,$2
bgez $3,$L190
addu $3,$3,7
$L190:
sra $3,$3,3
move $4,$3
sll $3,$4,3
subu $2,$2,$3
sw $2,0($fp)
lw $2,0($fp)
slt $3,$2,4
bne $3,$0,$L191
lw $2,0($fp)
subu $3,$2,1
sw $3,0($fp)
sw $0,4($fp)
$L192:
lw $2,4($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L195
j $L193
$L195:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,28($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,28($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $6,40($fp)
addu $5,$4,$6
subu $4,$5,24
lw $6,0($fp)
subu $5,$6,3
lw $6,36($fp)
mult $5,$6
mflo $5
lw $6,4($fp)
addu $5,$5,$6
move $6,$5
sll $5,$6,3
lw $6,44($fp)
addu $5,$5,$6
l.d $f0,0($4)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,16
lw $5,0($fp)
subu $4,$5,2
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,8
lw $5,0($fp)
subu $4,$5,1
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
lw $4,36($fp)
lw $5,0($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,0($2)
$L194:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L192
$L193:
$L191:
lw $2,32($fp)
move $3,$2
bgez $3,$L196
addu $3,$3,15
$L196:
sra $3,$3,4
move $4,$3
sll $3,$4,4
subu $2,$2,$3
sw $2,0($fp)
lw $2,0($fp)
slt $3,$2,8
bne $3,$0,$L197
lw $2,0($fp)
subu $3,$2,1
sw $3,0($fp)
sw $0,4($fp)
$L198:
lw $2,4($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L201
j $L199
$L201:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,28($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,28($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $6,40($fp)
addu $5,$4,$6
subu $4,$5,56
lw $6,0($fp)
subu $5,$6,7
lw $6,36($fp)
mult $5,$6
mflo $5
lw $6,4($fp)
addu $5,$5,$6
move $6,$5
sll $5,$6,3
lw $6,44($fp)
addu $5,$5,$6
l.d $f0,0($4)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,48
lw $5,0($fp)
subu $4,$5,6
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,40
lw $5,0($fp)
subu $4,$5,5
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,32
lw $5,0($fp)
subu $4,$5,4
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,24
lw $5,0($fp)
subu $4,$5,3
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,16
lw $5,0($fp)
subu $4,$5,2
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,8
lw $5,0($fp)
subu $4,$5,1
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
lw $4,36($fp)
lw $5,0($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,0($2)
$L200:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L198
$L199:
$L197:
lw $2,32($fp)
move $3,$2
bgez $3,$L202
addu $3,$3,15
$L202:
sra $3,$3,4
move $4,$3
sll $3,$4,4
subu $2,$2,$3
addu $3,$2,16
sw $3,8($fp)
lw $2,8($fp)
subu $3,$2,1
sw $3,0($fp)
$L203:
lw $2,0($fp)
lw $3,32($fp)
slt $2,$2,$3
bne $2,$0,$L206
j $L204
$L206:
sw $0,4($fp)
$L207:
lw $2,4($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L210
j $L208
$L210:
lw $2,4($fp)
move $3,$2
sll $2,$3,3
lw $3,28($fp)
addu $2,$2,$3
lw $3,4($fp)
move $4,$3
sll $3,$4,3
lw $4,28($fp)
addu $3,$3,$4
lw $4,0($fp)
move $5,$4
sll $4,$5,3
lw $6,40($fp)
addu $5,$4,$6
subu $4,$5,120
lw $6,0($fp)
subu $5,$6,15
lw $6,36($fp)
mult $5,$6
mflo $5
lw $6,4($fp)
addu $5,$5,$6
move $6,$5
sll $5,$6,3
lw $6,44($fp)
addu $5,$5,$6
l.d $f0,0($4)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,112
lw $5,0($fp)
subu $4,$5,14
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,104
lw $5,0($fp)
subu $4,$5,13
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,96
lw $5,0($fp)
subu $4,$5,12
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,88
lw $5,0($fp)
subu $4,$5,11
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,80
lw $5,0($fp)
subu $4,$5,10
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,72
lw $5,0($fp)
subu $4,$5,9
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,64
lw $5,0($fp)
subu $4,$5,8
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,56
lw $5,0($fp)
subu $4,$5,7
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,48
lw $5,0($fp)
subu $4,$5,6
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,40
lw $5,0($fp)
subu $4,$5,5
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,32
lw $5,0($fp)
subu $4,$5,4
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,24
lw $5,0($fp)
subu $4,$5,3
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,16
lw $5,0($fp)
subu $4,$5,2
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $5,40($fp)
addu $4,$3,$5
subu $3,$4,8
lw $5,0($fp)
subu $4,$5,1
lw $5,36($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,0($fp)
move $4,$3
sll $3,$4,3
lw $4,40($fp)
addu $3,$3,$4
lw $4,36($fp)
lw $5,0($fp)
mult $4,$5
mflo $4
lw $5,4($fp)
addu $4,$4,$5
move $5,$4
sll $4,$5,3
lw $5,44($fp)
addu $4,$4,$5
l.d $f2,0($3)
l.d $f4,0($4)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,0($2)
$L209:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L207
$L208:
$L205:
lw $2,0($fp)
addu $3,$2,16
sw $3,0($fp)
j $L203
$L204:
$L178:
move $sp,$fp # sp not trusted here
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end dmxpy
.loc 1 995
.ent dtime
dtime:
.frame $fp,32,$31 # vars= 8, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,32
sw $31,28($sp)
sw $fp,24($sp)
move $fp,$sp
move $4,$0
la $5,rusage
jal getrusage
l.s $f0,rusage
#nop
cvt.d.w $f0,$f0
s.d $f0,16($fp)
l.s $f0,rusage+4
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC24
mul.d $f0,$f0,$f2
l.d $f2,16($fp)
add.d $f0,$f2,$f0
s.d $f0,16($fp)
l.d $f0,16($fp)
j $L211
$L211:
move $sp,$fp # sp not trusted here
lw $31,28($sp)
lw $fp,24($sp)
addu $sp,$sp,32
j $31
.end dtime
\ No newline at end of file
.file 1 "dhrystone.c"
# GNU C 2.7.2.3 [AL 1.1, MM 40, tma 0.1] SimpleScalar running sstrix compiled by GNU C
# Cc1 defaults:
# -mgas -mgpOPT
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -O0 -o
gcc2_compiled.:
__gnu_compiled_c:
.globl Version
.sdata
.align 2
Version:
.ascii "1.1\000"
.text
.align 2
.globl main
.rdata
.align 2
$LC0:
.ascii "DHRYSTONE PROGRAM, SOME STRING\000"
.align 2
$LC1:
.ascii "DHRYSTONE PROGRAM, 1'ST STRING\000"
.align 2
$LC2:
.ascii "DHRYSTONE PROGRAM, 2'ND STRING\000"
.align 2
$LC3:
.ascii "Dhrystone(%s) time for %ld passes = %ld\n\000"
.align 2
$LC4:
.ascii "This machine benchmarks at %ld dhrystones/second\n\000"
.text
.align 2
.globl Proc0
.align 2
.globl Proc1
.align 2
.globl Proc2
.align 2
.globl Proc3
.align 2
.globl Proc4
.align 2
.globl Proc5
.align 2
.globl Proc6
.align 2
.globl Proc7
.align 2
.globl Proc8
.align 2
.globl Func1
.align 2
.globl Func2
.align 2
.globl Func3
.comm IntGlob,4
.comm BoolGlob,4
.comm Char1Glob,1
.comm Char2Glob,1
.comm Array1Glob,204
.comm Array2Glob,10404
.comm PtrGlb,4
.comm PtrGlbNext,4
.text
.loc 1 414
.ent main
main:
.frame $fp,24,$31 # vars= 0, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,24
sw $31,20($sp)
sw $fp,16($sp)
move $fp,$sp
jal __main
jal Proc0
move $4,$0
jal exit
$L1:
move $sp,$fp # sp not trusted here
lw $31,20($sp)
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end main
.loc 1 432
.ent Proc0
Proc0:
.frame $fp,152,$31 # vars= 120, regs= 3/0, args= 16, extra= 0
.mask 0xc0010000,-8
.fmask 0x00000000,0
subu $sp,$sp,152
sw $31,144($sp)
sw $fp,140($sp)
sw $16,136($sp)
move $fp,$sp
addu $4,$fp,120
jal times
lw $2,120($fp)
sw $2,104($fp)
move $16,$0
$L3:
sltu $2,$16,5000
beq $2,$0,$L4
$L6:
$L5:
addu $16,$16,1
j $L3
$L4:
addu $4,$fp,120
jal times
lw $2,120($fp)
lw $3,104($fp)
subu $2,$2,$3
sw $2,112($fp)
li $4,0x00000030 # 48
jal malloc
sw $2,PtrGlbNext
li $4,0x00000030 # 48
jal malloc
sw $2,PtrGlb
lw $2,PtrGlb
lw $3,PtrGlbNext
sw $3,0($2)
lw $2,PtrGlb
sw $0,4($2)
lw $2,PtrGlb
li $3,0x00000002 # 2
sw $3,8($2)
lw $2,PtrGlb
li $3,0x00000028 # 40
sw $3,12($2)
lw $3,PtrGlb
addu $2,$3,16
move $4,$2
la $5,$LC0
jal strcpy
addu $2,$fp,40
move $4,$2
la $5,$LC1
jal strcpy
li $2,0x0000000a # 10
sw $2,Array2Glob+1660
addu $4,$fp,120
jal times
lw $2,120($fp)
sw $2,104($fp)
move $16,$0
$L7:
sltu $2,$16,5000
beq $2,$0,$L8
$L10:
jal Proc5
jal Proc4
li $2,0x00000002 # 2
sw $2,16($fp)
li $2,0x00000003 # 3
sw $2,20($fp)
addu $2,$fp,72
move $4,$2
la $5,$LC2
jal strcpy
li $2,0x00000001 # 1
sw $2,32($fp)
addu $2,$fp,40
addu $3,$fp,72
move $4,$2
move $5,$3
jal Func2
xori $3,$2,0x0000
sltu $2,$3,1
sw $2,BoolGlob
$L11:
lw $2,16($fp)
lw $3,20($fp)
slt $2,$2,$3
beq $2,$0,$L12
$L13:
lw $2,16($fp)
move $4,$2
sll $3,$4,2
addu $3,$3,$2
lw $2,20($fp)
subu $3,$3,$2
sw $3,24($fp)
addu $2,$fp,24
lw $4,16($fp)
lw $5,20($fp)
move $6,$2
jal Proc7
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L11
$L12:
la $4,Array1Glob
la $5,Array2Glob
lw $6,16($fp)
lw $7,24($fp)
jal Proc8
lw $4,PtrGlb
jal Proc1
li $2,0x00000041 # 65
sb $2,29($fp)
$L14:
lb $2,29($fp)
lb $3,Char2Glob
slt $2,$3,$2
bne $2,$0,$L15
$L17:
lb $2,29($fp)
move $4,$2
li $5,0x00000043 # 67
jal Func1
lw $3,32($fp)
bne $3,$2,$L18
addu $2,$fp,32
move $4,$0
move $5,$2
jal Proc6
$L18:
$L16:
lbu $2,29($fp)
addu $3,$2,1
move $2,$3
sb $2,29($fp)
j $L14
$L15:
lw $2,20($fp)
lw $3,16($fp)
mult $2,$3
mflo $2
sw $2,24($fp)
lw $2,24($fp)
lw $3,16($fp)
div $2,$2,$3
sw $2,20($fp)
lw $2,24($fp)
lw $3,20($fp)
subu $2,$2,$3
move $4,$2
sll $3,$4,3
subu $3,$3,$2
lw $2,16($fp)
subu $3,$3,$2
sw $3,20($fp)
addu $4,$fp,16
jal Proc2
$L9:
addu $16,$16,1
j $L7
$L8:
addu $4,$fp,120
jal times
lw $2,120($fp)
lw $3,104($fp)
subu $2,$2,$3
lw $3,112($fp)
subu $2,$2,$3
sw $2,108($fp)
lw $2,108($fp)
li $6,0x51eb851f # 1374389535
mult $2,$6
mfhi $5
mflo $4
srl $6,$5,0
move $7,$0
sra $3,$6,5
sra $4,$2,31
subu $2,$3,$4
la $4,$LC3
la $5,Version
li $6,0x00001388 # 5000
move $7,$2
jal printf
li $2,0x0007a120 # 500000
lw $3,108($fp)
div $2,$2,$3
la $4,$LC4
move $5,$2
jal printf
$L2:
move $sp,$fp # sp not trusted here
lw $31,144($sp)
lw $fp,140($sp)
lw $16,136($sp)
addu $sp,$sp,152
j $31
.end Proc0
.loc 1 540
.ent Proc1
Proc1:
.frame $fp,24,$31 # vars= 0, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,24
sw $31,20($sp)
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
lw $2,24($fp)
lw $3,0($2)
lw $2,PtrGlb
move $4,$3
move $5,$2
li $6,0x00000030 # 48
jal memcpy
lw $2,24($fp)
li $3,0x00000005 # 5
sw $3,12($2)
lw $3,24($fp)
lw $2,0($3)
lw $3,24($fp)
lw $4,12($3)
sw $4,12($2)
lw $3,24($fp)
lw $2,0($3)
lw $3,24($fp)
lw $4,0($3)
sw $4,0($2)
lw $2,24($fp)
lw $3,0($2)
lw $4,0($3)
jal Proc3
lw $2,24($fp)
lw $3,0($2)
lw $2,4($3)
bne $2,$0,$L20
lw $2,24($fp)
lw $3,0($2)
li $2,0x00000006 # 6
sw $2,12($3)
lw $2,24($fp)
lw $3,24($fp)
lw $4,0($3)
addu $3,$4,8
lw $4,8($2)
move $5,$3
jal Proc6
lw $3,24($fp)
lw $2,0($3)
lw $3,PtrGlb
lw $4,0($3)
sw $4,0($2)
lw $3,24($fp)
lw $2,0($3)
lw $3,24($fp)
lw $4,0($3)
addu $3,$4,12
lw $4,12($2)
li $5,0x0000000a # 10
move $6,$3
jal Proc7
j $L21
$L20:
lw $2,24($fp)
lw $3,24($fp)
lw $4,0($3)
move $3,$4
move $4,$2
move $5,$3
li $6,0x00000030 # 48
jal memcpy
$L21:
$L19:
move $sp,$fp # sp not trusted here
lw $31,20($sp)
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end Proc1
.loc 1 563
.ent Proc2
Proc2:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
sw $4,16($fp)
lw $2,16($fp)
lw $3,0($2)
addu $2,$3,10
sw $2,0($fp)
$L23:
lb $2,Char1Glob
li $3,0x00000041 # 65
bne $2,$3,$L26
lw $3,0($fp)
subu $2,$3,1
move $3,$2
sw $3,0($fp)
lw $2,16($fp)
lw $3,0($fp)
lw $4,IntGlob
subu $3,$3,$4
sw $3,0($2)
sw $0,4($fp)
$L26:
lw $2,4($fp)
beq $2,$0,$L24
$L27:
$L25:
j $L23
$L24:
$L22:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Proc2
.loc 1 583
.ent Proc3
Proc3:
.frame $fp,24,$31 # vars= 0, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,24
sw $31,20($sp)
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
lw $2,PtrGlb
beq $2,$0,$L29
lw $2,24($fp)
lw $3,PtrGlb
lw $4,0($3)
sw $4,0($2)
j $L30
$L29:
li $2,0x00000064 # 100
sw $2,IntGlob
$L30:
lw $3,PtrGlb
addu $2,$3,12
li $4,0x0000000a # 10
lw $5,IntGlob
move $6,$2
jal Proc7
$L28:
move $sp,$fp # sp not trusted here
lw $31,20($sp)
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end Proc3
.loc 1 593
.ent Proc4
Proc4:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
lb $2,Char1Glob
xori $3,$2,0x0041
sltu $2,$3,1
sw $2,0($fp)
lw $2,0($fp)
lw $3,BoolGlob
or $2,$2,$3
sw $2,0($fp)
li $2,0x00000042 # 66
sb $2,Char2Glob
$L31:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Proc4
.loc 1 602
.ent Proc5
Proc5:
.frame $fp,8,$31 # vars= 0, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,8
sw $fp,0($sp)
move $fp,$sp
li $2,0x00000041 # 65
sb $2,Char1Glob
sw $0,BoolGlob
$L32:
move $sp,$fp # sp not trusted here
lw $fp,0($sp)
addu $sp,$sp,8
j $31
.end Proc5
.loc 1 610
.ent Proc6
Proc6:
.frame $fp,24,$31 # vars= 0, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,24
sw $31,20($sp)
sw $fp,16($sp)
move $fp,$sp
sw $4,24($fp)
sw $5,28($fp)
lw $2,28($fp)
lw $3,24($fp)
sw $3,0($2)
lw $4,24($fp)
jal Func3
bne $2,$0,$L34
lw $2,28($fp)
li $3,0x00000003 # 3
sw $3,0($2)
$L34:
lw $2,24($fp)
sltu $3,$2,5
beq $3,$0,$L44
lw $2,24($fp)
move $3,$2
sll $2,$3,2
la $3,$L43
addu $2,$2,$3
lw $3,0($2)
j $3
.rdata
.align 3
.align 2
$L43:
.word $L36
.word $L37
.word $L40
.word $L41
.word $L42
.text
$L36:
lw $2,28($fp)
sw $0,0($2)
j $L35
$L37:
lw $2,IntGlob
slt $3,$2,101
bne $3,$0,$L38
lw $2,28($fp)
sw $0,0($2)
j $L39
$L38:
lw $2,28($fp)
li $3,0x00000003 # 3
sw $3,0($2)
$L39:
j $L35
$L40:
lw $2,28($fp)
li $3,0x00000001 # 1
sw $3,0($2)
j $L35
$L41:
j $L35
$L42:
lw $2,28($fp)
li $3,0x00000002 # 2
sw $3,0($2)
$L44:
$L35:
$L33:
move $sp,$fp # sp not trusted here
lw $31,20($sp)
lw $fp,16($sp)
addu $sp,$sp,24
j $31
.end Proc6
.loc 1 629
.ent Proc7
Proc7:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
sw $4,16($fp)
sw $5,20($fp)
sw $6,24($fp)
lw $2,16($fp)
addu $3,$2,2
sw $3,0($fp)
lw $2,24($fp)
lw $3,20($fp)
lw $4,0($fp)
addu $3,$3,$4
sw $3,0($2)
$L45:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Proc7
.loc 1 640
.ent Proc8
Proc8:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
sw $4,16($fp)
sw $5,20($fp)
sw $6,24($fp)
sw $7,28($fp)
lw $2,24($fp)
addu $3,$2,5
sw $3,0($fp)
lw $2,0($fp)
move $3,$2
sll $2,$3,2
lw $3,16($fp)
addu $2,$2,$3
lw $3,28($fp)
sw $3,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,2
lw $4,16($fp)
addu $3,$2,$4
addu $2,$3,4
lw $3,0($fp)
move $4,$3
sll $3,$4,2
lw $4,16($fp)
addu $3,$3,$4
lw $4,0($3)
sw $4,0($2)
lw $2,0($fp)
move $3,$2
sll $2,$3,2
lw $3,16($fp)
addu $2,$2,$3
addu $3,$2,120
lw $2,0($fp)
sw $2,0($3)
lw $2,0($fp)
sw $2,4($fp)
$L47:
lw $3,0($fp)
addu $2,$3,1
lw $3,4($fp)
slt $2,$2,$3
bne $2,$0,$L48
$L50:
lw $3,0($fp)
lw $2,4($fp)
move $4,$2
sll $2,$4,2
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,4
addu $4,$4,$3
sll $3,$4,2
lw $4,20($fp)
addu $3,$3,$4
addu $2,$2,$3
lw $3,0($fp)
sw $3,0($2)
$L49:
lw $3,4($fp)
addu $2,$3,1
move $3,$2
sw $3,4($fp)
j $L47
$L48:
lw $3,0($fp)
lw $2,0($fp)
move $4,$2
sll $2,$4,2
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,4
addu $4,$4,$3
sll $3,$4,2
lw $4,20($fp)
addu $3,$3,$4
addu $4,$2,$3
subu $2,$4,4
lw $3,0($fp)
lw $2,0($fp)
move $4,$2
sll $2,$4,2
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,4
addu $4,$4,$3
sll $3,$4,2
lw $4,20($fp)
addu $3,$3,$4
addu $4,$2,$3
subu $2,$4,4
lw $4,0($fp)
lw $3,0($fp)
move $5,$3
sll $3,$5,2
move $6,$4
sll $5,$6,1
addu $5,$5,$4
sll $4,$5,4
addu $5,$5,$4
sll $4,$5,2
lw $5,20($fp)
addu $4,$4,$5
addu $3,$3,$4
subu $4,$3,4
lw $5,0($4)
addu $3,$5,1
move $4,$3
sw $4,0($2)
lw $3,0($fp)
lw $2,0($fp)
move $4,$2
sll $2,$4,2
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,4
addu $4,$4,$3
sll $3,$4,2
lw $4,20($fp)
addu $3,$3,$4
addu $4,$2,$3
addu $2,$4,4080
lw $3,0($fp)
move $4,$3
sll $3,$4,2
lw $4,16($fp)
addu $3,$3,$4
lw $4,0($3)
sw $4,0($2)
li $2,0x00000005 # 5
sw $2,IntGlob
$L46:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Proc8
.loc 1 660
.ent Func1
Func1:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
move $3,$4
move $4,$5
sb $3,0($fp)
sb $4,1($fp)
lbu $2,0($fp)
sb $2,2($fp)
lbu $2,2($fp)
sb $2,3($fp)
lb $2,3($fp)
lb $5,1($fp)
beq $2,$5,$L52
move $2,$0
j $L51
j $L53
$L52:
li $2,0x00000001 # 1
j $L51
$L53:
$L51:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Func1
.loc 1 675
.ent Func2
Func2:
.frame $fp,32,$31 # vars= 8, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,32
sw $31,28($sp)
sw $fp,24($sp)
move $fp,$sp
sw $4,32($fp)
sw $5,36($fp)
li $2,0x00000001 # 1
sw $2,16($fp)
$L55:
lw $2,16($fp)
slt $3,$2,2
beq $3,$0,$L56
$L57:
lw $2,32($fp)
lw $4,16($fp)
addu $3,$2,$4
lb $2,0($3)
lw $3,16($fp)
lw $4,36($fp)
addu $3,$3,$4
addu $4,$3,1
lb $3,0($4)
move $4,$2
move $5,$3
jal Func1
bne $2,$0,$L58
li $2,0x00000041 # 65
sb $2,20($fp)
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
$L58:
j $L55
$L56:
lb $2,20($fp)
slt $3,$2,87
bne $3,$0,$L59
lb $2,20($fp)
slt $3,$2,91
beq $3,$0,$L59
li $2,0x00000007 # 7
sw $2,16($fp)
$L59:
lb $2,20($fp)
li $3,0x00000058 # 88
bne $2,$3,$L60
li $2,0x00000001 # 1
j $L54
j $L61
$L60:
lw $4,32($fp)
lw $5,36($fp)
jal strcmp
blez $2,$L62
lw $2,16($fp)
addu $3,$2,7
sw $3,16($fp)
li $2,0x00000001 # 1
j $L54
j $L63
$L62:
move $2,$0
j $L54
$L63:
$L61:
$L54:
move $sp,$fp # sp not trusted here
lw $31,28($sp)
lw $fp,24($sp)
addu $sp,$sp,32
j $31
.end Func2
.loc 1 705
.ent Func3
Func3:
.frame $fp,16,$31 # vars= 8, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,16
sw $fp,8($sp)
move $fp,$sp
sw $4,16($fp)
lw $2,16($fp)
sw $2,0($fp)
lw $2,0($fp)
li $3,0x00000002 # 2
bne $2,$3,$L65
li $2,0x00000001 # 1
j $L64
$L65:
move $2,$0
j $L64
$L64:
move $sp,$fp # sp not trusted here
lw $fp,8($sp)
addu $sp,$sp,16
j $31
.end Func3
\ No newline at end of file
.file 1 "pi.c"
# GNU C 2.7.2.3 [AL 1.1, MM 40, tma 0.1] SimpleScalar running sstrix compiled by GNU C
# Cc1 defaults:
# -mgas -mgpOPT
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -o
gcc2_compiled.:
__gnu_compiled_c:
.rdata
.align 2
$LC0:
.ascii "Usage: %s <iterations>\n\000"
.sdata
.align 2
$LC3:
.ascii "%.10f\n\000"
.align 3
$LC1:
.word 0xffc00000 # 2147483647
.word 0x41dfffff
.align 3
$LC2:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC4:
.word 0x00000000 # 4
.word 0x40100000
.text
.align 2
.globl main
.extern stderr, 4
.text
.loc 1 5
.ent main
main:
.frame $fp,56,$31 # vars= 32, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,56
sw $31,52($sp)
sw $fp,48($sp)
move $fp,$sp
sw $4,56($fp)
sw $5,60($fp)
jal __main
sw $0,24($fp)
lw $2,56($fp)
li $3,0x00000002 # 2
beq $2,$3,$L2
lw $2,60($fp)
lw $4,stderr
la $5,$LC0
lw $6,0($2)
jal fprintf
move $4,$0
jal exit
$L2:
lw $3,60($fp)
addu $2,$3,4
lw $4,0($2)
jal atoi
sw $2,20($fp)
li $4,0x00000001 # 1
jal srandom
sw $0,16($fp)
$L3:
lw $2,16($fp)
lw $3,20($fp)
slt $2,$2,$3
bne $2,$0,$L6
j $L4
$L6:
jal random
mtc1 $2,$f0
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC1
div.d $f0,$f0,$f2
s.d $f0,32($fp)
jal random
mtc1 $2,$f0
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC1
div.d $f0,$f0,$f2
s.d $f0,40($fp)
l.d $f0,32($fp)
l.d $f2,32($fp)
mul.d $f0,$f0,$f2
l.d $f2,40($fp)
l.d $f4,40($fp)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
l.d $f2,$LC2
c.le.d $f0,$f2
bc1f $L7
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
$L7:
$L5:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L3
$L4:
l.s $f0,24($fp)
#nop
cvt.d.w $f0,$f0
l.s $f2,20($fp)
#nop
cvt.d.w $f2,$f2
div.d $f0,$f0,$f2
l.d $f2,$LC4
mul.d $f0,$f0,$f2
la $4,$LC3
dmfc1 $6,$f0
jal printf
li $2,0x00000001 # 1
j $L1
$L1:
move $sp,$fp # sp not trusted here
lw $31,52($sp)
lw $fp,48($sp)
addu $sp,$sp,56
j $31
.end main
\ No newline at end of file
.file 1 "slalom.c"
# GNU C 2.7.2.3 [AL 1.1, MM 40, tma 0.1] SimpleScalar running sstrix compiled by GNU C
# Cc1 defaults:
# -mgas -mgpOPT
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -O0 -o
gcc2_compiled.:
__gnu_compiled_c:
.rdata
.align 2
$LC0:
.ascii "Enter the number of seconds that is the goal: \000"
.sdata
.align 2
$LC1:
.ascii "%lg\000"
.rdata
.align 2
$LC2:
.ascii "Enter a lower bound for n: \000"
.sdata
.align 2
$LC3:
.ascii "%d\000"
.rdata
.align 2
$LC4:
.ascii "Must take less than %g seconds. Took %g.\n\000"
.align 2
$LC5:
.ascii "Enter an upper bound for n: \000"
.align 2
$LC6:
.ascii "Must take at least %g seconds. Took %g.\n\000"
.align 2
$LC7:
.ascii "New interval: [%d,%d]\n\000"
.text
.align 2
.globl main
.data
.align 2
info.4:
.word $LC8
.word $LC9
.word $LC10
.word $LC11
.word $LC12
.word $LC13
.word $LC14
.word $LC15
.word $LC16
.word 0
.rdata
.align 2
$LC16:
.ascii "Options: -O Date: 23 May 1990\000"
.align 2
$LC15:
.ascii "Compiler: cc Run by: M. Carter\000"
.align 2
$LC14:
.ascii "Language: C Alone: yes\000"
.align 2
$LC13:
.ascii "OS: SUNOS 4.0.3 Timer: Wall, gettime"
.ascii "ofday()\000"
.align 2
$LC12:
.ascii "Disk: .3GB SCSI+.7GB SMD Node name: amssun2\000"
.align 2
$LC11:
.ascii "NMAX: 512 Clock: 25 MHz\000"
.align 2
$LC10:
.ascii "Cache: 128 KB # used: 1\000"
.align 2
$LC9:
.ascii "Memory: 32 MB # of procs: 1\000"
.align 2
$LC8:
.ascii "Machine: SUN 4/370GX Processor: SPARC\000"
.sdata
.align 2
$LC17:
.ascii "\n\000"
.rdata
.align 2
$LC18:
.ascii "M ops: %-13lg Time: %-.3lf seconds\n\000"
.align 2
$LC20:
.ascii "n: %-6d MFLOPS: %-.5lg\n\000"
.align 2
$LC21:
.ascii "Approximate data memory use: %d bytes.\n\000"
.sdata
.align 3
$LC19:
.word 0xa0b5ed8d # 9.9999999999999995475e-07
.word 0x3eb0c6f7
.text
.align 2
.globl What
.lcomm area.7,16384
.lcomm box.8,56
.lcomm coeff.9,33554432
.lcomm diag.10,49152
.lcomm emiss.11,144
.lcomm place.12,49152
.lcomm result.13,49152
.lcomm rho.14,144
.lcomm rhs.15,49152
.lcomm size.16,32768
.lcomm loop.17,48
.data
.align 2
tasks.18:
.word $LC22
.word $LC23
.word $LC24
.word $LC25
.word $LC26
.word $LC27
.word $LC28
.sdata
.align 2
$LC28:
.ascii "Storer\000"
.align 2
$LC27:
.ascii "Solver\000"
.align 2
$LC26:
.ascii "SetUp3\000"
.align 2
$LC25:
.ascii "SetUp2\000"
.align 2
$LC24:
.ascii "SetUp1\000"
.align 2
$LC23:
.ascii "Region\000"
.align 2
$LC22:
.ascii "Reader\000"
.rdata
.align 2
$LC29:
.ascii "%6.6s%8.3f%17.0f%14.6f%10.1f %%\n\000"
.sdata
.align 2
format.19:
.word $LC29
.rdata
.align 2
$LC30:
.ascii "Must be at least 6, the number of faces.\n\000"
.align 2
$LC31:
.ascii "Exceeds %d = maximum for this system.\n\000"
.sdata
.align 2
$LC32:
.ascii "answer\000"
.rdata
.align 2
$LC50:
.ascii "%d patches:\n\000"
.align 2
$LC51:
.ascii " Task Seconds Operations MFLOPS %% of T"
.ascii "ime\n\000"
.sdata
.align 2
$LC55:
.ascii "TOTALS\000"
.align 3
$LC33:
.word 0x00000000 # 0.5
.word 0x3fe00000
.align 3
$LC34:
.word 0x00000000 # 258
.word 0x40702000
.align 3
$LC35:
.word 0x00000000 # 8
.word 0x40200000
.align 3
$LC36:
.word 0x00000000 # 154
.word 0x40634000
.align 3
$LC37:
.word 0x00000000 # 532
.word 0x4080a000
.align 3
$LC38:
.word 0x00000000 # 6
.word 0x40180000
.align 3
$LC39:
.word 0x00000000 # 370
.word 0x40772000
.align 3
$LC40:
.word 0x00000000 # 2
.word 0x40000000
.align 3
$LC41:
.word 0x00000000 # 9
.word 0x40220000
.align 3
$LC42:
.word 0x00000000 # 72
.word 0x40520000
.align 3
$LC43:
.word 0x00000000 # 7.5
.word 0x401e0000
.align 3
$LC44:
.word 0x00000000 # 2.5
.word 0x40040000
.align 3
$LC45:
.word 0x00000000 # 21
.word 0x40350000
.align 3
$LC46:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC47:
.word 0x00000000 # 16.5
.word 0x40308000
.align 3
$LC48:
.word 0x00000000 # 35.5
.word 0x4041c000
.align 3
$LC49:
.word 0x00000000 # 3
.word 0x40080000
.align 3
$LC52:
.word 0xd2f1a9fc # 0.0010000000000000000208
.word 0x3f50624d
.align 3
$LC53:
.word 0xa0b5ed8d # 9.9999999999999995475e-07
.word 0x3eb0c6f7
.align 3
$LC54:
.word 0x00000000 # 100
.word 0x40590000
.text
.align 2
.globl Meter
.sdata
.align 3
$LC56:
.word 0xa0b5ed8d # 9.9999999999999995475e-07
.word 0x3eb0c6f7
.text
.align 2
.globl When
.sdata
.align 2
$LC57:
.ascii "geom\000"
.align 2
$LC58:
.ascii "r\000"
.rdata
.align 2
$LC59:
.ascii "slalom: 'geom' geometry file not found.\n\000"
.align 2
$LC60:
.ascii "Must specify exactly 3 box coordinates.\n\000"
.align 2
$LC61:
.ascii "Must specify exactly 18 box coordinates.\n\000"
.align 2
$LC64:
.ascii "Box dimensions must be between 1 and 100.\n\000"
.align 2
$LC66:
.ascii "Reflectivities must be between .000 and .999.\n\000"
.align 2
$LC67:
.ascii "Emissivity cannot be negative.\n\000"
.align 2
$LC68:
.ascii "Emissivities are zero. Problem is trivial.\n\000"
.sdata
.align 3
$LC62:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC63:
.word 0x00000000 # 100
.word 0x40590000
.align 3
$LC65:
.word 0xd916872b # 0.99899999999999999911
.word 0x3feff7ce
.text
.align 2
.globl Reader
.rdata
.align 2
$LC70:
.ascii "Eccentric box requires more patches.\n\000"
.sdata
.align 3
$LC69:
.word 0x00000000 # 0.5
.word 0x3fe00000
.align 3
$LC71:
.word 0x54442d18 # 25.132741228718344928
.word 0x403921fb
.text
.align 2
.globl Region
.sdata
.align 3
$LC72:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC73:
.word 0x00000000 # -4
.word 0xc0100000
.text
.align 2
.globl SetUp1
.sdata
.align 3
$LC74:
.word 0xb7f87a0f # 1.0000000000000000079e-35
.word 0x38aa95a5
.align 3
$LC75:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC76:
.word 0x00000000 # 4
.word 0x40100000
.text
.align 2
.globl SetUp2
.rdata
.align 2
$LC79:
.ascii "Total form factor is too far from unity.\n\000"
.sdata
.align 3
$LC77:
.word 0x00000000 # 1
.word 0x3ff00000
.align 3
$LC78:
.word 0xe826d695 # 5.0000000000000003114e-10
.word 0x3e012e0b
.text
.align 2
.globl SetUp3
.sdata
.align 3
$LC80:
.word 0x00000000 # 1
.word 0x3ff00000
.text
.align 2
.globl Solver
.sdata
.align 2
$LC81:
.ascii "w\000"
.rdata
.align 2
$LC82:
.ascii "Unable to open 'answer' file.\n\000"
.align 2
$LC83:
.ascii " Patch Face Position in w, h, d Widt"
.ascii "h Height\n\000"
.align 2
$LC84:
.ascii "%5d %4d%11.5lf%11.5lf%11.5lf %11.5lf%11.5lf\n\000"
.align 2
$LC85:
.ascii "\n"
.ascii " Patch Face Radiosities\n\000"
.align 2
$LC86:
.ascii "%5d %4d%12.8lf%12.8lf%12.8lf\n\000"
.text
.align 2
.globl Storer
.rdata
.align 2
$LC88:
.ascii "Residual is too large: %lg\n\000"
.sdata
.align 3
$LC87:
.word 0x29a4692c # 1.5000000000000001968e-08
.word 0x3e501b2b
.text
.align 2
.globl Verify
.align 2
.globl Ddot
.comm goal,8
.comm timing,8
.comm work,8
.comm mean,4
.comm n,4
.comm nupper,4
.text
.loc 1 179
.ent main
main:
.frame $fp,40,$31 # vars= 8, regs= 2/0, args= 24, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,40
sw $31,36($sp)
sw $fp,32($sp)
move $fp,$sp
jal __main
la $4,$LC0
jal printf
la $4,$LC1
la $5,goal
jal scanf
$L2:
la $4,$LC2
jal printf
la $4,$LC3
la $5,n
jal scanf
lw $2,n
bgtz $2,$L5
move $4,$0
jal exit
$L5:
lw $4,n
la $5,timing
la $6,work
jal Meter
sw $2,24($fp)
l.d $f0,timing
l.d $f2,goal
c.le.d $f2,$f0
bc1f $L6
l.d $f0,timing
s.d $f0,16($sp)
la $4,$LC4
dlw $6,goal
jal printf
$L6:
$L4:
lw $2,24($fp)
beq $2,$0,$L7
l.d $f0,timing
l.d $f2,goal
c.le.d $f2,$f0
bc1t $L7
j $L3
$L7:
j $L2
$L3:
.set noreorder
nop
.set reorder
$L8:
la $4,$LC5
jal printf
la $4,$LC3
la $5,nupper
jal scanf
lw $2,nupper
bgtz $2,$L11
move $4,$0
jal exit
$L11:
lw $4,nupper
la $5,timing
la $6,work
jal Meter
sw $2,24($fp)
l.d $f0,timing
l.d $f2,goal
c.lt.d $f0,$f2
bc1f $L12
l.d $f0,timing
s.d $f0,16($sp)
la $4,$LC6
dlw $6,goal
jal printf
lw $2,nupper
lw $3,n
slt $4,$2,$3
beq $4,$0,$L13
lw $2,n
$L13:
sw $2,n
$L12:
$L10:
lw $2,24($fp)
beq $2,$0,$L14
l.d $f0,timing
l.d $f2,goal
c.lt.d $f0,$f2
bc1t $L14
j $L9
$L14:
j $L8
$L9:
.set noreorder
nop
.set reorder
$L15:
lw $2,nupper
lw $3,n
subu $2,$2,$3
slt $3,$2,2
bne $3,$0,$L16
$L17:
lw $2,n
lw $3,nupper
addu $2,$2,$3
sra $3,$2,31
srl $4,$3,31
addu $2,$2,$4
sra $3,$2,1
sw $3,mean
lw $4,mean
la $5,timing
la $6,work
jal Meter
sw $2,24($fp)
l.d $f0,timing
l.d $f2,goal
c.lt.d $f0,$f2
bc1f $L18
lw $2,mean
sw $2,n
j $L19
$L18:
lw $2,mean
sw $2,nupper
$L19:
la $4,$LC7
lw $5,n
lw $6,nupper
jal printf
j $L15
$L16:
lw $4,n
la $5,timing
la $6,work
jal Meter
sw $2,24($fp)
l.d $f0,work
s.d $f0,16($sp)
lw $4,n
dlw $6,timing
jal What
$L1:
move $sp,$fp # sp not trusted here
lw $31,36($sp)
lw $fp,32($sp)
addu $sp,$sp,40
j $31
.end main
.loc 1 236
.ent What
What:
.frame $fp,40,$31 # vars= 8, regs= 2/0, args= 24, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,40
sw $31,36($sp)
sw $fp,32($sp)
move $fp,$sp
sw $4,40($fp)
dsw $6,48($fp)
la $4,$LC17
jal printf
sw $0,24($fp)
$L21:
lw $2,24($fp)
move $3,$2
sll $2,$3,2
la $3,info.4
addu $2,$2,$3
lw $3,0($2)
bne $3,$0,$L24
j $L22
$L24:
lw $2,24($fp)
move $3,$2
sll $2,$3,2
la $3,info.4
addu $2,$2,$3
lw $4,0($2)
jal puts
$L23:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L21
$L22:
l.d $f0,56($fp)
l.d $f2,$LC19
mul.d $f0,$f0,$f2
l.d $f2,48($fp)
s.d $f2,16($sp)
la $4,$LC18
dmfc1 $6,$f0
jal printf
l.d $f0,56($fp)
l.d $f2,48($fp)
div.d $f0,$f0,$f2
l.d $f2,$LC19
mul.d $f0,$f0,$f2
la $4,$LC20
lw $5,40($fp)
dmfc1 $6,$f0
jal printf
lw $2,40($fp)
move $3,$2
sll $2,$3,3
lw $3,40($fp)
mult $2,$3
mflo $2
lw $3,40($fp)
move $5,$3
sll $4,$5,4
subu $4,$4,$3
sll $3,$4,3
addu $2,$2,$3
addu $3,$2,800
la $4,$LC21
move $5,$3
jal printf
$L20:
move $sp,$fp # sp not trusted here
lw $31,36($sp)
lw $fp,32($sp)
addu $sp,$sp,40
j $31
.end What
.loc 1 282
.ent Meter
Meter:
.frame $fp,280,$31 # vars= 208, regs= 2/3, args= 40, extra= 0
.mask 0xc0000000,-28
.fmask 0x03f00000,-4
subu $sp,$sp,280
sw $31,252($sp)
sw $fp,248($sp)
s.d $f24,272($sp)
s.d $f22,264($sp)
s.d $f20,256($sp)
move $fp,$sp
sw $4,280($fp)
sw $5,284($fp)
sw $6,288($fp)
lw $2,280($fp)
slt $3,$2,6
beq $3,$0,$L26
la $4,$LC30
jal printf
move $2,$0
j $L25
j $L27
$L26:
lw $2,280($fp)
slt $3,$2,2049
bne $3,$0,$L28
la $4,$LC31
li $5,0x00000800 # 2048
jal printf
move $2,$0
j $L25
$L28:
$L27:
la $4,$LC32
jal unlink
jal When
s.d $f0,152($fp)
la $4,box.8
la $5,rho.14
la $6,emiss.11
jal Reader
bne $2,$0,$L29
move $2,$0
j $L25
$L29:
jal When
s.d $f0,160($fp)
la $2,size.16
sw $2,16($sp)
la $2,area.7
sw $2,20($sp)
lw $4,280($fp)
la $5,loop.17
la $6,box.8
la $7,place.12
jal Region
bne $2,$0,$L30
move $2,$0
j $L25
$L30:
jal When
s.d $f0,168($fp)
la $2,size.16
sw $2,16($sp)
lw $4,280($fp)
la $5,loop.17
la $6,coeff.9
la $7,place.12
jal SetUp1
jal When
s.d $f0,176($fp)
la $2,size.16
sw $2,16($sp)
lw $4,280($fp)
la $5,loop.17
la $6,coeff.9
la $7,place.12
jal SetUp2
jal When
s.d $f0,184($fp)
la $2,emiss.11
sw $2,16($sp)
la $2,coeff.9
sw $2,20($sp)
la $2,diag.10
sw $2,24($sp)
la $2,rhs.15
sw $2,28($sp)
lw $4,280($fp)
la $5,loop.17
la $6,area.7
la $7,rho.14
jal SetUp3
bne $2,$0,$L31
move $2,$0
j $L25
$L31:
jal When
s.d $f0,192($fp)
lw $2,loop.17+8
sw $2,240($fp)
la $2,rhs.15
sw $2,16($sp)
la $2,result.13
sw $2,20($sp)
lw $4,280($fp)
lw $5,240($fp)
la $6,coeff.9
la $7,diag.10
jal Solver
jal When
s.d $f0,200($fp)
la $2,result.13
sw $2,16($sp)
lw $4,280($fp)
la $5,loop.17
la $6,place.12
la $7,size.16
jal Storer
jal When
s.d $f0,208($fp)
lw $2,284($fp)
l.d $f0,208($fp)
l.d $f2,152($fp)
sub.d $f0,$f0,$f2
s.d $f0,0($2)
sw $0,232($fp)
$L32:
lw $2,232($fp)
slt $3,$2,7
bne $3,$0,$L35
j $L33
$L35:
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,40
addu $3,$2,$4
addu $2,$3,112
addu $3,$fp,160
lw $4,232($fp)
move $5,$4
sll $4,$5,3
addu $3,$3,$4
lw $4,232($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,40
addu $4,$4,$5
addu $5,$4,112
l.d $f0,0($3)
l.d $f2,0($5)
sub.d $f0,$f0,$f2
s.d $f0,0($2)
$L34:
lw $3,232($fp)
addu $2,$3,1
move $3,$2
sw $3,232($fp)
j $L32
$L33:
sw $0,236($fp)
dsz 216($fp)
sw $0,232($fp)
$L36:
lw $2,232($fp)
slt $3,$2,6
bne $3,$0,$L39
j $L37
$L39:
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,40
addu $3,$2,$4
addu $2,$3,64
lw $3,232($fp)
move $4,$3
sll $3,$4,3
lw $4,232($fp)
move $5,$4
sll $4,$5,3
lw $3,loop.17+4($3)
lw $4,loop.17($4)
subu $3,$3,$4
addu $4,$3,1
mtc1 $4,$f0
#nop
cvt.d.w $f0,$f0
s.d $f0,0($2)
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,40
addu $3,$2,$4
addu $2,$3,64
lw $3,232($fp)
move $4,$3
sll $3,$4,3
addu $4,$fp,40
addu $3,$3,$4
addu $4,$3,64
l.d $f0,0($2)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,216($fp)
add.d $f0,$f2,$f0
s.d $f0,216($fp)
l.s $f24,236($fp)
#nop
cvt.d.w $f24,$f24
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,40
addu $3,$2,$4
addu $2,$3,64
lw $3,232($fp)
move $4,$3
sll $3,$4,3
la $4,box.8
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
lw $2,232($fp)
move $3,$2
sll $2,$3,3
la $3,box.8+8
addu $2,$2,$3
l.d $f2,0($2)
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal sqrt
l.d $f2,$LC33
add.d $f0,$f0,$f2
add.d $f2,$f24,$f0
trunc.w.d $f10,$f2,$8
s.s $f10,236($fp)
$L38:
lw $3,232($fp)
addu $2,$3,1
move $3,$2
sw $3,232($fp)
j $L36
$L37:
l.d $f0,104($fp)
l.d $f2,128($fp)
mul.d $f0,$f0,$f2
l.d $f2,112($fp)
l.d $f4,136($fp)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
l.d $f2,120($fp)
l.d $f4,144($fp)
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,224($fp)
l.d $f0,$LC34
s.d $f0,40($fp)
l.s $f0,236($fp)
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC35
mul.d $f0,$f0,$f2
l.d $f2,$LC36
add.d $f0,$f0,$f2
l.s $f2,280($fp)
#nop
cvt.d.w $f2,$f2
add.d $f0,$f0,$f2
s.d $f0,48($fp)
l.d $f0,224($fp)
l.d $f2,$LC37
mul.d $f0,$f0,$f2
l.d $f2,$LC38
add.d $f0,$f0,$f2
s.d $f0,56($fp)
lw $2,280($fp)
move $3,$2
sll $2,$3,3
mtc1 $2,$f0
#nop
cvt.d.w $f0,$f0
l.s $f2,280($fp)
#nop
cvt.d.w $f2,$f2
l.s $f4,280($fp)
#nop
cvt.d.w $f4,$f4
mul.d $f2,$f2,$f4
l.d $f4,216($fp)
sub.d $f2,$f2,$f4
l.d $f20,224($fp)
add.d $f4,$f20,$f20
sub.d $f2,$f2,$f4
l.d $f4,$LC39
mul.d $f2,$f2,$f4
l.d $f4,$LC40
div.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,64($fp)
l.s $f0,280($fp)
#nop
cvt.d.w $f0,$f0
l.d $f2,$LC41
mul.d $f0,$f0,$f2
l.d $f2,$LC42
add.d $f0,$f0,$f2
l.s $f2,280($fp)
#nop
cvt.d.w $f2,$f2
l.s $f4,280($fp)
#nop
cvt.d.w $f4,$f4
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
l.d $f2,216($fp)
sub.d $f0,$f0,$f2
s.d $f0,72($fp)
l.s $f0,280($fp)
#nop
cvt.d.w $f0,$f0
l.s $f2,280($fp)
#nop
cvt.d.w $f2,$f2
l.s $f4,280($fp)
#nop
cvt.d.w $f4,$f4
l.d $f6,$LC43
add.d $f4,$f4,$f6
mul.d $f2,$f2,$f4
l.d $f4,$LC44
sub.d $f2,$f2,$f4
mul.d $f0,$f0,$f2
l.d $f2,$LC45
sub.d $f0,$f0,$f2
lw $3,240($fp)
addu $2,$3,1
mtc1 $2,$f2
#nop
cvt.d.w $f2,$f2
lw $3,240($fp)
addu $2,$3,1
mtc1 $2,$f4
#nop
cvt.d.w $f4,$f4
l.s $f22,240($fp)
#nop
cvt.d.w $f22,$f22
l.d $f6,$LC46
add.d $f22,$f22,$f6
add.d $f6,$f22,$f22
l.d $f8,$LC47
sub.d $f6,$f6,$f8
mul.d $f4,$f4,$f6
l.d $f6,$LC48
add.d $f4,$f4,$f6
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
lw $3,240($fp)
addu $2,$3,1
lw $3,280($fp)
mult $2,$3
mflo $2
mtc1 $2,$f2
#nop
cvt.d.w $f2,$f2
l.s $f4,240($fp)
#nop
cvt.d.w $f4,$f4
l.d $f6,$LC46
add.d $f4,$f4,$f6
l.d $f6,$LC49
mul.d $f4,$f4,$f6
l.d $f6,$LC41
sub.d $f4,$f6,$f4
mul.d $f2,$f2,$f4
add.d $f0,$f0,$f2
s.d $f0,80($fp)
lw $2,280($fp)
move $4,$2
sll $3,$4,1
addu $3,$3,$2
sll $2,$3,4
mtc1 $2,$f0
#nop
cvt.d.w $f0,$f0
s.d $f0,88($fp)
lw $2,288($fp)
l.d $f0,40($fp)
l.d $f2,48($fp)
add.d $f0,$f0,$f2
l.d $f2,56($fp)
add.d $f0,$f0,$f2
l.d $f2,64($fp)
add.d $f0,$f0,$f2
l.d $f2,72($fp)
add.d $f0,$f0,$f2
l.d $f2,80($fp)
add.d $f0,$f0,$f2
l.d $f2,88($fp)
add.d $f0,$f0,$f2
s.d $f0,0($2)
la $4,$LC50
lw $5,280($fp)
jal printf
la $4,$LC51
jal printf
sw $0,232($fp)
$L40:
lw $2,232($fp)
slt $3,$2,7
bne $3,$0,$L43
j $L41
$L43:
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $3,$fp,40
addu $2,$2,$3
addu $3,$2,112
l.d $f0,0($3)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1f $L44
lw $2,232($fp)
move $3,$2
sll $2,$3,3
addu $3,$fp,40
addu $2,$2,$3
addu $3,$2,112
l.d $f0,$LC52
s.d $f0,0($3)
$L44:
lw $2,232($fp)
move $3,$2
sll $2,$3,2
la $3,tasks.18
addu $2,$2,$3
lw $3,232($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,40
addu $4,$3,$5
addu $3,$4,112
lw $4,232($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,40
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,16($sp)
lw $4,232($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,40
addu $4,$4,$5
lw $5,232($fp)
move $6,$5
sll $5,$6,3
addu $6,$fp,40
addu $5,$5,$6
addu $6,$5,112
l.d $f0,0($4)
l.d $f2,0($6)
div.d $f0,$f0,$f2
l.d $f2,$LC53
mul.d $f0,$f0,$f2
s.d $f0,24($sp)
lw $4,232($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,40
addu $4,$4,$5
addu $5,$4,112
l.d $f0,0($5)
l.d $f2,$LC54
mul.d $f0,$f0,$f2
lw $4,284($fp)
l.d $f2,0($4)
div.d $f0,$f0,$f2
s.d $f0,32($sp)
lw $4,format.19
lw $5,0($2)
dlw $6,0($3)
jal printf
$L42:
lw $3,232($fp)
addu $2,$3,1
move $3,$2
sw $3,232($fp)
j $L40
$L41:
lw $2,284($fp)
lw $3,288($fp)
l.d $f0,0($3)
s.d $f0,16($sp)
lw $3,288($fp)
lw $4,284($fp)
l.d $f0,0($3)
l.d $f2,0($4)
div.d $f0,$f0,$f2
l.d $f2,$LC53
mul.d $f0,$f0,$f2
s.d $f0,24($sp)
l.d $f0,$LC54
s.d $f0,32($sp)
lw $4,format.19
la $5,$LC55
dlw $6,0($2)
jal printf
la $2,result.13
sw $2,16($sp)
lw $4,280($fp)
la $5,coeff.9
la $6,diag.10
la $7,rhs.15
jal Verify
li $2,0x00000001 # 1
j $L25
$L25:
move $sp,$fp # sp not trusted here
lw $31,252($sp)
lw $fp,248($sp)
l.d $f24,272($sp)
l.d $f22,264($sp)
l.d $f20,256($sp)
addu $sp,$sp,280
j $31
.end Meter
.loc 1 396
.ent When
When:
.frame $fp,40,$31 # vars= 16, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,40
sw $31,36($sp)
sw $fp,32($sp)
move $fp,$sp
addu $2,$fp,24
addu $4,$fp,16
move $5,$2
jal gettimeofday
l.s $f0,16($fp)
#nop
cvt.d.w $f0,$f0
l.s $f2,20($fp)
#nop
cvt.d.w $f2,$f2
l.d $f4,$LC56
mul.d $f2,$f2,$f4
add.d $f4,$f0,$f2
mov.d $f0,$f4
j $L45
$L45:
move $sp,$fp # sp not trusted here
lw $31,36($sp)
lw $fp,32($sp)
addu $sp,$sp,40
j $31
.end When
.loc 1 409
.ent Reader
Reader:
.frame $fp,144,$31 # vars= 120, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,144
sw $31,140($sp)
sw $fp,136($sp)
move $fp,$sp
sw $4,144($fp)
sw $5,148($fp)
sw $6,152($fp)
la $4,$LC57
la $5,$LC58
jal fopen
sw $2,40($fp)
lw $2,40($fp)
bne $2,$0,$L47
la $4,$LC59
jal printf
li $4,0x00000001 # 1
jal exit
$L47:
sw $0,24($fp)
sw $0,16($fp)
$L48:
lw $2,16($fp)
slt $3,$2,3
bne $3,$0,$L51
j $L49
$L51:
lw $2,16($fp)
move $3,$2
sll $2,$3,3
lw $3,144($fp)
addu $2,$2,$3
lw $4,40($fp)
la $5,$LC1
move $6,$2
jal fscanf
lw $3,24($fp)
addu $2,$3,$2
sw $2,24($fp)
$L50:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L48
$L49:
addu $2,$fp,48
move $4,$2
li $5,0x00000050 # 80
lw $6,40($fp)
jal fgets
lw $2,24($fp)
li $3,0x00000003 # 3
beq $2,$3,$L52
la $4,$LC60
jal printf
li $4,0x00000001 # 1
jal exit
$L52:
sw $0,24($fp)
sw $0,20($fp)
$L53:
lw $2,20($fp)
slt $3,$2,3
bne $3,$0,$L56
j $L54
$L56:
sw $0,16($fp)
$L57:
lw $2,16($fp)
slt $3,$2,6
bne $3,$0,$L60
j $L58
$L60:
lw $2,16($fp)
move $4,$2
sll $3,$4,1
addu $3,$3,$2
sll $2,$3,3
lw $3,148($fp)
addu $2,$2,$3
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $2,$2,$3
lw $4,40($fp)
la $5,$LC1
move $6,$2
jal fscanf
lw $3,24($fp)
addu $2,$3,$2
sw $2,24($fp)
$L59:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L57
$L58:
$L55:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L53
$L54:
addu $2,$fp,48
move $4,$2
li $5,0x00000050 # 80
lw $6,40($fp)
jal fgets
lw $2,24($fp)
li $3,0x00000012 # 18
beq $2,$3,$L61
la $4,$LC61
jal printf
li $4,0x00000001 # 1
jal exit
$L61:
sw $0,24($fp)
sw $0,20($fp)
$L62:
lw $2,20($fp)
slt $3,$2,3
bne $3,$0,$L65
j $L63
$L65:
sw $0,16($fp)
$L66:
lw $2,16($fp)
slt $3,$2,6
bne $3,$0,$L69
j $L67
$L69:
lw $2,16($fp)
move $4,$2
sll $3,$4,1
addu $3,$3,$2
sll $2,$3,3
lw $3,152($fp)
addu $2,$2,$3
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $2,$2,$3
lw $4,40($fp)
la $5,$LC1
move $6,$2
jal fscanf
lw $3,24($fp)
addu $2,$3,$2
sw $2,24($fp)
$L68:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L66
$L67:
$L64:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L62
$L63:
addu $2,$fp,48
move $4,$2
li $5,0x00000050 # 80
lw $6,40($fp)
jal fgets
lw $2,24($fp)
li $3,0x00000012 # 18
beq $2,$3,$L70
la $4,$LC61
jal printf
li $4,0x00000001 # 1
jal exit
$L70:
lw $4,40($fp)
jal fclose
sw $0,20($fp)
$L71:
lw $2,20($fp)
slt $3,$2,3
bne $3,$0,$L74
j $L72
$L74:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,144($fp)
addu $2,$2,$3
l.d $f0,0($2)
l.d $f2,$LC62
c.lt.d $f0,$f2
bc1t $L76
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,144($fp)
addu $2,$2,$3
l.d $f0,0($2)
l.d $f2,$LC63
c.le.d $f2,$f0
bc1t $L76
j $L75
$L76:
la $4,$LC64
jal printf
move $2,$0
j $L46
$L75:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $4,144($fp)
addu $3,$2,$4
addu $2,$3,24
lw $3,20($fp)
move $4,$3
sll $3,$4,3
lw $4,144($fp)
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
dsz 32($fp)
sw $0,16($fp)
$L77:
lw $2,16($fp)
slt $3,$2,6
bne $3,$0,$L80
j $L78
$L80:
lw $3,16($fp)
lw $2,20($fp)
move $4,$2
sll $2,$4,3
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,3
lw $4,148($fp)
addu $3,$3,$4
addu $2,$2,$3
l.d $f0,0($2)
mtc1 $0,$f2
mtc1 $0,$f3
c.lt.d $f0,$f2
bc1t $L82
lw $3,16($fp)
lw $2,20($fp)
move $4,$2
sll $2,$4,3
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,3
lw $4,148($fp)
addu $3,$3,$4
addu $2,$2,$3
l.d $f0,0($2)
l.d $f2,$LC65
c.lt.d $f2,$f0
bc1t $L82
j $L81
$L82:
la $4,$LC66
jal printf
move $2,$0
j $L46
$L81:
lw $3,16($fp)
lw $2,20($fp)
move $4,$2
sll $2,$4,3
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,3
lw $4,152($fp)
addu $3,$3,$4
addu $2,$2,$3
l.d $f0,0($2)
mtc1 $0,$f2
mtc1 $0,$f3
c.lt.d $f0,$f2
bc1f $L83
la $4,$LC67
jal printf
move $2,$0
j $L46
$L83:
lw $3,16($fp)
lw $2,20($fp)
move $4,$2
sll $2,$4,3
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,3
lw $4,152($fp)
addu $3,$3,$4
addu $2,$2,$3
l.d $f0,32($fp)
l.d $f2,0($2)
c.lt.d $f0,$f2
bc1f $L84
lw $3,16($fp)
lw $2,20($fp)
move $4,$2
sll $2,$4,3
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,3
lw $4,152($fp)
addu $3,$3,$4
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,32($fp)
$L84:
$L79:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L77
$L78:
l.d $f0,32($fp)
mtc1 $0,$f2
mtc1 $0,$f3
c.eq.d $f0,$f2
bc1f $L85
la $4,$LC68
jal printf
move $2,$0
j $L46
$L85:
$L73:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L71
$L72:
lw $3,144($fp)
addu $2,$3,48
lw $4,144($fp)
addu $3,$4,24
l.d $f0,0($3)
s.d $f0,0($2)
li $2,0x00000001 # 1
j $L46
$L46:
move $sp,$fp # sp not trusted here
lw $31,140($sp)
lw $fp,136($sp)
addu $sp,$sp,144
j $31
.end Reader
.loc 1 504
.ent Region
Region:
.frame $fp,120,$31 # vars= 88, regs= 2/1, args= 16, extra= 0
.mask 0xc0000000,-12
.fmask 0x00300000,-4
subu $sp,$sp,120
sw $31,108($sp)
sw $fp,104($sp)
s.d $f20,112($sp)
move $fp,$sp
sw $4,120($fp)
sw $5,124($fp)
sw $6,128($fp)
sw $7,132($fp)
lw $2,128($fp)
lw $4,128($fp)
addu $3,$4,8
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f20,$f0,$f2
lw $3,128($fp)
addu $2,$3,8
lw $4,128($fp)
addu $3,$4,16
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
add.d $f20,$f20,$f0
lw $3,128($fp)
addu $2,$3,16
lw $3,128($fp)
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
add.d $f20,$f20,$f0
add.d $f0,$f20,$f20
s.d $f0,64($fp)
dsz 72($fp)
l.s $f0,120($fp)
#nop
cvt.d.w $f0,$f0
s.d $f0,80($fp)
lw $2,124($fp)
sw $0,0($2)
sw $0,24($fp)
$L87:
lw $2,24($fp)
slt $3,$2,5
bne $3,$0,$L90
j $L88
$L90:
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
lw $3,24($fp)
move $4,$3
sll $3,$4,3
lw $4,128($fp)
addu $3,$3,$4
addu $4,$3,8
l.d $f0,0($2)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,72($fp)
add.d $f0,$f2,$f0
s.d $f0,72($fp)
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $4,124($fp)
addu $3,$2,$4
addu $2,$3,4
l.d $f0,80($fp)
l.d $f2,72($fp)
mul.d $f0,$f0,$f2
l.d $f2,64($fp)
div.d $f0,$f0,$f2
l.d $f2,$LC69
add.d $f0,$f0,$f2
trunc.w.d $f4,$f0,$8
mfc1 $3,$f4
subu $4,$3,1
sw $4,0($2)
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $4,124($fp)
addu $3,$2,$4
addu $2,$3,8
lw $3,24($fp)
move $4,$3
sll $3,$4,3
lw $4,124($fp)
addu $3,$3,$4
addu $4,$3,4
lw $3,0($4)
addu $4,$3,1
sw $4,0($2)
$L89:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L87
$L88:
lw $3,124($fp)
addu $2,$3,44
lw $3,120($fp)
subu $4,$3,1
sw $4,0($2)
sw $0,24($fp)
$L91:
lw $2,24($fp)
slt $3,$2,6
bne $3,$0,$L94
j $L92
$L94:
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $4,124($fp)
addu $3,$2,$4
addu $2,$3,4
lw $3,24($fp)
move $4,$3
sll $3,$4,3
lw $4,124($fp)
addu $3,$3,$4
lw $2,0($2)
lw $3,0($3)
subu $2,$2,$3
addu $3,$2,1
sw $3,48($fp)
dsz 80($fp)
lw $2,24($fp)
slt $3,$2,3
bne $3,$0,$L95
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
subu $3,$2,8
l.d $f0,0($3)
s.d $f0,80($fp)
$L95:
l.s $f0,48($fp)
#nop
cvt.d.w $f0,$f0
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
l.d $f2,0($2)
mul.d $f0,$f0,$f2
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
addu $3,$2,8
l.d $f2,0($3)
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal sqrt
l.d $f2,$LC69
add.d $f0,$f0,$f2
trunc.w.d $f4,$f0,$8
s.s $f4,44($fp)
lw $2,44($fp)
lw $3,48($fp)
slt $2,$3,$2
beq $2,$0,$L96
lw $2,48($fp)
sw $2,44($fp)
$L96:
lw $2,44($fp)
bne $2,$0,$L97
li $2,0x00000001 # 1
sw $2,44($fp)
$L97:
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
l.s $f0,44($fp)
#nop
cvt.d.w $f0,$f0
l.d $f2,0($2)
div.d $f0,$f2,$f0
s.d $f0,96($fp)
lw $2,44($fp)
subu $3,$2,1
sw $3,28($fp)
dsz 64($fp)
sw $0,16($fp)
$L98:
lw $2,16($fp)
lw $3,44($fp)
slt $2,$2,$3
bne $2,$0,$L101
j $L99
$L101:
lw $2,28($fp)
lw $3,44($fp)
div $2,$2,$3
sw $2,32($fp)
lw $2,28($fp)
lw $3,48($fp)
addu $2,$2,$3
lw $3,44($fp)
div $2,$2,$3
lw $3,32($fp)
subu $2,$2,$3
sw $2,52($fp)
lw $2,52($fp)
bne $2,$0,$L102
la $4,$LC70
jal printf
move $2,$0
j $L86
$L102:
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,128($fp)
addu $2,$2,$3
addu $3,$2,8
l.s $f0,52($fp)
#nop
cvt.d.w $f0,$f0
l.d $f2,0($3)
div.d $f0,$f2,$f0
s.d $f0,56($fp)
dsz 72($fp)
l.d $f0,96($fp)
l.d $f2,56($fp)
mul.d $f0,$f0,$f2
l.d $f2,$LC71
mul.d $f0,$f0,$f2
s.d $f0,88($fp)
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,124($fp)
addu $2,$2,$3
lw $3,0($2)
lw $2,32($fp)
addu $3,$3,$2
sw $3,40($fp)
lw $2,40($fp)
lw $3,52($fp)
addu $2,$2,$3
sw $2,36($fp)
lw $2,40($fp)
sw $2,20($fp)
$L103:
lw $2,20($fp)
lw $3,36($fp)
slt $2,$2,$3
bne $2,$0,$L106
j $L104
$L106:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,136($fp)
addu $2,$2,$3
l.d $f0,96($fp)
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,136($fp)
addu $2,$2,$3
addu $3,$2,16384
l.d $f0,56($fp)
s.d $f0,0($3)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,132($fp)
addu $2,$2,$3
l.d $f0,64($fp)
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,132($fp)
addu $2,$2,$3
addu $3,$2,16384
l.d $f0,72($fp)
s.d $f0,0($3)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,132($fp)
addu $2,$2,$3
li $3,0x00008000 # 32768
addu $2,$2,$3
l.d $f0,80($fp)
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,140($fp)
addu $2,$2,$3
l.d $f0,88($fp)
s.d $f0,0($2)
l.d $f0,72($fp)
l.d $f2,56($fp)
add.d $f0,$f0,$f2
s.d $f0,72($fp)
$L105:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L103
$L104:
l.d $f0,64($fp)
l.d $f2,96($fp)
add.d $f0,$f0,$f2
s.d $f0,64($fp)
lw $2,28($fp)
lw $3,48($fp)
addu $2,$2,$3
sw $2,28($fp)
$L100:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L98
$L99:
$L93:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L91
$L92:
li $2,0x00000001 # 1
j $L86
$L86:
move $sp,$fp # sp not trusted here
lw $31,108($sp)
lw $fp,104($sp)
l.d $f20,112($sp)
addu $sp,$sp,120
j $31
.end Region
.loc 1 590
.ent SetUp1
SetUp1:
.frame $fp,256,$31 # vars= 232, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,256
sw $31,252($sp)
sw $fp,248($sp)
move $fp,$sp
sw $4,256($fp)
sw $5,260($fp)
sw $6,264($fp)
sw $7,268($fp)
sw $0,36($fp)
$L108:
lw $2,36($fp)
slt $3,$2,3
bne $3,$0,$L111
j $L109
$L111:
lw $2,36($fp)
addu $3,$2,3
sw $3,44($fp)
lw $2,44($fp)
move $3,$2
sll $2,$3,3
lw $3,260($fp)
addu $2,$2,$3
lw $3,0($2)
move $2,$3
sll $3,$2,3
lw $4,268($fp)
addu $2,$3,$4
li $3,0x00008000 # 32768
addu $2,$2,$3
lw $3,44($fp)
move $4,$3
sll $3,$4,3
lw $4,260($fp)
addu $3,$3,$4
lw $4,0($3)
move $3,$4
sll $4,$3,3
lw $5,268($fp)
addu $3,$4,$5
li $4,0x00008000 # 32768
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
s.d $f0,184($fp)
l.d $f0,184($fp)
l.d $f2,184($fp)
add.d $f0,$f0,$f2
s.d $f0,224($fp)
lw $2,36($fp)
move $3,$2
sll $2,$3,3
lw $3,260($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,40($fp)
$L112:
lw $2,36($fp)
move $3,$2
sll $2,$3,3
lw $3,260($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,40($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L113
$L115:
lw $2,44($fp)
move $3,$2
sll $2,$3,3
lw $3,260($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,48($fp)
$L116:
lw $2,44($fp)
move $3,$2
sll $2,$3,3
lw $3,260($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,48($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L117
$L119:
sw $0,20($fp)
$L120:
lw $2,20($fp)
slt $3,$2,2
bne $3,$0,$L123
j $L121
$L123:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,40
lw $4,20($fp)
lw $3,48($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,268($fp)
addu $4,$5,$6
addu $3,$3,$4
lw $5,20($fp)
lw $4,40($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,268($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
sub.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,72
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,40
lw $5,20($fp)
lw $4,48($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,272($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
add.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,56
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,40
lw $5,20($fp)
lw $4,40($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,272($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
sub.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,88
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,72
lw $5,20($fp)
lw $4,40($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,272($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
sub.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,104
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,40
lw $4,20($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,16
addu $4,$4,$5
addu $5,$4,40
l.d $f0,0($3)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,136
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,72
lw $4,20($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,16
addu $4,$4,$5
addu $5,$4,72
l.d $f0,0($3)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,120
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,56
lw $4,20($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,16
addu $4,$4,$5
addu $5,$4,56
l.d $f0,0($3)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,152
lw $3,20($fp)
move $4,$3
sll $3,$4,3
addu $5,$fp,16
addu $4,$3,$5
addu $3,$4,88
lw $4,20($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,16
addu $4,$4,$5
addu $5,$4,88
l.d $f0,0($3)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L122:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L120
$L121:
dsz 192($fp)
sw $0,28($fp)
$L124:
lw $2,28($fp)
slt $3,$2,2
bne $3,$0,$L127
j $L125
$L127:
sw $0,16($fp)
$L128:
lw $2,16($fp)
slt $3,$2,2
bne $3,$0,$L131
j $L129
$L131:
lw $2,16($fp)
move $3,$2
sll $2,$3,4
lw $3,28($fp)
move $4,$3
sll $3,$4,5
addu $2,$2,$3
addu $3,$fp,120
addu $2,$3,$2
l.d $f0,8($2)
l.d $f2,184($fp)
add.d $f0,$f0,$f2
s.d $f0,200($fp)
l.d $f12,200($fp)
jal sqrt
s.d $f0,208($fp)
l.d $f0,$LC72
l.d $f2,208($fp)
div.d $f0,$f0,$f2
s.d $f0,216($fp)
dsz 240($fp)
sw $0,24($fp)
$L132:
lw $2,24($fp)
slt $3,$2,2
bne $3,$0,$L135
j $L133
$L135:
sw $0,32($fp)
$L136:
lw $2,32($fp)
slt $3,$2,2
bne $3,$0,$L139
j $L137
$L139:
lw $2,32($fp)
move $3,$2
sll $2,$3,4
lw $3,24($fp)
move $4,$3
sll $3,$4,5
addu $2,$2,$3
addu $3,$fp,56
addu $2,$3,$2
l.d $f0,0($2)
s.d $f0,232($fp)
l.d $f0,232($fp)
l.d $f2,216($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
l.d $f4,232($fp)
neg.d $f2,$f4
mul.d $f0,$f2,$f0
l.d $f2,240($fp)
sub.d $f0,$f0,$f2
s.d $f0,240($fp)
$L138:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L136
$L137:
l.d $f0,240($fp)
neg.d $f2,$f0
s.d $f2,240($fp)
$L134:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L132
$L133:
l.d $f0,152($fp)
l.d $f2,200($fp)
add.d $f0,$f0,$f2
l.d $f2,136($fp)
l.d $f4,200($fp)
add.d $f2,$f2,$f4
mul.d $f0,$f0,$f2
l.d $f2,120($fp)
l.d $f4,200($fp)
add.d $f2,$f2,$f4
l.d $f4,168($fp)
l.d $f6,200($fp)
add.d $f4,$f4,$f6
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
l.d $f2,208($fp)
l.d $f4,$LC73
mul.d $f2,$f2,$f4
l.d $f4,240($fp)
mul.d $f2,$f2,$f4
l.d $f4,192($fp)
sub.d $f2,$f2,$f4
l.d $f4,224($fp)
mul.d $f0,$f0,$f4
sub.d $f2,$f2,$f0
s.d $f2,192($fp)
$L130:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L128
$L129:
l.d $f0,192($fp)
neg.d $f2,$f0
s.d $f2,192($fp)
$L126:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L124
$L125:
.set noreorder
nop
.set reorder
sw $0,28($fp)
$L140:
lw $2,28($fp)
slt $3,$2,2
bne $3,$0,$L143
j $L141
$L143:
sw $0,16($fp)
$L144:
lw $2,16($fp)
slt $3,$2,2
bne $3,$0,$L147
j $L145
$L147:
lw $2,16($fp)
move $3,$2
sll $2,$3,4
lw $3,28($fp)
move $4,$3
sll $3,$4,5
addu $2,$2,$3
addu $3,$fp,120
addu $2,$3,$2
l.d $f0,0($2)
l.d $f2,184($fp)
add.d $f0,$f0,$f2
mov.d $f12,$f0
jal sqrt
s.d $f0,208($fp)
l.d $f0,$LC72
l.d $f2,208($fp)
div.d $f0,$f0,$f2
s.d $f0,216($fp)
dsz 240($fp)
sw $0,24($fp)
$L148:
lw $2,24($fp)
slt $3,$2,2
bne $3,$0,$L151
j $L149
$L151:
sw $0,32($fp)
$L152:
lw $2,32($fp)
slt $3,$2,2
bne $3,$0,$L155
j $L153
$L155:
lw $2,32($fp)
move $3,$2
sll $2,$3,4
lw $3,24($fp)
move $4,$3
sll $3,$4,5
addu $2,$2,$3
addu $3,$fp,56
addu $2,$3,$2
l.d $f0,8($2)
s.d $f0,232($fp)
l.d $f0,232($fp)
l.d $f2,216($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
l.d $f4,232($fp)
neg.d $f2,$f4
mul.d $f0,$f2,$f0
l.d $f2,240($fp)
sub.d $f0,$f0,$f2
s.d $f0,240($fp)
$L154:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L152
$L153:
l.d $f0,240($fp)
neg.d $f2,$f0
s.d $f2,240($fp)
$L150:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L148
$L149:
l.d $f0,208($fp)
l.d $f2,$LC73
mul.d $f0,$f0,$f2
l.d $f2,240($fp)
mul.d $f0,$f0,$f2
l.d $f2,192($fp)
sub.d $f0,$f0,$f2
s.d $f0,192($fp)
$L146:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L144
$L145:
l.d $f0,192($fp)
neg.d $f2,$f0
s.d $f2,192($fp)
$L142:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L140
$L141:
lw $3,40($fp)
lw $2,48($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,264($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,192($fp)
s.d $f0,0($2)
lw $3,48($fp)
lw $2,40($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,264($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,192($fp)
s.d $f0,0($2)
$L118:
lw $3,48($fp)
addu $2,$3,1
move $3,$2
sw $3,48($fp)
j $L116
$L117:
$L114:
lw $3,40($fp)
addu $2,$3,1
move $3,$2
sw $3,40($fp)
j $L112
$L113:
$L110:
lw $3,36($fp)
addu $2,$3,1
move $3,$2
sw $3,36($fp)
j $L108
$L109:
$L107:
move $sp,$fp # sp not trusted here
lw $31,252($sp)
lw $fp,248($sp)
addu $sp,$sp,256
j $31
.end SetUp1
.loc 1 673
.ent SetUp2
SetUp2:
.frame $fp,512,$31 # vars= 440, regs= 2/6, args= 16, extra= 0
.mask 0xc0000000,-52
.fmask 0xfff00000,-4
subu $sp,$sp,512
sw $31,460($sp)
sw $fp,456($sp)
s.d $f30,504($sp)
s.d $f28,496($sp)
s.d $f26,488($sp)
s.d $f24,480($sp)
s.d $f22,472($sp)
s.d $f20,464($sp)
move $fp,$sp
sw $4,512($fp)
sw $5,516($fp)
sw $6,520($fp)
sw $7,524($fp)
sw $0,20($fp)
$L157:
lw $2,20($fp)
slt $3,$2,6
bne $3,$0,$L160
j $L158
$L160:
sw $0,16($fp)
$L161:
lw $2,16($fp)
slt $3,$2,2
bne $3,$0,$L164
j $L162
$L164:
lw $2,20($fp)
lw $4,16($fp)
addu $3,$2,$4
addu $2,$3,1
li $6,0x2aaaaaab # 715827883
mult $2,$6
mfhi $5
mflo $4
srl $6,$5,0
move $7,$0
sra $4,$2,31
subu $3,$6,$4
move $5,$3
sll $4,$5,1
addu $4,$4,$3
sll $3,$4,1
subu $2,$2,$3
sw $2,28($fp)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,516($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,24($fp)
$L165:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,516($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,24($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L166
$L168:
lw $3,16($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,524($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $3,28($fp)
move $4,$3
sll $3,$4,3
lw $4,516($fp)
addu $3,$3,$4
lw $4,0($3)
move $3,$4
sll $4,$3,3
lw $5,524($fp)
addu $3,$4,$5
li $4,0x00008000 # 32768
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
sub.d $f0,$f0,$f2
s.d $f0,216($fp)
lw $3,16($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,528($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,216($fp)
l.d $f2,0($2)
add.d $f0,$f0,$f2
s.d $f0,224($fp)
l.d $f0,216($fp)
l.d $f2,216($fp)
mul.d $f0,$f0,$f2
s.d $f0,216($fp)
l.d $f0,224($fp)
l.d $f2,224($fp)
mul.d $f0,$f0,$f2
s.d $f0,224($fp)
lw $2,28($fp)
move $3,$2
sll $2,$3,3
lw $3,516($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,32($fp)
$L169:
lw $2,28($fp)
move $3,$2
sll $2,$3,3
lw $3,516($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,32($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L170
$L172:
lw $3,16($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,524($fp)
addu $3,$4,$5
addu $2,$2,$3
li $3,0x00000001 # 1
lw $5,16($fp)
subu $4,$3,$5
lw $3,24($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,524($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
sub.d $f0,$f0,$f2
s.d $f0,56($fp)
lw $3,16($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,528($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,56($fp)
l.d $f2,0($2)
add.d $f0,$f0,$f2
s.d $f0,64($fp)
li $2,0x00000001 # 1
lw $4,16($fp)
subu $3,$2,$4
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,528($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,56($fp)
l.d $f2,0($2)
sub.d $f0,$f0,$f2
s.d $f0,72($fp)
li $2,0x00000001 # 1
lw $4,16($fp)
subu $3,$2,$4
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,528($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,64($fp)
l.d $f2,0($2)
sub.d $f0,$f0,$f2
s.d $f0,80($fp)
l.d $f0,56($fp)
l.d $f2,56($fp)
mul.d $f0,$f0,$f2
s.d $f0,88($fp)
l.d $f0,64($fp)
l.d $f2,64($fp)
mul.d $f0,$f0,$f2
s.d $f0,96($fp)
l.d $f0,72($fp)
l.d $f2,72($fp)
mul.d $f0,$f0,$f2
s.d $f0,104($fp)
l.d $f0,80($fp)
l.d $f2,80($fp)
mul.d $f0,$f0,$f2
s.d $f0,112($fp)
li $2,0x00000001 # 1
lw $4,16($fp)
subu $3,$2,$4
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,524($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $3,24($fp)
move $4,$3
sll $3,$4,3
lw $4,524($fp)
addu $3,$3,$4
li $4,0x00008000 # 32768
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
sub.d $f0,$f0,$f2
s.d $f0,232($fp)
li $2,0x00000001 # 1
lw $4,16($fp)
subu $3,$2,$4
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,528($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,232($fp)
l.d $f2,0($2)
add.d $f0,$f0,$f2
s.d $f0,240($fp)
l.d $f0,232($fp)
l.d $f2,232($fp)
mul.d $f0,$f0,$f2
l.d $f2,$LC74
add.d $f0,$f0,$f2
s.d $f0,232($fp)
l.d $f0,240($fp)
l.d $f2,240($fp)
mul.d $f0,$f0,$f2
l.d $f2,$LC74
add.d $f0,$f0,$f2
s.d $f0,240($fp)
l.d $f0,216($fp)
l.d $f2,232($fp)
add.d $f0,$f0,$f2
s.d $f0,152($fp)
l.d $f0,216($fp)
l.d $f2,240($fp)
add.d $f0,$f0,$f2
s.d $f0,160($fp)
l.d $f0,224($fp)
l.d $f2,232($fp)
add.d $f0,$f0,$f2
s.d $f0,168($fp)
l.d $f0,224($fp)
l.d $f2,240($fp)
add.d $f0,$f0,$f2
s.d $f0,176($fp)
l.d $f12,152($fp)
jal sqrt
s.d $f0,120($fp)
l.d $f12,160($fp)
jal sqrt
s.d $f0,128($fp)
l.d $f12,168($fp)
jal sqrt
s.d $f0,136($fp)
l.d $f12,176($fp)
jal sqrt
s.d $f0,144($fp)
l.d $f0,$LC75
l.d $f2,120($fp)
div.d $f0,$f0,$f2
s.d $f0,184($fp)
l.d $f0,$LC75
l.d $f2,128($fp)
div.d $f0,$f0,$f2
s.d $f0,192($fp)
l.d $f0,$LC75
l.d $f2,136($fp)
div.d $f0,$f0,$f2
s.d $f0,200($fp)
l.d $f0,$LC75
l.d $f2,144($fp)
div.d $f0,$f0,$f2
s.d $f0,208($fp)
l.d $f0,56($fp)
l.d $f2,184($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f20,$f0
l.d $f0,64($fp)
l.d $f2,184($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f22,$f0
l.d $f0,72($fp)
l.d $f2,184($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f24,$f0
l.d $f0,80($fp)
l.d $f2,184($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f26,$f0
l.d $f0,56($fp)
l.d $f2,192($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f28,$f0
l.d $f0,64($fp)
l.d $f2,192($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
mov.d $f30,$f0
l.d $f0,72($fp)
l.d $f2,192($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,376($fp)
l.d $f0,80($fp)
l.d $f2,192($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,384($fp)
l.d $f0,56($fp)
l.d $f2,200($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,392($fp)
l.d $f0,64($fp)
l.d $f2,200($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,400($fp)
l.d $f0,72($fp)
l.d $f2,200($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,408($fp)
l.d $f0,80($fp)
l.d $f2,200($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,416($fp)
l.d $f0,56($fp)
l.d $f2,208($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,424($fp)
l.d $f0,64($fp)
l.d $f2,208($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,432($fp)
l.d $f0,72($fp)
l.d $f2,208($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
s.d $f0,440($fp)
l.d $f0,80($fp)
l.d $f2,208($fp)
mul.d $f0,$f0,$f2
mov.d $f12,$f0
jal atan
l.d $f4,56($fp)
mul.d $f2,$f20,$f4
l.d $f6,64($fp)
mul.d $f4,$f22,$f6
sub.d $f2,$f2,$f4
l.d $f6,72($fp)
mul.d $f4,$f24,$f6
sub.d $f2,$f2,$f4
l.d $f6,80($fp)
mul.d $f4,$f26,$f6
add.d $f2,$f2,$f4
l.d $f4,120($fp)
mul.d $f2,$f2,$f4
l.d $f4,56($fp)
neg.d $f6,$f4
mul.d $f4,$f6,$f28
l.d $f8,64($fp)
mul.d $f6,$f30,$f8
add.d $f4,$f4,$f6
l.d $f8,72($fp)
l.d $f10,376($fp)
mul.d $f6,$f10,$f8
add.d $f4,$f4,$f6
l.d $f8,80($fp)
l.d $f10,384($fp)
mul.d $f6,$f10,$f8
sub.d $f4,$f4,$f6
l.d $f6,128($fp)
mul.d $f4,$f4,$f6
add.d $f2,$f2,$f4
l.d $f4,56($fp)
neg.d $f6,$f4
l.d $f10,392($fp)
mul.d $f4,$f6,$f10
l.d $f8,64($fp)
l.d $f10,400($fp)
mul.d $f6,$f10,$f8
add.d $f4,$f4,$f6
l.d $f8,72($fp)
l.d $f10,408($fp)
mul.d $f6,$f10,$f8
add.d $f4,$f4,$f6
l.d $f8,80($fp)
l.d $f10,416($fp)
mul.d $f6,$f10,$f8
sub.d $f4,$f4,$f6
l.d $f6,136($fp)
mul.d $f4,$f4,$f6
add.d $f2,$f2,$f4
l.d $f6,56($fp)
l.d $f10,424($fp)
mul.d $f4,$f10,$f6
l.d $f8,64($fp)
l.d $f10,432($fp)
mul.d $f6,$f10,$f8
sub.d $f4,$f4,$f6
l.d $f8,72($fp)
l.d $f10,440($fp)
mul.d $f6,$f10,$f8
sub.d $f4,$f4,$f6
l.d $f6,80($fp)
mul.d $f0,$f0,$f6
add.d $f4,$f4,$f0
l.d $f6,144($fp)
mul.d $f0,$f4,$f6
add.d $f2,$f2,$f0
s.d $f2,48($fp)
l.d $f0,88($fp)
l.d $f2,152($fp)
add.d $f0,$f0,$f2
s.d $f0,248($fp)
l.d $f0,96($fp)
l.d $f2,152($fp)
add.d $f0,$f0,$f2
s.d $f0,256($fp)
l.d $f0,104($fp)
l.d $f2,152($fp)
add.d $f0,$f0,$f2
s.d $f0,264($fp)
l.d $f0,112($fp)
l.d $f2,152($fp)
add.d $f0,$f0,$f2
s.d $f0,272($fp)
l.d $f0,88($fp)
l.d $f2,160($fp)
add.d $f0,$f0,$f2
s.d $f0,280($fp)
l.d $f0,96($fp)
l.d $f2,160($fp)
add.d $f0,$f0,$f2
s.d $f0,288($fp)
l.d $f0,104($fp)
l.d $f2,160($fp)
add.d $f0,$f0,$f2
s.d $f0,296($fp)
l.d $f0,112($fp)
l.d $f2,160($fp)
add.d $f0,$f0,$f2
s.d $f0,304($fp)
l.d $f0,88($fp)
l.d $f2,168($fp)
add.d $f0,$f0,$f2
s.d $f0,312($fp)
l.d $f0,96($fp)
l.d $f2,168($fp)
add.d $f0,$f0,$f2
s.d $f0,320($fp)
l.d $f0,104($fp)
l.d $f2,168($fp)
add.d $f0,$f0,$f2
s.d $f0,328($fp)
l.d $f0,112($fp)
l.d $f2,168($fp)
add.d $f0,$f0,$f2
s.d $f0,336($fp)
l.d $f0,88($fp)
l.d $f2,176($fp)
add.d $f0,$f0,$f2
s.d $f0,344($fp)
l.d $f0,96($fp)
l.d $f2,176($fp)
add.d $f0,$f0,$f2
s.d $f0,352($fp)
l.d $f0,104($fp)
l.d $f2,176($fp)
add.d $f0,$f0,$f2
s.d $f0,360($fp)
l.d $f0,112($fp)
l.d $f2,176($fp)
add.d $f0,$f0,$f2
s.d $f0,368($fp)
l.d $f0,248($fp)
l.d $f2,344($fp)
mul.d $f0,$f0,$f2
l.d $f2,280($fp)
l.d $f4,312($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f20,$f0
l.d $f0,256($fp)
l.d $f2,352($fp)
mul.d $f0,$f0,$f2
l.d $f2,288($fp)
l.d $f4,320($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f22,$f0
l.d $f0,264($fp)
l.d $f2,360($fp)
mul.d $f0,$f0,$f2
l.d $f2,296($fp)
l.d $f4,328($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f24,$f0
l.d $f0,272($fp)
l.d $f2,368($fp)
mul.d $f0,$f0,$f2
l.d $f2,304($fp)
l.d $f4,336($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f26,$f0
l.d $f0,248($fp)
l.d $f2,272($fp)
mul.d $f0,$f0,$f2
l.d $f2,256($fp)
l.d $f4,264($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f28,$f0
l.d $f0,280($fp)
l.d $f2,304($fp)
mul.d $f0,$f0,$f2
l.d $f2,288($fp)
l.d $f4,296($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
mov.d $f30,$f0
l.d $f0,312($fp)
l.d $f2,336($fp)
mul.d $f0,$f0,$f2
l.d $f2,320($fp)
l.d $f4,328($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
s.d $f0,448($fp)
l.d $f0,344($fp)
l.d $f2,368($fp)
mul.d $f0,$f0,$f2
l.d $f2,352($fp)
l.d $f4,360($fp)
mul.d $f2,$f2,$f4
div.d $f0,$f0,$f2
mov.d $f12,$f0
jal log
l.d $f4,88($fp)
mul.d $f2,$f20,$f4
l.d $f6,96($fp)
mul.d $f4,$f22,$f6
sub.d $f2,$f2,$f4
l.d $f6,104($fp)
mul.d $f4,$f24,$f6
sub.d $f2,$f2,$f4
l.d $f6,112($fp)
mul.d $f4,$f26,$f6
add.d $f2,$f2,$f4
l.d $f6,152($fp)
mul.d $f4,$f28,$f6
sub.d $f2,$f2,$f4
l.d $f6,160($fp)
mul.d $f4,$f30,$f6
add.d $f2,$f2,$f4
l.d $f6,168($fp)
l.d $f10,448($fp)
mul.d $f4,$f10,$f6
add.d $f2,$f2,$f4
l.d $f4,176($fp)
mul.d $f0,$f0,$f4
sub.d $f2,$f2,$f0
s.d $f2,40($fp)
lw $3,24($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,520($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,48($fp)
l.d $f2,$LC76
mul.d $f0,$f0,$f2
l.d $f2,40($fp)
add.d $f0,$f0,$f2
abs.d $f2,$f0
s.d $f2,0($2)
lw $3,32($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,520($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,24($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,520($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
$L171:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L169
$L170:
$L167:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L165
$L166:
$L163:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L161
$L162:
$L159:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L157
$L158:
$L156:
move $sp,$fp # sp not trusted here
lw $31,460($sp)
lw $fp,456($sp)
l.d $f30,504($sp)
l.d $f28,496($sp)
l.d $f26,488($sp)
l.d $f24,480($sp)
l.d $f22,472($sp)
l.d $f20,464($sp)
addu $sp,$sp,512
j $31
.end SetUp2
.loc 1 787
.ent SetUp3
SetUp3:
.frame $fp,96,$31 # vars= 72, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,96
sw $31,92($sp)
sw $fp,88($sp)
move $fp,$sp
sw $4,96($fp)
sw $5,100($fp)
sw $6,104($fp)
sw $7,108($fp)
sw $0,20($fp)
$L174:
lw $2,20($fp)
slt $3,$2,6
bne $3,$0,$L177
j $L175
$L177:
sw $0,16($fp)
$L178:
lw $2,16($fp)
slt $3,$2,3
bne $3,$0,$L181
j $L179
$L181:
lw $2,16($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,24
lw $4,20($fp)
lw $3,16($fp)
move $5,$3
sll $3,$5,3
move $6,$4
sll $5,$6,1
addu $5,$5,$4
sll $4,$5,3
lw $5,108($fp)
addu $4,$4,$5
addu $3,$3,$4
l.d $f0,$LC77
l.d $f2,0($3)
div.d $f0,$f0,$f2
s.d $f0,0($2)
lw $2,16($fp)
move $3,$2
sll $2,$3,3
addu $4,$fp,16
addu $3,$2,$4
addu $2,$3,48
lw $4,20($fp)
lw $3,16($fp)
move $5,$3
sll $3,$5,3
move $6,$4
sll $5,$6,1
addu $5,$5,$4
sll $4,$5,3
lw $5,112($fp)
addu $4,$4,$5
addu $3,$3,$4
lw $4,16($fp)
move $5,$4
sll $4,$5,3
addu $5,$fp,16
addu $4,$4,$5
addu $5,$4,24
l.d $f0,0($3)
l.d $f2,0($5)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L180:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L178
$L179:
.set noreorder
nop
.set reorder
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,24($fp)
$L182:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,24($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L183
$L185:
dsz 32($fp)
sw $0,28($fp)
$L186:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
lw $3,28($fp)
lw $2,0($2)
slt $3,$3,$2
bne $3,$0,$L189
j $L187
$L189:
lw $3,24($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,116($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,32($fp)
l.d $f2,0($2)
add.d $f0,$f0,$f2
s.d $f0,32($fp)
$L188:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L186
$L187:
.set noreorder
nop
.set reorder
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,0($3)
addu $3,$2,1
sw $3,28($fp)
$L190:
lw $2,28($fp)
lw $3,96($fp)
slt $2,$2,$3
bne $2,$0,$L193
j $L191
$L193:
lw $3,24($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,116($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,32($fp)
l.d $f2,0($2)
add.d $f0,$f0,$f2
s.d $f0,32($fp)
$L192:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L190
$L191:
lw $2,24($fp)
move $3,$2
sll $2,$3,3
lw $3,104($fp)
addu $2,$2,$3
l.d $f0,32($fp)
l.d $f4,0($2)
sub.d $f2,$f0,$f4
abs.d $f0,$f2
l.d $f2,32($fp)
l.d $f4,$LC78
mul.d $f2,$f2,$f4
c.lt.d $f2,$f0
bc1f $L194
la $4,$LC79
jal printf
move $2,$0
j $L173
$L194:
l.d $f0,32($fp)
neg.d $f2,$f0
s.d $f2,32($fp)
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,28($fp)
$L195:
lw $2,20($fp)
move $3,$2
sll $2,$3,3
lw $3,100($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,28($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L196
$L198:
lw $3,24($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,116($fp)
addu $3,$4,$5
addu $2,$2,$3
dsz 0($2)
$L197:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L195
$L196:
.set noreorder
nop
.set reorder
sw $0,16($fp)
$L199:
lw $2,16($fp)
slt $3,$2,3
bne $3,$0,$L202
j $L200
$L202:
lw $3,16($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,120($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $3,16($fp)
move $4,$3
sll $3,$4,3
addu $4,$fp,16
addu $3,$3,$4
addu $4,$3,24
l.d $f0,0($4)
l.d $f2,32($fp)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $3,16($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,124($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $3,16($fp)
move $4,$3
sll $3,$4,3
addu $4,$fp,16
addu $3,$3,$4
addu $4,$3,48
l.d $f0,0($4)
l.d $f2,32($fp)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L201:
lw $3,16($fp)
addu $2,$3,1
move $3,$2
sw $3,16($fp)
j $L199
$L200:
$L184:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L182
$L183:
$L176:
lw $3,20($fp)
addu $2,$3,1
move $3,$2
sw $3,20($fp)
j $L174
$L175:
li $2,0x00000001 # 1
j $L173
$L173:
move $sp,$fp # sp not trusted here
lw $31,92($sp)
lw $fp,88($sp)
addu $sp,$sp,96
j $31
.end SetUp3
.loc 1 855
.ent Solver
Solver:
.frame $fp,56,$31 # vars= 24, regs= 2/0, args= 24, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,56
sw $31,52($sp)
sw $fp,48($sp)
move $fp,$sp
sw $4,56($fp)
sw $5,60($fp)
sw $6,64($fp)
sw $7,68($fp)
sw $0,36($fp)
$L204:
lw $2,36($fp)
slt $3,$2,3
bne $3,$0,$L207
j $L205
$L207:
lw $2,60($fp)
sw $2,24($fp)
$L208:
lw $2,24($fp)
lw $3,56($fp)
slt $2,$2,$3
bne $2,$0,$L211
j $L209
$L211:
lw $3,24($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,24($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,68($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
lw $3,36($fp)
lw $2,24($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,24($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,72($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
sw $0,28($fp)
$L212:
lw $2,28($fp)
lw $3,24($fp)
slt $2,$2,$3
bne $2,$0,$L215
j $L213
$L215:
lw $3,24($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,28($fp)
lw $3,24($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,64($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
$L214:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L212
$L213:
$L210:
lw $3,24($fp)
addu $2,$3,1
move $3,$2
sw $3,24($fp)
j $L208
$L209:
.set noreorder
nop
.set reorder
sw $0,28($fp)
$L216:
lw $2,28($fp)
lw $3,60($fp)
slt $2,$2,$3
bne $2,$0,$L219
j $L217
$L219:
lw $3,28($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,28($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,68($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,$LC80
l.d $f2,0($3)
div.d $f0,$f0,$f2
s.d $f0,0($2)
lw $3,36($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,28($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,72($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
$L218:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L216
$L217:
.set noreorder
nop
.set reorder
lw $2,60($fp)
sw $2,28($fp)
$L220:
lw $2,28($fp)
lw $3,56($fp)
slt $2,$2,$3
bne $2,$0,$L223
j $L221
$L223:
lw $2,60($fp)
sw $2,32($fp)
$L224:
lw $2,32($fp)
lw $3,28($fp)
slt $2,$2,$3
bne $2,$0,$L227
j $L225
$L227:
lw $2,32($fp)
move $3,$2
sll $2,$3,14
lw $3,64($fp)
addu $2,$2,$3
lw $3,28($fp)
move $4,$3
sll $3,$4,14
lw $4,64($fp)
addu $3,$3,$4
li $4,0x00000001 # 1
sw $4,16($sp)
lw $4,32($fp)
move $5,$2
li $6,0x00000001 # 1
move $7,$3
jal Ddot
lw $3,28($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,28($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,64($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f2,0($3)
sub.d $f0,$f2,$f0
s.d $f0,0($2)
$L226:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L224
$L225:
.set noreorder
nop
.set reorder
sw $0,32($fp)
$L228:
lw $2,32($fp)
lw $3,28($fp)
slt $2,$2,$3
bne $2,$0,$L231
j $L229
$L231:
lw $3,28($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,40($fp)
lw $3,28($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,32($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,64($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,40($fp)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
lw $3,28($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,28($fp)
lw $3,28($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,64($fp)
addu $4,$5,$6
addu $3,$3,$4
lw $5,28($fp)
lw $4,32($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,64($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,40($fp)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
l.d $f2,0($3)
sub.d $f0,$f2,$f0
s.d $f0,0($2)
$L230:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L228
$L229:
lw $3,28($fp)
lw $2,28($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,64($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,28($fp)
lw $3,28($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,64($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,$LC80
l.d $f2,0($3)
div.d $f0,$f0,$f2
s.d $f0,0($2)
$L222:
lw $3,28($fp)
addu $2,$3,1
move $3,$2
sw $3,28($fp)
j $L220
$L221:
.set noreorder
nop
.set reorder
lw $2,60($fp)
sw $2,32($fp)
$L232:
lw $2,32($fp)
lw $3,56($fp)
slt $2,$2,$3
bne $2,$0,$L235
j $L233
$L235:
lw $2,36($fp)
move $3,$2
sll $2,$3,14
lw $3,76($fp)
addu $2,$2,$3
lw $3,32($fp)
move $4,$3
sll $3,$4,14
lw $4,64($fp)
addu $3,$3,$4
li $4,0x00000001 # 1
sw $4,16($sp)
lw $4,32($fp)
move $5,$2
li $6,0x00000001 # 1
move $7,$3
jal Ddot
lw $3,36($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,76($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f2,0($3)
sub.d $f0,$f2,$f0
s.d $f0,0($2)
$L234:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L232
$L233:
.set noreorder
nop
.set reorder
sw $0,32($fp)
$L236:
lw $2,32($fp)
lw $3,56($fp)
slt $2,$2,$3
bne $2,$0,$L239
j $L237
$L239:
lw $3,36($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,76($fp)
addu $4,$5,$6
addu $3,$3,$4
lw $5,32($fp)
lw $4,32($fp)
move $6,$4
sll $4,$6,3
sll $6,$5,14
lw $7,64($fp)
addu $5,$6,$7
addu $4,$4,$5
l.d $f0,0($3)
l.d $f2,0($4)
mul.d $f0,$f0,$f2
s.d $f0,0($2)
$L238:
lw $3,32($fp)
addu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L236
$L237:
.set noreorder
nop
.set reorder
lw $2,56($fp)
subu $3,$2,2
sw $3,32($fp)
$L240:
lw $2,32($fp)
lw $3,60($fp)
slt $2,$2,$3
bne $2,$0,$L241
$L243:
lw $3,56($fp)
subu $2,$3,1
lw $3,32($fp)
subu $2,$2,$3
lw $3,36($fp)
move $4,$3
sll $3,$4,14
lw $4,76($fp)
addu $3,$3,$4
lw $4,32($fp)
move $5,$4
sll $4,$5,3
addu $5,$4,8
addu $3,$3,$5
lw $4,32($fp)
move $5,$4
sll $4,$5,14
addu $5,$4,16384
lw $6,64($fp)
addu $4,$5,$6
lw $5,32($fp)
move $6,$5
sll $5,$6,3
addu $7,$4,$5
li $4,0x00000800 # 2048
sw $4,16($sp)
move $4,$2
move $5,$3
li $6,0x00000001 # 1
jal Ddot
lw $3,36($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,76($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f2,0($3)
sub.d $f0,$f2,$f0
s.d $f0,0($2)
$L242:
lw $3,32($fp)
subu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L240
$L241:
.set noreorder
nop
.set reorder
lw $2,60($fp)
subu $3,$2,1
sw $3,32($fp)
$L244:
lw $2,32($fp)
bgez $2,$L247
j $L245
$L247:
lw $2,56($fp)
lw $3,60($fp)
subu $2,$2,$3
lw $3,36($fp)
move $4,$3
sll $3,$4,14
lw $4,76($fp)
addu $3,$3,$4
lw $4,60($fp)
move $5,$4
sll $4,$5,3
addu $3,$3,$4
lw $4,60($fp)
move $5,$4
sll $4,$5,14
lw $5,64($fp)
addu $4,$4,$5
lw $5,32($fp)
move $6,$5
sll $5,$6,3
addu $7,$4,$5
li $4,0x00000800 # 2048
sw $4,16($sp)
move $4,$2
move $5,$3
li $6,0x00000001 # 1
jal Ddot
lw $3,36($fp)
lw $2,32($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,36($fp)
lw $3,32($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,76($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f2,0($3)
sub.d $f0,$f2,$f0
s.d $f0,0($2)
$L246:
lw $3,32($fp)
subu $2,$3,1
move $3,$2
sw $3,32($fp)
j $L244
$L245:
$L206:
lw $3,36($fp)
addu $2,$3,1
move $3,$2
sw $3,36($fp)
j $L204
$L205:
$L203:
move $sp,$fp # sp not trusted here
lw $31,52($sp)
lw $fp,48($sp)
addu $sp,$sp,56
j $31
.end Solver
.loc 1 919
.ent Storer
Storer:
.frame $fp,80,$31 # vars= 16, regs= 2/0, args= 56, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,80
sw $31,76($sp)
sw $fp,72($sp)
move $fp,$sp
sw $4,80($fp)
sw $5,84($fp)
sw $6,88($fp)
sw $7,92($fp)
la $4,$LC32
la $5,$LC81
jal fopen
sw $2,68($fp)
lw $2,68($fp)
bne $2,$0,$L249
la $4,$LC82
jal printf
li $4,0x00000001 # 1
jal exit
$L249:
lw $4,68($fp)
la $5,$LC50
lw $6,80($fp)
jal fprintf
lw $4,68($fp)
la $5,$LC83
jal fprintf
sw $0,60($fp)
$L250:
lw $2,60($fp)
slt $3,$2,6
bne $3,$0,$L253
j $L251
$L253:
lw $2,60($fp)
move $3,$2
sll $2,$3,3
lw $3,84($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,64($fp)
$L254:
lw $2,60($fp)
move $3,$2
sll $2,$3,3
lw $3,84($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,64($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L255
$L257:
lw $3,64($fp)
addu $2,$3,1
lw $4,60($fp)
addu $3,$4,1
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,88($fp)
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,16($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,88($fp)
addu $4,$4,$5
addu $5,$4,16384
l.d $f0,0($5)
s.d $f0,24($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,88($fp)
addu $4,$4,$5
li $5,0x00008000 # 32768
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,32($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,92($fp)
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,40($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,92($fp)
addu $4,$4,$5
addu $5,$4,16384
l.d $f0,0($5)
s.d $f0,48($sp)
lw $4,68($fp)
la $5,$LC84
move $6,$2
move $7,$3
jal fprintf
$L256:
lw $3,64($fp)
addu $2,$3,1
move $3,$2
sw $3,64($fp)
j $L254
$L255:
$L252:
lw $3,60($fp)
addu $2,$3,1
move $3,$2
sw $3,60($fp)
j $L250
$L251:
lw $4,68($fp)
la $5,$LC85
jal fprintf
sw $0,60($fp)
$L258:
lw $2,60($fp)
slt $3,$2,6
bne $3,$0,$L261
j $L259
$L261:
lw $2,60($fp)
move $3,$2
sll $2,$3,3
lw $3,84($fp)
addu $2,$2,$3
lw $3,0($2)
sw $3,64($fp)
$L262:
lw $2,60($fp)
move $3,$2
sll $2,$3,3
lw $3,84($fp)
addu $2,$2,$3
addu $3,$2,4
lw $2,64($fp)
lw $3,0($3)
slt $2,$3,$2
bne $2,$0,$L263
$L265:
lw $3,64($fp)
addu $2,$3,1
lw $4,60($fp)
addu $3,$4,1
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,96($fp)
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,16($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,96($fp)
addu $4,$4,$5
addu $5,$4,16384
l.d $f0,0($5)
s.d $f0,24($sp)
lw $4,64($fp)
move $5,$4
sll $4,$5,3
lw $5,96($fp)
addu $4,$4,$5
li $5,0x00008000 # 32768
addu $4,$4,$5
l.d $f0,0($4)
s.d $f0,32($sp)
lw $4,68($fp)
la $5,$LC86
move $6,$2
move $7,$3
jal fprintf
$L264:
lw $3,64($fp)
addu $2,$3,1
move $3,$2
sw $3,64($fp)
j $L262
$L263:
$L260:
lw $3,60($fp)
addu $2,$3,1
move $3,$2
sw $3,60($fp)
j $L258
$L259:
lw $4,68($fp)
jal fclose
$L248:
move $sp,$fp # sp not trusted here
lw $31,76($sp)
lw $fp,72($sp)
addu $sp,$sp,80
j $31
.end Storer
.loc 1 972
.ent Verify
Verify:
.frame $fp,72,$31 # vars= 48, regs= 2/0, args= 16, extra= 0
.mask 0xc0000000,-4
.fmask 0x00000000,0
subu $sp,$sp,72
sw $31,68($sp)
sw $fp,64($sp)
move $fp,$sp
sw $4,72($fp)
sw $5,76($fp)
sw $6,80($fp)
sw $7,84($fp)
dsz 16($fp)
sw $0,56($fp)
$L267:
lw $2,56($fp)
slt $3,$2,3
bne $3,$0,$L270
j $L268
$L270:
sw $0,48($fp)
$L271:
lw $2,48($fp)
lw $3,72($fp)
slt $2,$2,$3
bne $2,$0,$L274
j $L272
$L274:
lw $3,48($fp)
lw $2,48($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,56($fp)
lw $3,48($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,80($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
sw $0,52($fp)
$L275:
lw $2,52($fp)
lw $3,48($fp)
slt $2,$2,$3
bne $2,$0,$L278
j $L276
$L278:
lw $3,48($fp)
lw $2,52($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,52($fp)
lw $3,48($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,76($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($3)
s.d $f0,0($2)
$L277:
lw $3,52($fp)
addu $2,$3,1
move $3,$2
sw $3,52($fp)
j $L275
$L276:
$L273:
lw $3,48($fp)
addu $2,$3,1
move $3,$2
sw $3,48($fp)
j $L271
$L272:
mtc1 $0,$f0
mtc1 $0,$f1
s.d $f0,40($fp)
s.d $f0,32($fp)
sw $0,52($fp)
$L279:
lw $2,52($fp)
lw $3,72($fp)
slt $2,$2,$3
bne $2,$0,$L282
j $L280
$L282:
lw $3,56($fp)
lw $2,52($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,84($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f0,0($2)
s.d $f0,24($fp)
sw $0,48($fp)
$L283:
lw $2,48($fp)
lw $3,72($fp)
slt $2,$2,$3
bne $2,$0,$L286
j $L284
$L286:
lw $3,52($fp)
lw $2,48($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
lw $4,56($fp)
lw $3,48($fp)
move $5,$3
sll $3,$5,3
sll $5,$4,14
lw $6,88($fp)
addu $4,$5,$6
addu $3,$3,$4
l.d $f0,0($2)
l.d $f2,0($3)
mul.d $f0,$f0,$f2
l.d $f2,24($fp)
sub.d $f0,$f2,$f0
s.d $f0,24($fp)
lw $3,52($fp)
lw $2,48($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,32($fp)
c.lt.d $f0,$f2
bc1f $L287
l.d $f0,32($fp)
j $L288
$L287:
lw $3,52($fp)
lw $2,48($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,76($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
$L288:
s.d $f0,32($fp)
$L285:
lw $3,48($fp)
addu $2,$3,1
move $3,$2
sw $3,48($fp)
j $L283
$L284:
lw $3,56($fp)
lw $2,52($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,88($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
l.d $f2,40($fp)
c.lt.d $f0,$f2
bc1f $L289
l.d $f0,40($fp)
j $L290
$L289:
lw $3,56($fp)
lw $2,52($fp)
move $4,$2
sll $2,$4,3
sll $4,$3,14
lw $5,88($fp)
addu $3,$4,$5
addu $2,$2,$3
l.d $f2,0($2)
abs.d $f0,$f2
$L290:
s.d $f0,40($fp)
l.d $f2,24($fp)
abs.d $f0,$f2
l.d $f2,16($fp)
add.d $f0,$f2,$f0
s.d $f0,16($fp)
$L281:
lw $3,52($fp)
addu $2,$3,1
move $3,$2
sw $3,52($fp)
j $L279
$L280:
$L269:
lw $3,56($fp)
addu $2,$3,1
move $3,$2
sw $3,56($fp)
j $L267
$L268:
l.d $f0,32($fp)
l.d $f2,40($fp)
mul.d $f0,$f0,$f2
l.d $f2,16($fp)
div.d $f0,$f2,$f0
s.d $f0,16($fp)
l.d $f0,16($fp)
l.d $f2,$LC87
c.lt.d $f2,$f0
bc1f $L291
la $4,$LC88
dlw $6,16($fp)
jal printf
move $2,$0
j $L266
$L291:
li $2,0x00000001 # 1
j $L266
$L266:
move $sp,$fp # sp not trusted here
lw $31,68($sp)
lw $fp,64($sp)
addu $sp,$sp,72
j $31
.end Verify
.loc 1 1120
.ent Ddot
Ddot:
.frame $fp,8,$31 # vars= 0, regs= 1/0, args= 0, extra= 0
.mask 0x40000000,-8
.fmask 0x00000000,0
subu $sp,$sp,8
sw $fp,0($sp)
move $fp,$sp
move $2,$6
move $6,$7
lw $3,24($fp)
mtc1 $0,$f2
mtc1 $0,$f3
$L293:
subu $4,$4,1
li $7,-1 # 0xffffffff
bne $4,$7,$L295
j $L294
$L295:
l.d $f0,0($5)
l.d $f4,0($6)
mul.d $f0,$f0,$f4
add.d $f2,$f2,$f0
move $7,$2
sll $8,$7,3
addu $5,$5,$8
move $7,$3
sll $8,$7,3
addu $6,$6,$8
j $L293
$L294:
mov.d $f0,$f2
j $L292
$L292:
move $sp,$fp # sp not trusted here
lw $fp,0($sp)
addu $sp,$sp,8
j $31
.end Ddot
\ No newline at end of file
RM=rm -rf
all: report.pdf
%.pdf: %.tex
pdflatex $^
pdflatex $^
clean:
$(RM) *.pdf *.aux *.log *.out *.toc *.snm *.nav
......@@ -11,39 +11,188 @@
\usepackage{hyperref}
\title{Peephole Optimizer}
\author{Jayke Meijer (6049885), Richard Torenvliet (6138861), Taddeus Kroes (6054129)}
\author{Jayke Meijer (6049885), Richard Torenvliet (6138861), Tadde\"us Kroes
(6054129)}
\begin{document}
\maketitle
\pagebreak
\tableofcontents
\pagebreak
\section{Introduction}
The goal of the assignment is to implement the optimization stage of the compiler. To reach this goal the parser part of the compiler has to be implemented.
The output of the gcc cross compiler on a c program is our input, the output of the gcc cross compiler is in the form of Assembly code, but not optimized. Our assignment includes a number of c programs, an important part of the assignment is parsing the data. Parsing the data is done with lex and yacc. The lexer is a program that finds keywords that meets the regular expression provided in the lexer. After the lexer, the yaccer takes over. Yaccer can turn the keywords in to an action.
The goal of the assignment is to implement the optimization stage of the
compiler. To reach this goal the parser and the optimizer part of the compiler
have to be implemented.
The output of the xgcc cross compiler on a C program is our input. The output
of the xgcc cross compiler is in the form of Assembly code, but not optimized.
Our assignment includes a number of C programs. An important part of the
assignment is parsing the data. Parsing the data is done with Lex and Yacc. The
Lexer is a program that finds keywords that meets the regular expression
provided in the Lexer. After the Lexer, the Yaccer takes over. Yacc can turn
the keywords in to an action.
\section{Design}
There are two general types of of optimizations of the assembly code, global
optimizations and optimizations on a so-called basic block. These optimizations
will be discussed seperatly
\section{Design \& Implementation}
We decided to implement the optimization in python. We chose this programming language because python is an easy language to manipulate strings, work objective ori\"ented etc.
It turns out that a lex and yacc are also implemented in a python version, named PLY(Python Lex-Yacc). This allows us to use one language, Python, instead of two i.e. C and Python. Also no debugging is needed in C, only in Python which makes our assignment more feasible.
\subsection{Global optimizations}
\subsection{Design}
We only perform one global optimization, which is optimizing branch-jump
statements. The unoptimized Assembly code contains sequences of code of the
following structure:
\begin{lstlisting}
beq ...,$Lx
j $Ly
$Lx: ...\end{lstlisting}
This is inefficient, since there is a jump to a label that follows this code.
It would be more efficient to replace the branch statement with a \texttt{bne}
(the opposite case) to the label used in the jump statement. This way the jump
statement can be eliminated, since the next label follows anyway. The same can
of course be done for the opposite case, where a \texttt{bne} is changed into a
\texttt{beq}.
Since this optimization is done between two series of codes with jumps and
labels, we can not perform this code during the basic block optimizations. The
reason for this will become clearer in the following section.
\subsection*{Implementation}
This
\subsection{Basic Block Optimizations}
\subsubsection*{PLY}
Optimizations on basic blocks are a more important part of the optimizer.
First, what is a basic block? A basic block is a sequence of statements
guaranteed to be executed in that order, and that order alone. This is the case
for a piece of code not containing any branches or jumps.
\section{Results}
To create a basic block, you need to define what is the leader of a basic
block. We call a statement a leader if it is either a jump/branch statement, or
the target of such a statement. Then a basic block runs from one leader
(not including this leader) until the next leader (including this leader). !!!!
There are quite a few optimizations we perform on these basic blocks, so we
will describe the types of optimizations here in stead of each optimization.
\subsubsection*{Standard peephole optimizations}
These are optimizations that simply look for a certain statement or pattern of
statements, and optimize these. For example,
\begin{lstlisting}
mov $regA,$regB
instr $regA, $regA,...
\end{lstlisting}
can be optimized into
\begin{lstlisting}
instr $regA, $regB,...
\end{lstlisting}
since the register \texttt{\$regA} gets overwritten by the second instruction
anyway, and the instruction can easily use \texttt{\$regB} in stead of
\texttt{\$regA}. There are a few more of these cases, which are the same as
those described on the practicum page
\footnote{\url{http://staff.science.uva.nl/~andy/compiler/prac.html}} and in
Appendix \ref{opt}.
\subsubsection*{Common subexpression elimination}
A more advanced optimization is common subexpression elimination. This means
that expensive operations as a multiplication or addition are performed only
once and the result is then `copied' into variables where needed.
A standard method for doing this is the creation of a DAG or Directed Acyclic
Graph. However, this requires a fairly advanced implementation. Our
implementation is a slightly less fancy, but easier to implement.
We search from the end of the block up for instructions that are eligible for
CSE. If we find one, we check further up in the code for the same instruction,
and add that to a temporary storage list. This is done until the beginning of
the block or until one of the arguments of this expression is assigned. Now all
occurences of this expression can be replaced by a move of a new variable that
is generated above the first occurence, which contains the value of the
expression.
This is a less efficient method, but because the basic blocks are in general
not very large and the exectution time of the optimizer is not a primary
concern, this is not a big problem.
\section{Implementation}
\subsection*{pi.c}
We decided to implement the optimization in Python. We chose this programming
language because Python is an easy language to manipulate strings, work
object-oriented etc.
It turns out that a Lex and Yacc are also available as a Python module,
named PLY(Python Lex-Yacc). This allows us to use one language, Python, instead
of two, i.e. C and Python. Also no debugging is needed in C, only in Python
which makes our assignment more feasible.
\subsection*{arcron.c}
The program has three steps, parsing the Assembly code into a datastructure we
can use, the so-called Intermediate Representation, performing optimizations on
this IR and writing the IR back to Assembly.
\subsection*{whet.c}
\subsection{Parsing with PLY}
\subsection*{slalom.c}
\subsection*{clinpack.c}
\section{conclusion}
\end{document}
\ No newline at end of file
\subsection{Optimizations}
\subsection{Writing}
\section{Results}
\subsection{pi.c}
\subsection{arcron.c}
\subsection{whet.c}
\subsection{slalom.c}
\subsection{clinpack.c}
\section{Conclusion}
\appendix
\section{Total list of optimizations}
\label{opt}
\textbf{Global optimizations}
\begin{tabular}{| c c c |}
\hline
\begin{lstlisting}
beq ...,$Lx
j $Ly
$Lx: ...\end{lstlisting} & $\Rightarrow$ & \begin{lstlisting}
bne ...,$Ly
$Lx: ...\end{lstlisting}\\
\hline
\begin{lstlisting}
bne ...,$Lx
j $Ly
$Lx: ...\end{lstlisting} & $\Rightarrow$ & \begin{lstlisting}
beq ...,$Ly
$Lx: ...\end{lstlisting}\\
\hline
\end{tabular}\\
\\
\textbf{Simple basic block optimizations}
\begin{tabular}{|c c c|}
\hline
\begin{lstlisting}
beq ...,$Lx
j $Ly
$Lx: ...\end{lstlisting} & $\Rightarrow$ & \begin{lstlisting}
bne ...,$Ly
$Lx: ...\end{lstlisting}\\
\hline
\end{tabular}\\
\\
\textbf{Advanced basic block optimizations}
\end{document}
......@@ -97,55 +97,102 @@ def generate_flow_graph(blocks):
b.add_edge_to(blocks[i + 1])
def generate_dominator_tree(nodes):
"""Add dominator administration to the given flow graph nodes."""
# Dominator of the start node is the start itself
nodes[0].dom = set([nodes[0]])
# For all other nodes, set all nodes as the dominators
for n in nodes[1:]:
n.dom = set(copy(nodes))
def pred(n, known=[]):
"""Recursively find all predecessors of a node."""
direct = filter(lambda x: x not in known, n.edges_from)
p = copy(direct)
for ancestor in direct:
p += pred(ancestor, direct)
return p
# Iteratively eliminate nodes that are not dominators
changed = True
while changed:
changed = False
for n in nodes[1:]:
old_dom = n.dom
intersection = lambda p1, p2: p1.dom & p2.dom
n.dom = set([n]) | reduce(intersection, pred(n), set([]))
if n.dom != old_dom:
changed = True
def idom(d, n):
"""Check if d immediately dominates n."""
for b in n.dom:
if b != d and b != n and b in n.dom:
return False
return True
# Build tree using immediate dominators
for n in nodes:
for d in n.dom:
if idom(d, n):
d.set_dominates(n)
break
# statements = parse_file(...)
# b = find_basic_blocks(statements)
# generate_flow_graph(b) # nodes now have edges
# generate_dominator_tree(b) # nodes now have dominators
#def generate_dominator_tree(nodes):
# """Add dominator administration to the given flow graph nodes."""
# # Dominator of the start node is the start itself
# nodes[0].dom = set([nodes[0]])
#
# # For all other nodes, set all nodes as the dominators
# for n in nodes[1:]:
# n.dom = set(copy(nodes))
#
# def pred(n, known=[]):
# """Recursively find all predecessors of a node."""
# direct = filter(lambda x: x not in known, n.edges_from)
# p = copy(direct)
#
# for ancestor in direct:
# p += pred(ancestor, direct)
#
# return p
#
# # Iteratively eliminate nodes that are not dominators
# changed = True
#
# while changed:
# changed = False
#
# for n in nodes[1:]:
# old_dom = n.dom
# intersection = lambda p1, p2: p1.dom & p2.dom
# n.dom = set([n]) | reduce(intersection, pred(n), set([]))
#
# if n.dom != old_dom:
# changed = True
#
# def idom(d, n):
# """Check if d immediately dominates n."""
# for b in n.dom:
# if b != d and b != n and b in n.dom:
# return False
#
# return True
#
# # Build tree using immediate dominators
# for n in nodes:
# for d in n.dom:
# if idom(d, n):
# d.set_dominates(n)
# break
class Dag:
def __init__(self, block):
"""Create the Directed Acyclic Graph of all binary operations in a
basic block."""
self.nodes = []
for s in block:
if s.is_command('move') or s.is_monop():
rd, rs = s
y = self.find_reg_node(rs)
self.find_op_node(s.name, rd, y)
elif s.is_binop():
rd, rs, rt = s
y = self.find_reg_node(rs)
z = self.find_reg_node(rt)
self.find_op_node(s.name, rd, y, z)
def find_reg_node(self, reg):
for n in self.nodes:
if reg in n.reg:
return n
node = DagLeaf(reg)
self.nodes.append(node)
return node
def find_op_node(self, op, rd, *args):
for n in self.nodes:
if not isinstance(n, DagLeaf) and n.op == op and n.nodes == args:
n.labels.append(rd)
return n
node = DagNode(op, rd, *args)
self.nodes.append(node)
return node
class DagNode:
def __init__(self, op, label, *args):
self.op = op
self.labels = [label]
self.nodes = args
class DagLeaf:
def __init__(self, reg):
self.reg = reg
......@@ -7,6 +7,45 @@ def optimize_global(statements):
"""Optimize statement sequences on a global level."""
old_len = -1
while old_len != len(statements):
old_len = len(statements)
while not statements.end():
s = statements.read()
# beq/bne ..., $Lx -> bne/beq ..., $Ly
# j $Ly $Lx:
# $Lx:
if s.is_command('beq') or s.is_command('bne'):
following = statements.peek(2)
if len(following) == 2:
j, label = following
if j.is_command('j') and label.is_label(s[2]):
if s.is_command('beq'):
s.name = 'bne'
else:
s.name = 'beq'
s[2] = j[0]
statements.replace(3, [s, label])
def optimize_blocks(blocks):
"""Call the optimizer for each basic block. Do this several times until
no more optimizations are achieved."""
optimized = []
for block in blocks:
optimize_block(block)
return blocks
def optimize_block(statements):
"""Optimize a basic block."""
old_len = -1
while old_len != len(statements):
old_len = len(statements)
......@@ -67,54 +106,15 @@ def optimize_global(statements):
lw[-1] = str(s[2]) + lw[-1][1:]
statements.replace(2, [lw])
continue
# move $RegA, $RegB -> move $RegA, $RegB
# move $RegB, $RegA
if s.is_command('move'):
move = statements.peek()
# beq ..., $Lx -> bne ..., $Ly
# j $Ly $Lx:
# $Lx:
if s.is_command('beq'):
following = statements.peek(2)
if len(following) == 2:
j, label = following
if j.is_command('j') and label.is_label(s[2]):
s.name = 'bne'
s[2] = j[0]
statements.replace(3, [s, label])
def optimize_blocks(blocks):
"""Call the optimizer for each basic block. Do this several times until
no more optimizations are achieved."""
changed = True
while changed:
changed = False
optimized = []
for block in blocks:
block_changed, b = optimize_block(block)
optimized.append(b)
if block_changed:
changed = True
blocks = optimized
return reduce(lambda a, b: a + b, blocks, [])
def optimize_block(statements):
"""Optimize a basic block."""
changed = False
output_statements = []
for statement in statements:
new_statement = statement
output_statements.append(new_statement)
return changed, output_statements
if move.is_command('move') and move[0] == s[1] and \
move[1] == s[0]:
statements.replace(2, [s])
def optimize(statements, verbose=0):
......@@ -143,7 +143,7 @@ def optimize(statements, verbose=0):
print 'Original statements: %d' % o
print 'After global optimization: %d' % g
print 'After basic blocks optimization: %d' % b
print 'Speedup: %d (%d%%)' \
% (b - o, int((b - o) / o * 100))
print 'Optimization: %d (%d%%)' \
% (b - o, int((b - o) / float(o) * 100))
return opt_blocks
......@@ -32,7 +32,7 @@ def t_DIRECTIVE(t):
return t
def t_hex_word(t):
r'0x[0-9a-fA-F]{8}'
r'0x([0-9a-fA-F]{8}|[0-9a-fA-F]{4})'
t.type = 'WORD'
return t
......@@ -47,7 +47,7 @@ def t_int(t):
return t
def t_WORD(t):
r'[a-zA-Z0-9$_.+()]+'
r'[a-zA-Z0-9$_.+()-]+'
return t
# Ignore whitespaces
......
......@@ -21,7 +21,7 @@ class Statement:
arguments."""
return self.stype == other.stype and self.name == other.name \
and self.args == other.args
def __len__(self):
return len(self.args)
......@@ -74,6 +74,14 @@ class Statement:
return self.is_command() \
and re.match('^(add|sub|mult|div|abs|neg)(u|\.d)?$', self.name)
def is_monop(self):
"""Check if the statement is an unary operation."""
return len(self) == 2 and self.is_arith()
def is_binop(self):
"""Check if the statement is an binary operation."""
return self.is_command() and len(self) == 3 and not self.is_jump()
def jump_target(self):
"""Get the jump target of this statement."""
if not self.is_jump():
......@@ -110,7 +118,10 @@ class Block:
def peek(self, count=1):
"""Read the statements until an offset from the current pointer
position."""
position."""
if self.end():
return Statement('empty', '') if count == 1 else []
return self.statements[self.pointer] if count == 1 \
else self.statements[self.pointer:self.pointer + count]
......@@ -120,7 +131,7 @@ class Block:
replacement."""
if self.pointer == 0:
raise Exception('No statement have been read yet.')
if start == None:
start = self.pointer - 1
......
......@@ -12,13 +12,15 @@ def write_statements(statements):
if s.is_label():
line = s.name + ':'
indent_level = 1
elif s.is_inline_comment():
line = '#' + s.name
l = len(prevline.expandtabs(4))
tabs = int(ceil((24 - l) / 4.)) + 1
newline = '\t' * tabs
elif s.is_comment():
line = '\t' * indent_level + line
line = '#' + s.name
if s.is_inline_comment():
l = len(prevline.expandtabs(4))
tabs = int(ceil((24 - l) / 4.)) + 1
newline = '\t' * tabs
else:
line = '\t' * indent_level + line
elif s.is_directive():
line = '\t' + s.name
elif s.is_command():
......
......@@ -2,7 +2,7 @@ import unittest
from src.statement import Statement as S
from src.dataflow import BasicBlock as B, find_leaders, find_basic_blocks, \
generate_flow_graph
generate_flow_graph, Dag, DagNode, DagLeaf
class TestDataflow(unittest.TestCase):
......@@ -44,3 +44,56 @@ class TestDataflow(unittest.TestCase):
self.assertEqual(b2.edges_to, [b3])
self.assertIn(b1, b3.edges_from)
self.assertIn(b2, b3.edges_from)
def test_dag_unary(self):
dag = Dag(B([S('command', 'neg.d', '$rd', '$rs')]))
expect = Dag([])
expect.nodes = [DagLeaf('$rs'), DagNode('neg.d', '$rd', DagLeaf('$rs'))]
self.assertEqualDag(dag, expect)
def test_dag_binary(self):
dag = Dag(B([S('command', 'addu', '$rd', '$r1', '$r2')]))
expect = Dag([])
expect.nodes = [DagLeaf('$r1'),
DagLeaf('$r2'),
DagNode('addu', '$rd', DagLeaf('$r1'), DagLeaf('$r2'))]
self.assertEqualDag(dag, expect)
# def test_dag_combinednode(self):
# dag = Dag(B([S('command', 'mult', '$rd1', '$r1', '$r2'),
# S('command', 'mult', '$rd2', '$r1', '$r2')]))
# expect = Dag([])
# multnode = DagNode('mult',
# DagLeaf('$r1'),
# DagLeaf('$r2'))
# multnode.labels = ['$rd1', '$rd2']
# expect.nodes = [DagLeaf('$r1'),
# DagLeaf('$r2'),
# multnode]
#
# self.assertEqualDag(dag, expect)
def assertEqualDag(self, dag1, dag2):
self.assertEqual(len(dag1.nodes), len(dag2.nodes))
for node1, node2 in zip(dag1.nodes, dag2.nodes):
self.assertEqualNodes(node1, node2)
def assertEqualNodes(self, node1, node2):
if isinstance(node1, DagLeaf):
self.assertIsInstance(node2, DagLeaf)
self.assertEqual(node1.reg, node2.reg)
elif isinstance(node2, DagLeaf):
raise AssertionError
else:
self.assertEqual(node1.op , node2.op)
self.assertEqual(node1.labels, node2.labels)
self.assertEqual(len(node1.nodes), len(node2.nodes))
for child1, child2 in zip(node1.nodes, node2.nodes):
self.assertEqualNodes(child1, child2)
import unittest
from src.optimize import optimize_global
from src.optimize import optimize_global, optimize_block, optimize_blocks
from src.statement import Statement as S, Block as B
......@@ -9,26 +9,26 @@ class TestOptimize(unittest.TestCase):
def setUp(self):
pass
def test_optimize_global_movaa(self):
def test_optimize_block_movaa(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
block = B([foo,
S('command', 'move', '$regA', '$regA'),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo, bar])
def test_optimize_global_movab(self):
def test_optimize_block_movab(self):
foo = S('command', 'foo')
move = S('command', 'move', '$regA', '$regB')
bar = S('command', 'bar')
block = B([foo,
move,
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo, move, bar])
def test_optimize_global_movinst_true(self):
def test_optimize_block_movinst_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -36,12 +36,12 @@ class TestOptimize(unittest.TestCase):
S('command', 'move', '$regA', '$regB'),
S('command', 'addu', '$regA', '$regA', 2),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo,
S('command', 'addu', '$regA', '$regB', 2),
bar])
def test_optimize_global_movinst_false(self):
def test_optimize_block_movinst_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
statements = [foo, \
......@@ -50,10 +50,10 @@ class TestOptimize(unittest.TestCase):
bar]
block = B(statements)
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, statements)
def test_optimize_global_instr_mov_jal_true(self):
def test_optimize_block_instr_mov_jal_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -62,14 +62,14 @@ class TestOptimize(unittest.TestCase):
S('command', 'move', '$4', '$regA'),
S('command', 'jal', 'L1'),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo,
S('command', 'addu', '$4', '$regC', 2),
S('command', 'jal', 'L1'),
bar])
def test_optimize_global_instr_mov_jal_false(self):
def test_optimize_block_instr_mov_jal_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -79,11 +79,11 @@ class TestOptimize(unittest.TestCase):
S('command', 'jal', 'L1'), \
bar]
block = B(arguments)
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, arguments)
def test_optimize_global_sw_ld_true(self):
def test_optimize_block_sw_ld_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -91,13 +91,13 @@ class TestOptimize(unittest.TestCase):
S('command', 'sw', '$regA', '$regB'),
S('command', 'ld', '$regA', '$regC'),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo,
S('command', 'sw', '$regA', '$regB'),
bar])
def test_optimize_global_sw_ld_false(self):
def test_optimize_block_sw_ld_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -106,23 +106,23 @@ class TestOptimize(unittest.TestCase):
S('command', 'ld', '$regD', '$regC'), \
bar]
block = B(arguments)
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, arguments)
def test_optimize_global_shift_true(self):
def test_optimize_block_shift_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
block = B([foo,
S('command', 'sll', '$regA', '$regA', 0),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo,
bar])
def test_optimize_global_shift_false(self):
def test_optimize_block_shift_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -130,7 +130,7 @@ class TestOptimize(unittest.TestCase):
S('command', 'sll', '$regA', '$regB', 0), \
bar]
block = B(arguments)
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, arguments)
......@@ -138,11 +138,11 @@ class TestOptimize(unittest.TestCase):
S('command', 'sll', '$regA', '$regA', 1), \
bar]
block2 = B(arguments2)
optimize_global(block2)
optimize_block(block2)
self.assertEquals(block2.statements, arguments2)
def test_optimize_global_add_lw_true(self):
def test_optimize_block_add_lw_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -150,13 +150,13 @@ class TestOptimize(unittest.TestCase):
S('command', 'add', '$regA', '$regA', 10),
S('command', 'lw', '$regB', '0($regA)'),
bar])
optimize_global(block)
optimize_block(block)
self.assertEquals(block.statements, [foo,
S('command', 'lw', '$regB', '10($regA)'),
bar])
def test_optimize_global_add_lw_false(self):
def test_optimize_block_add_lw_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -165,7 +165,7 @@ class TestOptimize(unittest.TestCase):
S('command', 'lw', '$regB', '0($regC)'), \
bar]
block = B(arguments)
optimize_global(block)
optimize_block(block)
arguments2 = [foo, \
S('command', 'add', '$regA', '$regB', 10), \
......@@ -178,15 +178,12 @@ class TestOptimize(unittest.TestCase):
S('command', 'lw', '$regB', '1($regA)'), \
bar]
block3 = B(arguments3)
optimize_global(block3)
optimize_block(block3)
self.assertEquals(block.statements, arguments)
self.assertEquals(block2.statements, arguments2)
self.assertEquals(block3.statements, arguments3)
# beq ..., $Lx -> bne ..., $Ly
# j $Ly $Lx:
# $Lx:
def test_optimize_global_beq_j_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
......@@ -216,3 +213,72 @@ class TestOptimize(unittest.TestCase):
optimize_global(block)
self.assertEquals(block.statements, arguments)
def test_optimize_global_bne_j_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
block = B([foo,
S('command', 'bne', '$regA', '$regB', '$Lx'),
S('command', 'j', '$Ly'),
S('label', '$Lx'),
bar])
optimize_global(block)
self.assertEquals(block.statements, [foo,
S('command', 'beq', '$regA', '$regB', '$Ly'),
S('label', '$Lx'),
bar])
def test_optimize_global_bne_j_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
arguments = [foo, \
S('command', 'bne', '$regA', '$regB', '$Lz'), \
S('command', 'j', '$Ly'), \
S('label', '$Lx'), \
bar]
block = B(arguments)
optimize_global(block)
self.assertEquals(block.statements, arguments)
def test_optimize_block_move_move_true(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
block = B([foo,
S('command', 'move', '$regA', '$regB'),
S('command', 'move', '$regB', '$regA'),
bar])
optimize_block(block)
self.assertEquals(block.statements, [foo,
S('command', 'move', '$regA', '$regB'),
bar])
def test_optimize_block_mov_mov_false(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
arguments = [foo, \
S('command', 'move', '$regA', '$regB'), \
S('command', 'move', '$regB', '$regC'), \
bar]
block = B(arguments)
optimize_block(block)
self.assertEquals(block.statements, arguments)
def test_optimize_blocks(self):
foo = S('command', 'foo')
bar = S('command', 'bar')
block1 = B([foo, bar])
block2 = B([bar, foo])
blocks_in = [block1, block2];
blocks_out = optimize_blocks(blocks_in)
self.assertEquals(blocks_in, blocks_out)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment