Home | History | Annotate | Download | only in amd64-linux
      1 
      2      	     # count for 1 million instructions
      3 	     #   total is 2 + 1 + 499997*2 + 3
      4 
      5 	.globl _start
      6 _start:
      7 	xor	%rcx,%rcx		# not needed, pads total to 1M
      8 	xor	%rax,%rax		# not needed, pads total to 1M
      9 
     10 	mov	$499997,%rcx		# load counter
     11 test_loop:
     12 	dec	%rcx			# repeat count times
     13 	jnz	test_loop
     14 
     15 	#================================
     16 	# Exit
     17 	#================================
     18 exit:
     19 	xor     %rdi,%rdi		# we return 0
     20 	mov	$60,%rax		# put exit syscall number (60) in rax
     21 	syscall
     22 
     23