Subject: cycle tests on 020, 030
To: None <port-mac68k@netbsd.org>
From: Kevin Diggs <kevdig@hypersurf.com>
List: port-mac68k
Date: 12/21/2003 15:41:54
This is a multi-part message in MIME format.
--------------523258A90234987744996577
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
Anyone with an 030 or 020 willing to run the attached program (after
building it)? Build with 'gcc -onewcycle newcycle.s'. Run with 'newcycle
<clk in Hz>'.
On my Quadra700 I use 'newcycle 25000000'. Also please run
'sed s/trapf/nop/<newcycle.s>newercycle.s' to replace the 040 nop
(trapf) with an actual
nop. Results from my quadra 700:
[kevdig@Quadra700 kevdig]$ ./newcycle 24800000
Empty loop:
259.886246u, 0.132883s
8263167.751478 loops/sec
3.001270 cycles/loop
Noop loop:
346.558951u, 0.149497s
6196589.759992 loops/sec
4.002201 cycles/loop
DBxx loop:
346.663262u, 0.282339s
6194725.205695 loops/sec
4.003406 cycles/loop
(OK, I lied about what I use for the clock for my 700).
kevin
--------------523258A90234987744996577
Content-Type: text/plain; charset=us-ascii;
name="newcycle.s"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="newcycle.s"
#NO_APP
gcc2_compiled.:
__gnu_compiled_c:
.section .rodata
.LC0:
.ascii "\11%d.%06du, %d.%06ds\12\0"
.LC1:
.ascii "\11%f loops/sec\12\0"
.LC2:
.ascii "\11%f cycles/loop\12\0"
.text
.align 2
.globl printResults
.type printResults,@function
printResults:
link.w %fp,#0
fmovm #0xc,-(%sp)
movm.l #0x3820,-(%sp)
move.l 8(%fp),%a1
move.l 12(%fp),%a0
move.l 20(%fp),%d4
move.l (%a1),%d3
sub.l (%a0),%d3
move.l 4(%a1),%d2
sub.l 4(%a0),%d2
jbpl .L9
subq.l #1,%d3
add.l #1000000,%d2
.L9:
move.l 12(%a1),-(%sp)
move.l 8(%a1),-(%sp)
move.l %d2,-(%sp)
move.l %d3,-(%sp)
pea .LC0
lea printf,%a2
jbsr (%a2)
fmove.l 16(%fp),%fp3
fmove.l %d2,%fp2
fdiv.d #0r1.00000000000000000000e6,%fp2
fadd.l %d3,%fp2
fmove.x %fp3,%fp0
fdiv.x %fp2,%fp0
fmove.d %fp0,-(%sp)
pea .LC1
jbsr (%a2)
lea (32,%sp),%sp
tst.l %d4
jble .L10
fmove.l %d4,%fp0
fdiv.x %fp3,%fp0
fmul.x %fp2,%fp0
fmove.d %fp0,-(%sp)
pea .LC2
jbsr (%a2)
.L10:
movm.l -40(%fp),#0x41c
fmovm -24(%fp),#0x30
unlk %fp
rts
.Lfe1:
.size printResults,.Lfe1-printResults
.section .rodata
.LC3:
.ascii "Empty loop:\12\0"
.LC4:
.ascii "Noop loop:\12\0"
.LC5:
.ascii "DBxx loop:\12\0"
.text
.align 2
.globl main
.type main,@function
main:
link.w %fp,#-144
movm.l #0x3838,-(%sp)
clr.l %d4
moveq.l #1,%d0
cmp.l 8(%fp),%d0
jbge .L12
move.l 12(%fp),%a0
move.l 4(%a0),-(%sp)
jbsr atoi
move.l %d0,%d4
addq.l #4,%sp
.L12:
moveq.l #-72,%d2
add.l %fp,%d2
move.l %d2,-(%sp)
clr.l -(%sp)
lea getrusage,%a2
jbsr (%a2)
move.l #2147483647,%d0
addq.l #8,%sp
move.l %d2,%d3
move.l %fp,%d2
add.l #-144,%d2
lea printf,%a3
lea printResults,%a4
.align 2
.L15:
subq.l #1,%d0
jbne .L15
move.l %d2,-(%sp)
clr.l -(%sp)
jbsr (%a2)
pea .LC3
jbsr (%a3)
move.l %d4,-(%sp)
move.l #2147483647,-(%sp)
move.l %d3,-(%sp)
move.l %d2,-(%sp)
jbsr (%a4)
move.l %d3,-(%sp)
clr.l -(%sp)
jbsr (%a2)
move.l #2147483647,%d0
lea (36,%sp),%sp
.align 2
.L20:
trapf
subq.l #1,%d0
jbne .L20
move.l %d2,-(%sp)
clr.l -(%sp)
jbsr (%a2)
pea .LC4
jbsr (%a3)
move.l %d4,-(%sp)
move.l #2147483647,-(%sp)
move.l %d3,-(%sp)
move.l %d2,-(%sp)
jbsr (%a4)
move.l %d3,-(%sp)
clr.l -(%sp)
jbsr (%a2)
move.l #2147483647,%d0
lea (36,%sp),%sp
move.l %d0,%d1
clr.w %d1
swap %d1
.align 2
.L25:
dbf %d0,.L25
dbf %d1,.L25
move.l %d2,-(%sp)
clr.l -(%sp)
jbsr (%a2)
pea .LC5
jbsr (%a3)
move.l %d4,-(%sp)
move.l #2147483647,-(%sp)
move.l %d3,-(%sp)
move.l %d2,-(%sp)
jbsr (%a4)
clr.l %d0
movm.l -168(%fp),#0x1c1c
unlk %fp
rts
.Lfe2:
.size main,.Lfe2-main
--------------523258A90234987744996577--