Module Name: src Committed By: thorpej Date: Fri Jan 12 01:53:57 UTC 2024
Modified Files: src/sys/arch/amiga/amiga: locore.s src/sys/arch/atari/atari: locore.s src/sys/arch/mvme68k/mvme68k: locore.s src/sys/arch/sun2/sun2: locore.s src/sys/arch/sun3/sun3: locore.s src/sys/arch/sun3/sun3x: locore.s src/sys/arch/virt68k/virt68k: locore.s Log Message: Remove getsp(); nothing uses it. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/sys/arch/amiga/amiga/locore.s cvs rdiff -u -r1.122 -r1.123 src/sys/arch/atari/atari/locore.s cvs rdiff -u -r1.123 -r1.124 src/sys/arch/mvme68k/mvme68k/locore.s cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sun2/sun2/locore.s cvs rdiff -u -r1.101 -r1.102 src/sys/arch/sun3/sun3/locore.s cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sun3/sun3x/locore.s cvs rdiff -u -r1.6 -r1.7 src/sys/arch/virt68k/virt68k/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.166 src/sys/arch/amiga/amiga/locore.s:1.167 --- src/sys/arch/amiga/amiga/locore.s:1.166 Tue Jan 9 04:16:23 2024 +++ src/sys/arch/amiga/amiga/locore.s Fri Jan 12 01:53:56 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.166 2024/01/09 04:16:23 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.167 2024/01/12 01:53:56 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1091,18 +1091,6 @@ ENTRY(ecacheoff) rts /* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - */ -ENTRY(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - movl %d0,%a0 | Comply with ELF ABI - rts - -/* * Check out a virtual address to see if it's okay to write to. * * probeva(va, fc) Index: src/sys/arch/atari/atari/locore.s diff -u src/sys/arch/atari/atari/locore.s:1.122 src/sys/arch/atari/atari/locore.s:1.123 --- src/sys/arch/atari/atari/locore.s:1.122 Tue Jan 9 04:16:23 2024 +++ src/sys/arch/atari/atari/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.122 2024/01/09 04:16:23 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.123 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1110,17 +1110,6 @@ ENTRY(ecacheoff) rts /* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - */ -ENTRY_NOPROFILE(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - rts - -/* * Check out a virtual address to see if it's okay to write to. * * probeva(va, fc) Index: src/sys/arch/mvme68k/mvme68k/locore.s diff -u src/sys/arch/mvme68k/mvme68k/locore.s:1.123 src/sys/arch/mvme68k/mvme68k/locore.s:1.124 --- src/sys/arch/mvme68k/mvme68k/locore.s:1.123 Tue Jan 9 07:28:26 2024 +++ src/sys/arch/mvme68k/mvme68k/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.123 2024/01/09 07:28:26 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.124 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1080,18 +1080,6 @@ ENTRY(ecacheon) ENTRY(ecacheoff) rts -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - */ -ENTRY_NOPROFILE(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - movl %d0,%a0 - rts - ENTRY(getsr) moveq #0,%d0 movw %sr,%d0 Index: src/sys/arch/sun2/sun2/locore.s diff -u src/sys/arch/sun2/sun2/locore.s:1.29 src/sys/arch/sun2/sun2/locore.s:1.30 --- src/sys/arch/sun2/sun2/locore.s:1.29 Wed Mar 16 20:31:02 2022 +++ src/sys/arch/sun2/sun2/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.29 2022/03/16 20:31:02 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.30 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -550,20 +550,6 @@ Ldorte: #undef FPCOPROC #include <m68k/m68k/switch_subr.s> - -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - * - * [I don't think the ENTRY() macro will do the right thing with this -- glass] - */ -GLOBAL(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - rts - ENTRY(getvbr) movc %vbr,%d0 #ifdef __ELF__ Index: src/sys/arch/sun3/sun3/locore.s diff -u src/sys/arch/sun3/sun3/locore.s:1.101 src/sys/arch/sun3/sun3/locore.s:1.102 --- src/sys/arch/sun3/sun3/locore.s:1.101 Wed Mar 16 20:31:02 2022 +++ src/sys/arch/sun3/sun3/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.101 2022/03/16 20:31:02 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.102 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -619,20 +619,6 @@ ENTRY(DCIU) /* ICPL, ICPP, DCPL, DCPP, DCPA, DCFL, DCFP */ /* PCIA, ecacheon, ecacheoff */ -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - * - * [I don't think the ENTRY() macro will do the right thing with this -- glass] - */ -GLOBAL(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - movl %d0,%a0 - rts - ENTRY(getvbr) movc %vbr,%a0 rts Index: src/sys/arch/sun3/sun3x/locore.s diff -u src/sys/arch/sun3/sun3x/locore.s:1.69 src/sys/arch/sun3/sun3x/locore.s:1.70 --- src/sys/arch/sun3/sun3x/locore.s:1.69 Wed Mar 16 20:31:02 2022 +++ src/sys/arch/sun3/sun3x/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.69 2022/03/16 20:31:02 andvar Exp $ */ +/* $NetBSD: locore.s,v 1.70 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -599,20 +599,6 @@ ENTRY(ecacheon) ENTRY(ecacheoff) rts -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - * - * [I don't think the ENTRY() macro will do the right thing with this -- glass] - */ -GLOBAL(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - movl %d0,%a0 - rts - ENTRY(getvbr) movc %vbr,%d0 movl %d0,%a0 Index: src/sys/arch/virt68k/virt68k/locore.s diff -u src/sys/arch/virt68k/virt68k/locore.s:1.6 src/sys/arch/virt68k/virt68k/locore.s:1.7 --- src/sys/arch/virt68k/virt68k/locore.s:1.6 Tue Jan 9 14:24:08 2024 +++ src/sys/arch/virt68k/virt68k/locore.s Fri Jan 12 01:53:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.6 2024/01/09 14:24:08 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.7 2024/01/12 01:53:57 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -648,18 +648,6 @@ ENTRY(ecacheon) ENTRY(ecacheoff) rts -/* - * Get callers current SP value. - * Note that simply taking the address of a local variable in a C function - * doesn't work because callee saved registers may be outside the stack frame - * defined by A6 (e.g. GCC generated code). - */ -ENTRY_NOPROFILE(getsp) - movl %sp,%d0 | get current SP - addql #4,%d0 | compensate for return address - movl %d0,%a0 - rts - ENTRY(getsr) moveq #0,%d0 movw %sr,%d0