Wed Jun 24 18:09:37 2020 UTC ()
remove unused x86_stos


(maxv)
diff -r1.62 -r1.63 src/sys/arch/amd64/amd64/cpufunc.S
diff -r1.47 -r1.48 src/sys/arch/i386/i386/cpufunc.S
diff -r1.122 -r1.123 src/sys/arch/x86/include/pmap.h

cvs diff -r1.62 -r1.63 src/sys/arch/amd64/amd64/cpufunc.S (expand / switch to unified diff)

--- src/sys/arch/amd64/amd64/cpufunc.S 2020/06/15 20:27:30 1.62
+++ src/sys/arch/amd64/amd64/cpufunc.S 2020/06/24 18:09:37 1.63
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpufunc.S,v 1.62 2020/06/15 20:27:30 riastradh Exp $ */ 1/* $NetBSD: cpufunc.S,v 1.63 2020/06/24 18:09:37 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Charles M. Hannum, and by Andrew Doran. 8 * by Charles M. Hannum, and by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -436,29 +436,20 @@ ENTRY(outw) @@ -436,29 +436,20 @@ ENTRY(outw)
436 movq %rdi, %rdx 436 movq %rdi, %rdx
437 movq %rsi, %rax 437 movq %rsi, %rax
438 outw %ax, %dx 438 outw %ax, %dx
439 ret 439 ret
440END(outw) 440END(outw)
441 441
442ENTRY(outl) 442ENTRY(outl)
443 movq %rdi, %rdx 443 movq %rdi, %rdx
444 movq %rsi, %rax 444 movq %rsi, %rax
445 outl %eax, %dx 445 outl %eax, %dx
446 ret 446 ret
447END(outl) 447END(outl)
448 448
449ENTRY(x86_stos) 
450 movq %rsi,%rax 
451 movq %rdx,%rcx 
452 KMSAN_REP_STOS(8) 
453 rep 
454 stosq 
455 ret 
456END(x86_stos) 
457 
458ENTRY(x86_movs) 449ENTRY(x86_movs)
459 movq %rdx,%rcx 450 movq %rdx,%rcx
460 KMSAN_REP_STOS(8) 451 KMSAN_REP_STOS(8)
461 rep 452 rep
462 movsq 453 movsq
463 ret 454 ret
464END(x86_movs) 455END(x86_movs)

cvs diff -r1.47 -r1.48 src/sys/arch/i386/i386/cpufunc.S (expand / switch to unified diff)

--- src/sys/arch/i386/i386/cpufunc.S 2020/06/15 09:09:23 1.47
+++ src/sys/arch/i386/i386/cpufunc.S 2020/06/24 18:09:37 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpufunc.S,v 1.47 2020/06/15 09:09:23 msaitoh Exp $ */ 1/* $NetBSD: cpufunc.S,v 1.48 2020/06/24 18:09:37 maxv Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1998, 2007, 2020 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2007, 2020 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Charles M. Hannum, and by Andrew Doran. 8 * by Charles M. Hannum, and by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Functions to provide access to i386-specific instructions. 33 * Functions to provide access to i386-specific instructions.
34 * 34 *
35 * These are shared with NetBSD/xen. 35 * These are shared with NetBSD/xen.
36 */ 36 */
37 37
38#include <sys/errno.h> 38#include <sys/errno.h>
39 39
40#include <machine/asm.h> 40#include <machine/asm.h>
41__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.47 2020/06/15 09:09:23 msaitoh Exp $"); 41__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.48 2020/06/24 18:09:37 maxv Exp $");
42 42
43#include "opt_xen.h" 43#include "opt_xen.h"
44 44
45#include <machine/specialreg.h> 45#include <machine/specialreg.h>
46#include <machine/segments.h> 46#include <machine/segments.h>
47 47
48#include "assym.h" 48#include "assym.h"
49 49
50ENTRY(x86_lfence) 50ENTRY(x86_lfence)
51 lock 51 lock
52 addl $0, -4(%esp) 52 addl $0, -4(%esp)
53 ret 53 ret
54END(x86_lfence) 54END(x86_lfence)
@@ -344,42 +344,26 @@ ENTRY(outw) @@ -344,42 +344,26 @@ ENTRY(outw)
344 movl 4(%esp), %edx 344 movl 4(%esp), %edx
345 movl 8(%esp), %eax 345 movl 8(%esp), %eax
346 outw %ax, %dx 346 outw %ax, %dx
347 ret 347 ret
348END(outw) 348END(outw)
349 349
350ENTRY(outl) 350ENTRY(outl)
351 movl 4(%esp), %edx 351 movl 4(%esp), %edx
352 movl 8(%esp), %eax 352 movl 8(%esp), %eax
353 outl %eax, %dx 353 outl %eax, %dx
354 ret 354 ret
355END(outl) 355END(outl)
356 356
357ENTRY(x86_stos) 
358 pushl %ebp 
359 movl %esp,%ebp 
360 pushl %edi 
361 pushl %esi 
362 movl 8(%ebp),%edi 
363 movl 12(%ebp),%eax 
364 movl 16(%ebp),%ecx 
365 rep 
366 stosl 
367 popl %esi 
368 popl %edi 
369 leave 
370 ret 
371END(x86_stos) 
372 
373ENTRY(x86_movs) 357ENTRY(x86_movs)
374 pushl %ebp 358 pushl %ebp
375 movl %esp,%ebp 359 movl %esp,%ebp
376 pushl %edi 360 pushl %edi
377 pushl %esi 361 pushl %esi
378 movl 8(%ebp),%edi 362 movl 8(%ebp),%edi
379 movl 12(%ebp),%esi 363 movl 12(%ebp),%esi
380 movl 16(%ebp),%ecx 364 movl 16(%ebp),%ecx
381 rep 365 rep
382 movsl 366 movsl
383 popl %esi 367 popl %esi
384 popl %edi 368 popl %edi
385 leave 369 leave

cvs diff -r1.122 -r1.123 src/sys/arch/x86/include/pmap.h (expand / switch to unified diff)

--- src/sys/arch/x86/include/pmap.h 2020/05/27 19:33:40 1.122
+++ src/sys/arch/x86/include/pmap.h 2020/06/24 18:09:37 1.123
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.h,v 1.122 2020/05/27 19:33:40 ad Exp $ */ 1/* $NetBSD: pmap.h,v 1.123 2020/06/24 18:09:37 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Charles D. Cranor and Washington University. 4 * Copyright (c) 1997 Charles D. Cranor and Washington University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -602,19 +602,18 @@ extern vaddr_t pmap_direct_end; @@ -602,19 +602,18 @@ extern vaddr_t pmap_direct_end;
602#define PMAP_DIRECT_END pmap_direct_end 602#define PMAP_DIRECT_END pmap_direct_end
603 603
604#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + (pa)) 604#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + (pa))
605#define PMAP_DIRECT_UNMAP(va) ((paddr_t)(va) - PMAP_DIRECT_BASE) 605#define PMAP_DIRECT_UNMAP(va) ((paddr_t)(va) - PMAP_DIRECT_BASE)
606 606
607/* 607/*
608 * Alternate mapping hooks for pool pages. 608 * Alternate mapping hooks for pool pages.
609 */ 609 */
610#define PMAP_MAP_POOLPAGE(pa) PMAP_DIRECT_MAP((pa)) 610#define PMAP_MAP_POOLPAGE(pa) PMAP_DIRECT_MAP((pa))
611#define PMAP_UNMAP_POOLPAGE(va) PMAP_DIRECT_UNMAP((va)) 611#define PMAP_UNMAP_POOLPAGE(va) PMAP_DIRECT_UNMAP((va))
612 612
613#endif /* __HAVE_DIRECT_MAP */ 613#endif /* __HAVE_DIRECT_MAP */
614 614
615void x86_stos(void *, long, long); 
616void x86_movs(void *, void *, long); 615void x86_movs(void *, void *, long);
617 616
618#endif /* _KERNEL */ 617#endif /* _KERNEL */
619 618
620#endif /* _X86_PMAP_H_ */ 619#endif /* _X86_PMAP_H_ */