Module Name:    src
Committed By:   thorpej
Date:           Tue Mar 19 20:30:05 UTC 2019

Modified Files:
        src/sys/arch/amiga/amiga: locore.s
        src/sys/arch/atari/atari: locore.s

Log Message:
G/C a couple of lingering instances of addupc().  There is still some bit-
rotten profiling code that references it, but that code is already almost
certainly broken for other reasons.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/amiga/amiga/locore.s
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/atari/atari/locore.s

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amiga/amiga/locore.s
diff -u src/sys/arch/amiga/amiga/locore.s:1.156 src/sys/arch/amiga/amiga/locore.s:1.157
--- src/sys/arch/amiga/amiga/locore.s:1.156	Wed Dec 19 13:57:45 2018
+++ src/sys/arch/amiga/amiga/locore.s	Tue Mar 19 20:30:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.156 2018/12/19 13:57:45 maxv Exp $	*/
+/*	$NetBSD: locore.s,v 1.157 2019/03/19 20:30:05 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -1069,44 +1069,6 @@ Lnoflush:
 #include <m68k/m68k/support.s>
 
 /*
- * update profiling information for the user
- * addupc(pc, &u.u_prof, ticks)
- */
-ENTRY(addupc)
-	movl	%a2,%sp@-		| scratch register
-	movl	%sp@(12),%a2		| get &u.u_prof
-	movl	%sp@(8),%d0		| get user pc
-	subl	%a2@(8),%d0		| pc -= pr->pr_off
-	jlt	Lauexit			| less than 0, skip it
-	movl	%a2@(12),%d1		| get pr->pr_scale
-	lsrl	#1,%d0			| pc /= 2
-	lsrl	#1,%d1			| scale /= 2
-	mulul	%d1,%d0			| pc /= scale
-	moveq	#14,%d1
-	lsrl	%d1,%d0			| pc >>= 14
-	bclr	#0,%d0			| pc &= ~1
-	cmpl	%a2@(4),%d0		| too big for buffer?
-	jge	Lauexit			| yes, screw it
-	addl	%a2@,%d0		| no, add base
-	movl	%d0,%sp@-		| push address
-	jbsr	_C_LABEL(fusword)	| grab old value
-	movl	%sp@+,%a0		| grab address back
-	cmpl	#-1,%d0			| access ok
-	jeq	Lauerror		| no, skip out
-	addw	%sp@(18),%d0		| add tick to current value
-	movl	%d0,%sp@-		| push value
-	movl	%a0,%sp@-		| push address
-	jbsr	_C_LABEL(susword)	| write back new value
-	addql	#8,%sp			| pop params
-	tstl	%d0			| fault?
-	jeq	Lauexit			| no, all done
-Lauerror:
-	clrl	%a2@(12)		| clear scale (turn off prof)
-Lauexit:
-	movl	%sp@+,%a2		| restore scratch reg
-	rts
-
-/*
  * non-local gotos
  */
 ENTRY(qsetjmp)

Index: src/sys/arch/atari/atari/locore.s
diff -u src/sys/arch/atari/atari/locore.s:1.112 src/sys/arch/atari/atari/locore.s:1.113
--- src/sys/arch/atari/atari/locore.s:1.112	Wed Dec 19 13:57:46 2018
+++ src/sys/arch/atari/atari/locore.s	Tue Mar 19 20:30:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.112 2018/12/19 13:57:46 maxv Exp $	*/
+/*	$NetBSD: locore.s,v 1.113 2019/03/19 20:30:05 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -1059,44 +1059,6 @@ Lnoflush:
 #include <m68k/m68k/support.s>
 
 /*
- * update profiling information for the user
- * addupc(pc, &u.u_prof, ticks)
- */
-ENTRY(addupc)
-	movl	%a2,%sp@-		|  scratch register
-	movl	%sp@(12),%a2		|  get &u.u_prof
-	movl	%sp@(8),%d0		|  get user pc
-	subl	%a2@(8),%d0		|  pc -= pr->pr_off
-	jlt	Lauexit			|  less than 0, skip it
-	movl	%a2@(12),%d1		|  get pr->pr_scale
-	lsrl	#1,%d0			|  pc /= 2
-	lsrl	#1,%d1			|  scale /= 2
-	mulul	%d1,%d0			|  pc /= scale
-	moveq	#14,%d1
-	lsrl	%d1,%d0			|  pc >>= 14
-	bclr	#0,%d0			|  pc &= ~1
-	cmpl	%a2@(4),%d0		|  too big for buffer?
-	jge	Lauexit			|  yes, screw it
-	addl	%a2@,%d0		|  no, add base
-	movl	%d0,%sp@-		|  push address
-	jbsr	_C_LABEL(fusword)	|  grab old value
-	movl	%sp@+,%a0		|  grab address back
-	cmpl	#-1,%d0			|  access ok
-	jeq	Lauerror		|  no, skip out
-	addw	%sp@(18),%d0		|  add tick to current value
-	movl	%d0,%sp@-		|  push value
-	movl	%a0,%sp@-		|  push address
-	jbsr	_C_LABEL(susword)	|  write back new value
-	addql	#8,%sp			|  pop params
-	tstl	%d0			|  fault?
-	jeq	Lauexit			|  no, all done
-Lauerror:
-	clrl	%a2@(12)		|  clear scale (turn off prof)
-Lauexit:
-	movl	%sp@+,%a2		|  restore scratch reg
-	rts
-
-/*
  * non-local gotos
  */
 ENTRY(qsetjmp)

Reply via email to