File: burnP5.S

package info (click to toggle)
cpuburn 1.4a-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 320 kB
  • ctags: 91
  • sloc: asm: 644; sh: 117; makefile: 55
file content (84 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#  cpuburn-1.4:	 burnP5	  CPU Loading Utility
#  Copyright 1999  Robert J. Redelmeier.  All Right Reserved
#  Licensed under GNU General Public Licence 2.0.  No warrantee.
#  *** USE AT YOUR OWN RISK ***

.text 
#ifdef WINDOWS
.globl _main
_main:
#else
.globl _start
_start:
#endif
	finit
	pushl	%ebp
	movl	%esp, %ebp
	andl	$-32, %ebp
	subl	$96, %esp
	fldl	half
	fstpl	-24(%ebp)
	fldl	one
	fstl	-16(%ebp)
	fld	%st
	fld	%st
after_check:
	xorl	%eax, %eax
	movl	%eax, %ebx
	movl	$200000000, %ecx
.align	32,  0x90
				# MAIN LOOP  16 flops / 18 cycles
crunch:	   
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)

	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
 
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)

	fmull	-24(%ebp) 
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
	fmull	-24(%ebp)
	fxch	%st(1)
	faddl	-16(%ebp)
	fxch	%st(2)
 
	decl	%ecx
	jnz	crunch

	jmp	after_check
	addl	$96,  %esp	# never reached
	popl	%ebp		# no checking done
	movl	$1, %eax
#ifdef WINDOWS
	ret
#else
	int	$0x80
#endif
.data				# Data allocation
.align 32,0
half:	.long 0xffffffff,0x3fdfffff
one:	.long 0xffffffff,0x3fefffff