id stringlengths 22 129 | text stringlengths 60 19.5k | arch stringclasses 9
values | syntax stringclasses 5
values | kind stringclasses 4
values | repo stringclasses 32
values | path stringlengths 7 108 | license stringclasses 10
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 15
values | source_url stringlengths 85 192 | line_start int64 1 5.48k | line_end int64 4 5.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NetBSD/src:sys/arch/sun3/sun3x/locore.s:16 | ENTRY(getvbr)
movc %vbr,%d0
movl %d0,%a0
rts
ENTRY(setvbr)
movl %sp@(4),%d0
movc %d0,%vbr
rts
/*
* Load a new CPU Root Pointer (CRP) into the MMU.
* void loadcrp(struct mmu_rootptr *);
*/
ENTRY(loadcrp)
movl %sp@(4),%a0 | arg1: &CRP
movl #CACHE_CLR,%d0
movc %d0,%cacr | invalidate cache(s)
pflusha | ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | f2eefce19f92c3c2d4969dc54ae1162d132c6f20 | github | kernel | https://github.com/NetBSD/src/blob/f2eefce19f92c3c2d4969dc54ae1162d132c6f20/sys/arch/sun3/sun3x/locore.s | 601 | 660 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:17 | * in case some non-optimized code makes external references.
* Most places will use the inlined functions param.h supplies.
*/
ENTRY(_spl)
clrl %d0
movw %sr,%d0
movl %sp@(4),%d1
movw %d1,%sr
rts
ENTRY(_splraise)
clrl %d0
movw %sr,%d0
movl %d0,%d1
andl #PSL_HIGHIPL,%d1 | old &= PSL_HIGHIPL
cmpl %sp@(4),%d... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | f2eefce19f92c3c2d4969dc54ae1162d132c6f20 | github | kernel | https://github.com/NetBSD/src/blob/f2eefce19f92c3c2d4969dc54ae1162d132c6f20/sys/arch/sun3/sun3x/locore.s | 641 | 700 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:18 | * boundary to minimize cache effects. This guarantees both
* that there will be no prefetch stalls due to cache line burst
* operations and that the loop will run from a single cache
* half-line.
*/
#ifdef __ELF__
.align 8
#else
.align 3
#endif
L_delay:
subl %d1,%d0
jgt L_delay
rts
| Define some addresse... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | f2eefce19f92c3c2d4969dc54ae1162d132c6f20 | github | kernel | https://github.com/NetBSD/src/blob/f2eefce19f92c3c2d4969dc54ae1162d132c6f20/sys/arch/sun3/sun3x/locore.s | 681 | 705 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:16 | ENTRY(getvbr)
movc %vbr,%d0
movl %d0,%a0
rts
ENTRY(setvbr)
movl %sp@(4),%d0
movc %d0,%vbr
rts
/*
* Load a new CPU Root Pointer (CRP) into the MMU.
* void loadcrp(struct mmu_rootptr *);
*/
ENTRY(loadcrp)
movl %sp@(4),%a0 | arg1: &CRP
movl #CACHE_CLR,%d0
movc %d0,%cacr | invalidate cache(s)
pflusha | ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | ee808e2fd9dcf231953d9f4e2e324e871b12bc23 | github | kernel | https://github.com/NetBSD/src/blob/ee808e2fd9dcf231953d9f4e2e324e871b12bc23/sys/arch/sun3/sun3x/locore.s | 601 | 660 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:17 | * in case some non-optimized code makes external references.
* Most places will use the inlined functions param.h supplies.
*/
ENTRY(_getsr)
clrl %d0
movw %sr,%d0
movl %a1,%d0
rts
ENTRY(_spl)
clrl %d0
movw %sr,%d0
movl %sp@(4),%d1
movw %d1,%sr
rts
ENTRY(_splraise)
clrl %d0
movw %sr,%d0
movl %d0,%d1
an... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | ee808e2fd9dcf231953d9f4e2e324e871b12bc23 | github | kernel | https://github.com/NetBSD/src/blob/ee808e2fd9dcf231953d9f4e2e324e871b12bc23/sys/arch/sun3/sun3x/locore.s | 641 | 700 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:15 | */
#include <m68k/m68k/sigcode.s>
#ifdef COMPAT_SUNOS
#include <m68k/m68k/sunos_sigcode.s>
#endif
.text
/*
* Primitives
*/
/*
* Use common m68k support routines.
*/
#include <m68k/m68k/support.s>
/*
* Use common m68k process/lwp switch and context save subroutines.
*/
#define FPCOPROC /* XXX: Temp. Reqd. */
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | 3a3e6e6861107fa30395b99abb65697f94ef1bf8 | github | kernel | https://github.com/NetBSD/src/blob/3a3e6e6861107fa30395b99abb65697f94ef1bf8/sys/arch/sun3/sun3x/locore.s | 561 | 620 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:16 | /*
* 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]
*/
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | 3a3e6e6861107fa30395b99abb65697f94ef1bf8 | github | kernel | https://github.com/NetBSD/src/blob/3a3e6e6861107fa30395b99abb65697f94ef1bf8/sys/arch/sun3/sun3x/locore.s | 601 | 660 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:17 | rts
/*
* Get the physical address of the PTE for a given VA.
*/
ENTRY(ptest_addr)
movl %sp@(4),%a1 | VA
ptestr #5,%a1@,#7,%a0 | %a0 = addr of PTE
movl %a0,%d0 | Result in %d0 (not a pointer return)
rts
/*
* Set processor priority level calls. Most are implemented with
* inline asm expansions. However, w... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | 3a3e6e6861107fa30395b99abb65697f94ef1bf8 | github | kernel | https://github.com/NetBSD/src/blob/3a3e6e6861107fa30395b99abb65697f94ef1bf8/sys/arch/sun3/sun3x/locore.s | 641 | 700 |
NetBSD/src:sys/arch/sun3/sun3x/locore.s:18 | Lsplr:
rts
/*
* _delay(unsigned N)
* Delay for at least (N/256) microseconds.
* This routine depends on the variable: delay_divisor
* which should be set based on the CPU clock rate.
* XXX: Currently this is set based on the CPU model,
* XXX: but this should be determined at run time...
*/
GLOBAL(_delay)
| %... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun3/sun3x/locore.s | BSD-2-Clause | 3a3e6e6861107fa30395b99abb65697f94ef1bf8 | github | kernel | https://github.com/NetBSD/src/blob/3a3e6e6861107fa30395b99abb65697f94ef1bf8/sys/arch/sun3/sun3x/locore.s | 681 | 725 |
NetBSD/src:sys/arch/sun68k/stand/Makefile.inc:1 | # $NetBSD: Makefile.inc,v 1.27 2016/09/03 15:18:21 christos Exp $
NOSSP= # defined
NOPIE= # defined
# Must have S=/usr/src/sys (or equivalent)
# But note: this is w.r.t. a subdirectory
S= ${.CURDIR}/../../../..
.if defined(SA_PROG)
.include <bsd.own.mk>
WARNS?= 2
LIBSA!=cd ${.CURDIR}/../libsa && ${PRINTOBJDIR}
MD... | arm | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/Makefile.inc | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/Makefile.inc | 1 | 60 |
NetBSD/src:sys/arch/sun68k/stand/Makefile.inc:2 | CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
# Make a copy of the executable with its ELF headers removed.
${SA_PROG}.bin : ${SA_PROG}
${OBJCOPY} --output-target=binary ${SA_PROG} $@
${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
... | arm | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/Makefile.inc | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/Makefile.inc | 41 | 68 |
NetBSD/src:sys/arch/sun68k/stand/libsa/Makefile.inc:1 | # $NetBSD: Makefile.inc,v 1.7 2021/01/11 22:01:14 skrll Exp $
S!= cd ${SA_EXTRADIR}/../../../..; pwd
.PATH.c: ${SA_EXTRADIR}
# preferred local sources: gets.c panic.c
SRCS+= clock.c dev_disk.c devopen.c \
idprom.c netif_sun.c \
promboot.c promcons.c promdev.c putstr.c \
sun2.c sun3.c sun3x.c xxboot.c
.PATH.S: $... | riscv | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/libsa/Makefile.inc | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/libsa/Makefile.inc | 1 | 25 |
NetBSD/src:sys/arch/sun68k/stand/libsa/SRT0.S:1 | | $NetBSD: SRT0.S,v 1.2 2008/05/04 00:18:16 martin Exp $
| Copyright (c) 1998 The NetBSD Foundation, Inc.
| All rights reserved.
|
| This code is derived from software contributed to The NetBSD Foundation
| by Gordon W. Ross.
|
| Redistribution and use in source and binary forms, with or without
| modification, are pe... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/libsa/SRT0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/libsa/SRT0.S | 1 | 60 |
NetBSD/src:sys/arch/sun68k/stand/libsa/SRT0.S:2 | .text
ASENTRY_NOPROFILE(start)
| Disable interrupts (just in case...)
movw #PSL_HIGHIPL,%sr
| Check to see if the code is located correctly.
| Get current location via PC-relative load, then...
lea %pc@(start:w),%a0 | current location (0x4000)
| ...force a long (not PC-relative) load to a1 and compare.
lea start:l... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/libsa/SRT0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/libsa/SRT0.S | 41 | 100 |
NetBSD/src:sys/arch/sun68k/stand/libsa/SRT0.S:3 | .set estack,start-60
restart:
| Now in the relocated code, using the monitor stack.
| Save this context so we can return with it.
pea estack
jsr _C_LABEL(setjmp)
addqw #4,%sp
tstl %d0
bne Ldone | here via longjmp
| Switch to our own stack.
lea estack,%a0
movl %a0,%sp
subl %a6,%a6
| Clear out BSS...
lea _eda... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/libsa/SRT0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/libsa/SRT0.S | 81 | 140 |
NetBSD/src:sys/arch/sun68k/stand/libsa/SRT0.S:4 | | function to clear the I-cache
ENTRY(ICIA)
tstl _C_LABEL(_is2)
bne Lret
movl #IC_CLEAR,%d0
movc %d0,%cacr
rts
| function to get the vector base register
ENTRY(getvbr)
movc %vbr,%a0
rts
| Kernel version of setjmp/longjmp (label_t is 16 words)
ENTRY(setjmp)
movl %sp@(4),%a0 | savearea pointer
moveml #0xFCFC,... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/stand/libsa/SRT0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/stand/libsa/SRT0.S | 121 | 152 |
NetBSD/src:sys/arch/sun68k/sun68k/ctrlsp.S:1 | /* $NetBSD: ctrlsp.S,v 1.2 2008/04/28 20:23:39 martin Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Adam Glass.
*
* Redistribution and use in source and binary forms, with or without
* modifi... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/sun68k/ctrlsp.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/sun68k/ctrlsp.S | 1 | 60 |
NetBSD/src:sys/arch/sun68k/sun68k/ctrlsp.S:2 | * unsigned char get_control_byte (char *addr)
*/
ENTRY(get_control_byte)
movc %sfc,%d1 | save sfc
moveq #FC_CONTROL,%d0 | sfc = FC_CONTROL
movec %d0,%sfc
movl %sp@(4),%a0 | src addr
moveq #0,%d0 | get byte
movsb %a0@,%d0
movc %d1,%sfc | restore sfc
rts
/*
* unsigned int get_control_word (char *addr)
*... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/sun68k/sun68k/ctrlsp.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/sun68k/sun68k/ctrlsp.S | 41 | 89 |
NetBSD/src:sys/arch/usermode/usermode/cpufunc.S:1 | #include <machine/asm.h>
#include "assym.h"
#if defined(__i386__)
ENTRY(breakpoint)
pushl %ebp
movl %esp, %ebp
int $0x03 /* paranoid, not 'int3' */
popl %ebp
ret
END(breakpoint)
//#error TODO implement setjmp/longjmp for i386?
#elif defined(__amd64__)
ENTRY(breakpoint)
.byte 0xcc // BKPT_INST, int3
ret
/*
... | x86_64 | gas-att | handwritten | NetBSD/src | sys/arch/usermode/usermode/cpufunc.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/usermode/usermode/cpufunc.S | 1 | 60 |
NetBSD/src:sys/arch/usermode/usermode/cpufunc.S:2 | movq %rdx,56(%rax)
xorl %eax,%eax
ret
END(setjmp)
/*
* int longjmp(label_t *)
*
* Used primarily by DDB.
*/
ENTRY(longjmp)
movq %rdi,%rax
movq (%rax),%rbx
movq 8(%rax),%rsp
movq 16(%rax),%rbp
movq 24(%rax),%r12
movq 32(%rax),%r13
movq 40(%rax),%r14
movq 48(%rax),%r15
movq 56(%rax),%rdx
movq %rdx,(%rsp)... | x86_64 | gas-att | handwritten | NetBSD/src | sys/arch/usermode/usermode/cpufunc.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/usermode/usermode/cpufunc.S | 41 | 77 |
NetBSD/src:sys/arch/vax/boot/Makefile.inc:1 | # $NetBSD: Makefile.inc,v 1.19 2023/01/29 17:00:12 tsutsui Exp $
NOSSP=
NOFORTIFY=
NOPIE=
NODEBUG=
.include <bsd.klinks.mk>
RELOC=0x7d0000
.PATH: ${.CURDIR}/../../vax ${.CURDIR}/../common
CPPFLAGS+=-I.
CPPFLAGS+=-I${.CURDIR}/../../../../
CPPFLAGS+=-I${.CURDIR}/../../
CPPFLAGS+=-I${.CURDIR}/../common
CPPFLAGS+=-I${.... | arm | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/Makefile.inc | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/Makefile.inc | 1 | 28 |
NetBSD/src:sys/arch/vax/boot/boot/consio2.S:1 | /* $NetBSD: consio2.S,v 1.2 2017/05/22 16:59:32 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redist... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/boot/consio2.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/boot/consio2.S | 1 | 60 |
NetBSD/src:sys/arch/vax/boot/boot/consio2.S:2 | ENTRY(rom_getchar, 0x0002) # save-mask: R1
loop: # do {
jsb *_C_LABEL(rom_getc) # call the getc-routine
tstl %r0 # check if char ready
beql loop # } while (R0 == 0)
movl %r1, %r0 # R1 holds char
ret # we are done
ENTRY(rom_testchar, 0)
mnegl $1,%r0
jsb *_C_LABEL(rom_getc)
tstl %r0
beql 1f
m... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/boot/consio2.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/boot/consio2.S | 41 | 100 |
NetBSD/src:sys/arch/vax/boot/boot/consio2.S:3 | */
ENTRY(ka630_rom_putchar, 0x802) # save-mask: R1, R11
movl _C_LABEL(ka630_conspage),%r11
# load location of console page
1: # do {
jsb *0x20(%r11) # is rom ready? (KA630_PUTC_POLL)
blbc %r0,1b # } while (R0 == 0)
movl 4(%ap),%r1 # R1 holds char
jsb *0x24(%r11) # output character (KA630_PUTC)
ret # w... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/boot/consio2.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/boot/consio2.S | 81 | 122 |
NetBSD/src:sys/arch/vax/boot/common/romread.S:1 | /* $NetBSD: romread.S,v 1.2 2017/05/22 17:00:19 ragge Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* This code is derived from software contributed to Ludd by
* Bertram Barth.
*
* Redistribution and use in source and binary forms, with or without
* modification, a... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/romread.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/romread.S | 1 | 60 |
NetBSD/src:sys/arch/vax/boot/common/romread.S:2 | movl 4(%r8), %r1
movl 8(%r8), %r2
movl 12(%r8), %r3
movl 24(%r8), %r6
clrl %r5
movl 4(%ap), %r8
pushl $0
movl $0, 4(%sp)
movl %fp, 0xf0000 # ragge ???
jsb (%r6)
movl 0xf0000, %fp
ret
/*
* romread_uvax (int lbn, int size, void *buf, struct rpb *rpb)
*/
ENTRY(romread_uvax, 0xFFE)
movl 16(%ap),%r11 # ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/romread.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/romread.S | 41 | 84 |
NetBSD/src:sys/arch/vax/boot/common/srt0.S:1 | /* $NetBSD: srt0.S,v 1.6 2018/03/19 15:37:56 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/srt0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/srt0.S | 1 | 60 |
NetBSD/src:sys/arch/vax/boot/common/srt0.S:2 | ALTENTRY(start)
nop;nop;
movl $_C_LABEL(start), %sp # Probably safe place for stack
pushr $0x1fff # save for later usage
subl3 $_C_LABEL(start), $_C_LABEL(edata), %r0
movab _C_LABEL(start), %r1 # get where we are
movl $_C_LABEL(start), %r3 # get where we want to be
cmpl %r1,%r3 # are we where we want to be?
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/srt0.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/srt0.S | 41 | 81 |
NetBSD/src:sys/arch/vax/boot/common/str.S:1 | /* $NetBSD: str.S,v 1.6 2017/05/22 17:00:19 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/str.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/str.S | 1 | 60 |
NetBSD/src:sys/arch/vax/boot/common/str.S:2 | 2: movzbl (%r1)+,%r2
cmpb %r2,$48
blss 1f
cmpb %r2,$57
bgtr 1f
subl2 $48,%r2
mull2 $10,%r0
addl2 %r2,%r0
brb 2b
1: ret
/*
* strchr() small and easy.
*/
ENTRY(strchr, 0)
movq 4(%ap),%r0
1: cmpb (%r0), 8(%ap)
beql 2f
tstb (%r0)+
bneq 1b
clrl %r0
2: ret
/*
* cmpc3 is emulated on MVII.
*/
ENTRY(memcmp, 0... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/str.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/str.S | 41 | 100 |
NetBSD/src:sys/arch/vax/boot/common/str.S:3 | ret
/*
* movc can't do length in excess of 64K, so we shall not use them.
*/
ENTRY(bzero,0)
movl 4(%ap),%r0
movl 8(%ap),%r1
1: clrb (%r0)+
sobgtr %r1,1b
ret
/*
* memcpy and bcopy are the same, except for argument order. Silly stuff.
*/
ENTRY(memcpy,0)
movl 8(%ap),%r0
movl 4(%ap),%r1
brb 1f
ENTRY(bcopy,0)
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/str.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/str.S | 81 | 140 |
NetBSD/src:sys/arch/vax/boot/common/str.S:4 | ENTRY(strlen, 0)
movl 4(%ap), %r0
1: tstb (%r0)+
bneq 1b
decl %r0
subl2 4(%ap), %r0
ret
ENTRY(strncmp, 0)
movl 12(%ap), %r3
bneq 5f
brb 4f
ENTRY(strcmp, 0)
movl $250, %r3 # max string len to compare
5: movl 4(%ap), %r2
movl 8(%ap), %r1
movl $1, %r0
2: cmpb (%r2),(%r1)+
bneq 1f # something differ
tstb (... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/str.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/str.S | 121 | 180 |
NetBSD/src:sys/arch/vax/boot/common/str.S:5 | 1: movb (%r2)+, (%r1)+
beql 2f
sobgtr %r3,1b
ret
2: decl %r1
3: clrb (%r1)+
sobgtr %r3,3b
ret
ENTRY(strcat, 0)
pushl 4(%ap)
calls $1,_C_LABEL(strlen)
addl2 4(%ap),%r0
movl 8(%ap),%r1
1: movb (%r1)+,(%r0)+
bneq 1b
ret
ENTRY(setjmp, 0)
movl 4(%ap), %r0
movl 8(%fp), (%r0)
movl 12(%fp), 4(%r0)
movl 16(%fp)... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/common/str.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/common/str.S | 161 | 194 |
NetBSD/src:sys/arch/vax/boot/xxboot/start.S:2 | #include "../include/asm.h"
_C_LABEL(_start):
_C_LABEL(start):
.globl _C_LABEL(start) # this is the symbolic name for the start
.globl _C_LABEL(_start) # of code to be relocated. We can use this
# to get the actual/real address (pc-rel)
# or to get the relocated address (abs).
.org 0x00 # uVAX booted from... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/xxboot/start.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/xxboot/start.S | 41 | 100 |
NetBSD/src:sys/arch/vax/boot/xxboot/start.S:3 | pushl %r11 # base of rpb
pushl $0 # virtual-flag
pushl $33 # read-logical-block
pushl $1 # lbn to start reading
pushl $7680 # number of bytes to read
pushab start_uvax # buffer-address
calls $6, (%r6) # call the qio-routine
brw start_uvax
# the complete area reserved for label
# must be empty (i.e. filled ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/xxboot/start.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/xxboot/start.S | 81 | 140 |
NetBSD/src:sys/arch/vax/boot/xxboot/start.S:4 | .byte 0x00 # any value
.byte 0x00 # any value
.long SISIZE # size in blocks of secondary image
.long SILOAD # load offset (usually 0)
.long SIOFF # byte offset into secondary image
.long (SISIZE + SILOAD + SIOFF) # sum of previous 3
.align 2
.globl _C_LABEL(from)
_C_LABEL(from):
.long 0
/*
* After boo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/xxboot/start.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/xxboot/start.S | 121 | 180 |
NetBSD/src:sys/arch/vax/boot/xxboot/start.S:5 | 1: incl %r4 # increment block count
movl %r4,%r8 # LBN is in %r8 for rom routine
addl2 $0x200,%r5 # Increase address for next read
cmpl $16,%r4 # read 15 blocks?
beql 2f # Yep
movl %r5,(%sp) # move address to stack also
jsb (%r6) # read 512 bytes
blbs %r0,1b # jump if read succeeded
halt # otherwise di... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/xxboot/start.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/xxboot/start.S | 161 | 220 |
NetBSD/src:sys/arch/vax/boot/xxboot/start.S:6 | movl $relocated, -(%sp) # return-address on top of stack
rei # can be replaced with new address
relocated: # now relocation is done !!!
movl %sp, _C_LABEL(bootregs)
calls $0, _C_LABEL(Xmain) # call Xmain (gcc workaround)which is
halt # not intended to return ...
/*
* hoppabort() is called when jumping to... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/boot/xxboot/start.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/boot/xxboot/start.S | 201 | 243 |
NetBSD/src:sys/arch/vax/stand/Makefile.inc:1 | # $NetBSD: Makefile.inc,v 1.4 2002/08/27 08:53:18 lukem Exp $
NOMAN= # defined
.include <bsd.own.mk>
BINDIR?= /usr/mdec
WARNS?= 1
CPPFLAGS+= -I${.CURDIR}/../..
LDSTATIC= -static | unknown | gas-like | handwritten | NetBSD/src | sys/arch/vax/stand/Makefile.inc | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/stand/Makefile.inc | 1 | 11 |
NetBSD/src:sys/arch/vax/vax/cpu_in_cksum.S:2 | * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specifi... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/cpu_in_cksum.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/cpu_in_cksum.S | 41 | 100 |
NetBSD/src:sys/arch/vax/vax/cpu_in_cksum.S:3 | #
# int cpu_in_cksum(struct mbuf *m, int len, int off, uint32_t initial_sum)
#
ENTRY(cpu_in_cksum, R7|R6)
subl2 $4,%sp
movl 4(%ap),m
movl 8(%ap),len
movl 12(%ap),off
movl 16(%ap),sum
clrl byte_swapped
.Lfirstloop: # for (;;) {
tstl m # if (__predict_false(m == NULL)) {
jeql .Lout_of_data
movl M_LEN(... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/cpu_in_cksum.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/cpu_in_cksum.S | 81 | 140 |
NetBSD/src:sys/arch/vax/vax/cpu_in_cksum.S:4 | movl M_DATA(m),data # data = mtod(m, uint8_t *);
.Lpost_initial_offset:
tstl mlen # if (mlen == 0)
jeql .Lthirdstmt # continue;
cmpl len,mlen # if (mlen > len)
jgeq 1f
movl len,mlen # mlen = len;
1: subl2 mlen,len # len -= mlen
cmpl mlen,$16 # if (mlen < 16)
jlss .Lshort_mbuf # goto short_mbuf;
#
# ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/cpu_in_cksum.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/cpu_in_cksum.S | 121 | 180 |
NetBSD/src:sys/arch/vax/vax/cpu_in_cksum.S:5 | adwc $0,sum
jbr 2b # }
1: addl2 $32,mlen # mlen += 32;
bbc $4,mlen,1f # if (mlen >= 16) {
addl2 (data)+,sum # sum += *(uint32_t *)data;
adwc (data)+,sum # sum += *(uint32_t *)data;
adwc (data)+,sum # sum += *(uint32_t *)data;
adwc (data)+,sum # sum += *(uint32_t *)data;
adwc $0,sum
subl2 $16,mlen ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/cpu_in_cksum.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/cpu_in_cksum.S | 161 | 220 |
NetBSD/src:sys/arch/vax/vax/cpu_in_cksum.S:6 | .Lendsecond:
tstl len # if (len != 0)
jneq .Lout_of_data # goto out_of_data;
tstl byte_swapped # if (byte_swapped) {
jeql 1f
rotl $8,sum,sum # sum = (sum << 8 | sum >> 24);
1: rotl $16,sum,tmp # tmp = sum >> 16;
addw2 tmp,sum # sum(16) += tmp;
bicl2 $0xffff0000,sum # sum &= ~0xffff0000;
adwc $0,sum
x... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/cpu_in_cksum.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/cpu_in_cksum.S | 201 | 221 |
NetBSD/src:sys/arch/vax/vax/emulate.S:2 | * called with the stack set up as follows:
*
* (%sp): Return address of trap handler
* 4(%sp): Instruction Opcode (also holds PSL result from emulator)
* 8(%sp): Instruction PC
* 12(%sp): Operand 1
* 16(%sp): Operand 2
* 20(%sp): Operand 3
* 24(%sp): Operand 4
* 28(%sp): Operand 5
* 32(%sp): Operand 6
* ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 41 | 100 |
NetBSD/src:sys/arch/vax/vax/emulate.S:3 | #define toarg(reg,num) movl reg,8+4*num(%sp)
.text
.align 1
ALTENTRY(EMcrc)
argl(1,%r11) # (1) table address == %r11
argl(2,%r0) # (2) initial crc == %r0
argl(4,%r3) # (4) source address == %r3
arguw(3,%r2) # (3) source length == %r2
jeql Lcrc_out
Lcrc_loop:
xorb2 (%r3)+,%r0
extzv $0,$4,%r0,%r10
extzv $... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 81 | 140 |
NetBSD/src:sys/arch/vax/vax/emulate.S:4 | movb (%r3)[%r2],(%r5)+
decl %r0
sobgtr %r4,Lmovtc_loop
jbr Lmovtc_out
Lmovtc_2loop:
movb %r11,(%r5)+
sobgtr %r4,Lmovtc_2loop
Lmovtc_out:
cmpw arg1,arg5
savepsl
clrl %r2
return
.align 1
ALTENTRY(EMmovtuc)
arguw(1,%r0) # (1) source length == %r0
argl(2,%r1) # (2) source address == %r1
argub(3,%r11) # (3... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 121 | 180 |
NetBSD/src:sys/arch/vax/vax/emulate.S:5 | cmpw arg1,arg5
savepsl
bisl2 %r2,4(%sp) # merge V-bit into psl
clrl %r2
return
.align 1
ALTENTRY(EMmatchc)
argl(2,%r10) # (2) substring address == %r10
arguw(3,%r2) # (3) source length == %r2
argl(4,%r3) # (4) source address == %r3
arguw(1,%r11) # (1) substring length == %r11
jeql Lmatchc_out # temp sou... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 161 | 220 |
NetBSD/src:sys/arch/vax/vax/emulate.S:6 | .align 1
ALTENTRY(EMspanc)
argl(2,%r1) # (2) string address == %r1
argub(4,%r2) # (4) character-mask == %r2
argl(3,%r3) # (3) table address == %r3
arguw(1,%r0) # (1) string length == %r0
jeql Lspanc_out
Lspanc_loop:
movzbl (%r1),%r11
mcomb (%r3)[%r11],%r11
bicb3 %r11,%r2,%r11
jeql Lspanc_out
incl %r1
sob... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 201 | 260 |
NetBSD/src:sys/arch/vax/vax/emulate.S:7 | .align 1
ALTENTRY(EMskpc)
argub(1,%r11) # (1) character == %r11
argl(3,%r1) # (3) string address == %r1
arguw(2,%r0) # (2) string length == %r0
jeql Lskpc_out # forget zero length strings
Lskpc_loop:
cmpb (%r1),%r11
jneq Lskpc_out
incl %r1
sobgtr %r0,Lskpc_loop
Lskpc_out:
tstl %r0 # be sure of condition co... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 241 | 300 |
NetBSD/src:sys/arch/vax/vax/emulate.S:8 | arguw(1,%r0) # (1) strings length == %r0
jeql Lcmpc3_out
Lcmpc3_loop:
cmpb (%r1),(%r3)
jneq Lcmpc3_out
incl %r1
incl %r3
sobgtr %r0,Lcmpc3_loop
Lcmpc3_out:
savepsl
movl %r0,%r2
return
.align 1
ALTENTRY(EMcmpc5)
argl(2,%r1) # (2) string1 address == %r1
argub(3,%r11) # (1) fill character == %r11
arguw(4... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 281 | 340 |
NetBSD/src:sys/arch/vax/vax/emulate.S:9 | Lcmpc5_str1loop:
cmpb (%r1),%r11
jneq Lcmpc5_out
incl %r1
sobgtr %r0,Lcmpc5_str1loop
Lcmpc5_out:
savepsl
return
/*
* Packed Decimal string operations
*/
#define POSITIVE $12
#define NEGATIVE $13
#define NEGATIVEalt $11
.align 1
ALTENTRY(EMaddp4)
toarg(%r9,6) # save register %r9 in arg6 spot
arguw(1,%r1... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 321 | 380 |
NetBSD/src:sys/arch/vax/vax/emulate.S:10 | L111:
insv NEGATIVE,$0,$4,(%r3)
L112:
extzv $0,$4,(%r10),%r2 # %r2 = standard +/- of source
cmpl %r2,NEGATIVE
jeql L114
cmpl %r2,NEGATIVEalt
jeql L113
movl POSITIVE,%r2
jbr L114
L113:
movl NEGATIVE,%r2
L114:
cmpl %r11,%r9 # if source is longer than destination
jleq L115
movl %r9,%r11 # set source length =... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 361 | 420 |
NetBSD/src:sys/arch/vax/vax/emulate.S:11 | bisl2 %r1,%r2
extzv $4,$4,(%r3),%r0
addl2 %r0,%r9 # %r9 = carry + next (high) nibble of source
extzv $4,$4,(%r10),%r0
subl2 %r0,%r9 # %r9 -= next (high) nibble of destination
L119:
jgeq L117 # if negative result
mnegl $1,%r1 # %r1 == carry = -1
addl2 $10,%r9 # %r9 == result += 10
jbr L118 # else
L117:
cl... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 401 | 460 |
NetBSD/src:sys/arch/vax/vax/emulate.S:12 | L130:
insv %r9,$4,$4,(%r3) # store result
bisl2 %r9,%r2
Laddp4_diff_carry:
cmpl %r3,%r10
jneq Laddp4_diff_carlop
tstl %r1 # if carry out of MSN then fix up result
jeql Laddp4_add_done
argl(5,%r3) # %r3 == address of LSN of destination
extzv $0,$4,(%r3),%r0
cmpl %r0,NEGATIVE # switch sign of result
jneq L132... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 441 | 500 |
NetBSD/src:sys/arch/vax/vax/emulate.S:13 | L134:
cmpl %r9,$9
jleq L137
clrl %r9
movl $10,%r1
jbr Laddp4_diff_norm
Laddp4_same: # operands are of the same sign
clrl %r2
addl2 %r1,%r9
jbr L139
Laddp4_same_loop:
decl %r3
extzv $0,$4,(%r3),%r0
addl2 %r0,%r1 # %r1 == carry += next (low) nibble of dest
decl %r10
extzv $0,$4,(%r10),%r0
addl2 %r0,%r1 ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 481 | 540 |
NetBSD/src:sys/arch/vax/vax/emulate.S:14 | L144:
insv %r9,$4,$4,(%r3)
bisl2 %r9,%r2
sobgtr %r11,Laddp4_same_loop # while (--source length)
argl(4,%r10) # %r10 = destination address of MSNibble
jbr Laddp4_same_carry
Laddp4_same_cloop:
decl %r3
extzv $0,$4,(%r3),%r0 # propagate carry up to MSNibble of destination
addl2 %r0,%r1
cmpl %r1,$10
jneq L147
m... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 521 | 580 |
NetBSD/src:sys/arch/vax/vax/emulate.S:15 | savepsl # remember that for condition codes
insv POSITIVE,$0,$4,(%r3) # make sure sign of result is positive
jbr Laddp4_out
L151: # else
extzv $0,$4,(%r3),%r0
cmpl %r0,NEGATIVE # if result is negative
jneq Laddp4_out
mnegl %r2,%r2 # remember THAT in Cond Codes
savepsl
Laddp4_out:
argl(4,%r3)
argl(2,%r1)... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 561 | 620 |
NetBSD/src:sys/arch/vax/vax/emulate.S:16 | mnegl %r2,%r2
Lmovp_pos:
tstl %r2 # set condition codes
savepsl
jeql Lmovp_zero
movb (%r10),(%r3) # move last byte if non-zero result
jbr Lmovp_out
Lmovp_zero:
movb POSITIVE,(%r3) # otherwise, make result zero and positive
Lmovp_out:
clrl %r0
argl(2,%r1)
clrl %r2
argl(3,%r3)
return
/*
* Definitions for E... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 601 | 660 |
NetBSD/src:sys/arch/vax/vax/emulate.S:17 | * %r4 is carved up as follows:
*
* -------------------------------------------
* | N Z V C |
* -------------------------------------------
*
* fill character is stuffed into arg5 space
* sign character is stuffed into arg6 space
*/
#define SIGNIFBIT $0
#define setsignif b... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 641 | 700 |
NetBSD/src:sys/arch/vax/vax/emulate.S:18 | addl3 %r11,%r10,%r2
extzv $4,$4,(%r2),%r1 # %r1 == least significant nibble of source
L169:
cmpl %r2,%r10
jeql L170
tstb -(%r2) # loop over source packed decimal number
jeql L169
incl %r1 # %r1 is non-zero if source is non-zero
L170:
addl3 %r11,%r10,%r2
tstl %r1
jeql L172 # source is zero - set flags
extzv... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 681 | 740 |
NetBSD/src:sys/arch/vax/vax/emulate.S:19 | .word Le_clear_signif - Lcaseb_label # 02
.word Le_set_signif - Lcaseb_label # 03
.word Le_store_sign - Lcaseb_label # 04
.word Le_end - Lcaseb_label # 05
.word Le_end - Lcaseb_label # 06
.word Le_end - Lcaseb_label # 07
.word Le_fill - Lcaseb_label # 80
.word Le_move - Lcaseb_label # 90
.word Le_float - L... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 721 | 780 |
NetBSD/src:sys/arch/vax/vax/emulate.S:20 | clsignif
jbr Ledit_case
Le_store_sign:
putsign
jbr Ledit_case
Le_load_fill:
setfill((%r3)+)
jbr Ledit_case
Le_load_plus:
jbs NEGATIVEBIT,%r4,Lpattern_inc # if non-negative
# fall into...
Le_load_sign:
setsign((%r3)+)
jbr Ledit_case
Le_load_minus:
jbs NEGATIVEBIT,%r4,Le_load_sign # if negative load the... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 761 | 820 |
NetBSD/src:sys/arch/vax/vax/emulate.S:21 | L200:
putfill # with fill character
sobgtr %r11,L200
jbr Ledit_case
Le_adjust_input:
movzbl (%r3)+,%r0 # get count of nibbles from pattern
subl3 %r2,%r0,%r11
jgeq Ledit_case # if length of source is > this number
L204: # discard digits in source
jlbc %r2,L206 # use low bit of length to choose nibble
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 801 | 860 |
NetBSD/src:sys/arch/vax/vax/emulate.S:22 | L214:
jlbc %r2,L215 # read a nibble
extzv $4,$4,(%r10),%r11
jbr L216
L215:
extzv $0,$4,(%r10),%r11
incl %r10
L216:
decl %r2 # source length CAN go negative here...
tstl %r11
jeql L218 # if non-zero
setsignif # set significance
L218:
jbc SIGNIFBIT,%r4,L219 # if significance set
addb3 $48,%r11,(%r5)+ ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 841 | 900 |
NetBSD/src:sys/arch/vax/vax/emulate.S:23 | L225:
jbc SIGNIFBIT,%r4,L227
addb3 $48,%r11,(%r5)+
jbr L228
L227:
putfill
L228:
sobgtr %r1,L221
jbr Ledit_case
.align 1
ALTENTRY(EMashp)
argb(1,%r11) # (1) scale (number to shift) == %r11
arguw(2,%r10) # (2) source length == %r10
argl(3,%r1) # (3) source address == %r1
argub(4,%r2) # (4) rounding facto... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 881 | 940 |
NetBSD/src:sys/arch/vax/vax/emulate.S:24 | movb NEGATIVE,(%r6)
L245:
clrl arg2 # arg2 is 1 if dstlen is even, 0 if odd
blbs %r3,L246
incl arg2
bisl2 $1,%r3 # %r3<0> counts digits going into destination
L246: # and is flip-flop for which nibble to
tstl %r11 # write in destination (1 = high, 0 = low)
jgeq Lashp_left # (it must start out odd)
addl2 %r... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 921 | 980 |
NetBSD/src:sys/arch/vax/vax/emulate.S:25 | Lashp_noround:
clrl %r2 # no more rounding
Lashp_shift:
clrl arg4 # arg4 will be used for result condition codes
tstl %r10
jeql Lashp_round
Lashp_shloop:
jlbc %r11,L260
extzv $4,$4,(%r1),%r0
jbr L261
L260:
decl %r1
extzv $0,$4,(%r1),%r0
L261:
incl %r11 # flip the source nibble flip/flop
addl2 %r0,%r2 # r... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 961 | 1,020 |
NetBSD/src:sys/arch/vax/vax/emulate.S:26 | sobgtr %r10,Lashp_shloop # loop for length of source
Lashp_round:
tstl %r2 # take care of round out of high nibble
jeql Lashp_zeroround
decl %r3
cmpl %r3,arg2 # if weve moved passed destination limits
jlss Lashp_overfl # then overflow
jlbs %r3,L266
insv arg5,$4,$4,(%r6) # put the round into destination (high ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,001 | 1,060 |
NetBSD/src:sys/arch/vax/vax/emulate.S:27 | .align 1
ALTENTRY(EMcvtlp)
arguw(2,%r10) # (2) destination length == %r10
argl(3,%r3) # (3) destination address == %r3
ashl $-1,%r10,%r10
addl2 %r10,%r3 # destination address points to Least Sig byte
incl %r10 # length is # of bytes, not nibbles
argl(1,%r11) # (1) source == %r11
savepsl
jgeq Lcvtlp_pos
mo... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,041 | 1,100 |
NetBSD/src:sys/arch/vax/vax/emulate.S:28 | jneq Lcvtlp_loop # quit if source becomes zero
Lcvtlp_zloop: # fill any remaining bytes with zeros
decl %r10
jeql Lcvtlp_out
clrb -(%r3)
jbr Lcvtlp_zloop
Lcvtlp_over:
overflowpsl
Lcvtlp_out:
clrl %r1 # %r0 is already zero
clrl %r2
return
.align 1
ALTENTRY(EMcvtpl)
arguw(1,%r11) # (1) source length == %r... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,081 | 1,140 |
NetBSD/src:sys/arch/vax/vax/emulate.S:29 | jneq Lcvtpl_out
Lcvtpl_neg: # source was negative - negate destination
mnegl %r3,%r3
savepsl
Lcvtpl_out:
toarg(%r3,3)
clrl %r0
clrl %r2
clrl %r3
return
.align 1
ALTENTRY(EMcvtps)
return
.align 1
ALTENTRY(EMcvtsp)
return
.align 1
ALTENTRY(EMaddp6)
return
.align 1
ALTENTRY(EMsubp4)
return
.ali... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,121 | 1,180 |
NetBSD/src:sys/arch/vax/vax/emulate.S:30 | .align 1
ALTENTRY(EMmulp)
return
.align 1
ALTENTRY(EMcvttp)
return
.align 1
ALTENTRY(EMdivp)
return
.align 1
ALTENTRY(EMcmpp3)
return
.align 1
ALTENTRY(EMcmpp4)
return
#ifdef notdef
/*
* Emulation OpCode jump table:
* ONLY GOES FROM 0xf8 (-8) TO 0x3B (59)
*/
#define EMUTABLE 0x43
#define NOEMULAT... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,161 | 1,220 |
NetBSD/src:sys/arch/vax/vax/emulate.S:32 | * 20(%sp): Operand 3
* 24(%sp): Operand 4
* 28(%sp): Operand 5
* 32(%sp): Operand 6
* 36(%sp): saved register 11
* 40(%sp): saved register 10
* 44(%sp): Return PC
* 48(%sp): Return PSL
* 52(%sp): TOS before instruction
*/
SCBVEC(emulate):
movl %r11,32(%sp) # save register %r11 in unused operand
movl %r10,3... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/emulate.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/emulate.S | 1,241 | 1,272 |
NetBSD/src:sys/arch/vax/vax/intvec.S:1 | /* $NetBSD: intvec.S,v 1.23 2022/09/02 23:48:10 thorpej Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. R... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 1 | 60 |
NetBSD/src:sys/arch/vax/vax/intvec.S:2 | .align 2 ; \
.globl __CONCAT(X,name) ; \
__CONCAT(X,name):
#define TRAPCALL(namn, typ) \
SCBENTRY(namn) ; \
pushl $0 ; \
pushl $typ ; \
jbr Xtrap
#define TRAPARGC(namn, typ) \
SCBENTRY(namn) ; \
pushl $typ ; \
jbr Xtrap
#define FASTINTR(namn, rutin) \
SCBENTRY(namn) ; \
pushr $0x3f ; \
calls $0,_C... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 41 | 100 |
NetBSD/src:sys/arch/vax/vax/intvec.S:3 | * to store SCB vectors generated when compiling the kernel,
* and move the SCB later to somewhere else.
*/
NOVEC; # Unused, 0
INTVEC(mcheck, ISTACK) # Machine Check., 4
INTVEC(invkstk, ISTACK) # Kernel Stack Invalid., 8
NOVEC; # Power Failed., C
INTVEC(privinflt, KSTACK) # Privileged/Reserved Instructi... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 81 | 140 |
NetBSD/src:sys/arch/vax/vax/intvec.S:4 | NOVEC; # Unused, 90
NOVEC; # Unused, 94
NOVEC; # Unused, 98
NOVEC; # Unused, 9C
INTVEC(softclock, KSTACK); # Software clock interrupt, A0 (IPL 08)
NOVEC; # Unused, A4 (IPL 09)
NOVEC; # Unused, A8 (IPL 10)
INTVEC(softbio, KSTACK); # Software bio interrupt, AC (IPL 11)
INTVEC(softnet, KSTACK); #... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 121 | 180 |
NetBSD/src:sys/arch/vax/vax/intvec.S:5 | tstl _C_LABEL(cold) # Ar we still in coldstart?
bneq L4 # Yes.
pushr $0x7f
pushab 24(%sp)
movl _C_LABEL(dep_call),%r6 # CPU dependent mchk handling
calls $1,*MCHK(%r6)
tstl %r0 # If not machine check, try memory error
beql 1f
calls $0,*MEMERR(%r6)
pushab 2f
calls $1,_C_LABEL(panic)
2: .asciz "mchk"
1: pop... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 161 | 220 |
NetBSD/src:sys/arch/vax/vax/intvec.S:6 | 3: mtpr $0xF,$PR_MCESR # clear the bus error bit
2: movl _C_LABEL(memtest),(%sp) # REI to new address
rei
TRAPCALL(invkstk, T_KSPNOTVAL)
SCBENTRY(privinflt) # Privileged/unimplemented instruction
#ifndef NO_INSN_EMULATE
jsb _C_LABEL(unimemu) # do not return if insn emulated
#endif
pushl $0
pushl $T_PRIVINFLT
jb... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 201 | 260 |
NetBSD/src:sys/arch/vax/vax/intvec.S:7 | bneq 1f
popr $0x3f
addl2 $8,%sp
rei
1: popr $0x3f
brw Xaccess_v
SCBENTRY(access_v) # 24: Access cntrl viol fault
blbs (%sp), ptelen
pushl $T_ACCFLT
bbc $1,4(%sp),1f
bisl2 $T_PTEFETCH,(%sp)
1: bbc $2,4(%sp),2f
bisl2 $T_WRITE,(%sp)
2: movl (%sp), 4(%sp)
addl2 $4, %sp
jbr Xtrap
ptelen: movl $T_PTELEN, (%sp)... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 241 | 300 |
NetBSD/src:sys/arch/vax/vax/intvec.S:8 | movl L_PROC(%r0), %r0
pushl %ap
pushl %fp
pushl %sp # pointer to syscall frame; defined in trap.h
calls $1, *P_MD_SYSCALL(%r0)
movl (%sp)+, %fp
movl (%sp)+, %ap
mtpr (%sp)+, $PR_USP
popr $0xfff
addl2 $8, %sp
mtpr $IPL_HIGH, $PR_IPL # Be sure we can REI
rei
SCBENTRY(cmrerr)
PUSHR
movl _C_LABEL(dep_call),... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 281 | 340 |
NetBSD/src:sys/arch/vax/vax/intvec.S:9 | bgeq 2f
incl _C_LABEL(clock_misscnt)+EV_COUNT
adwc $0,_C_LABEL(clock_misscnt)+EV_COUNT+4
2: mtpr $0x800000c1,$PR_ICCS # Reset interrupt flag
incl _C_LABEL(clock_intrcnt)+EV_COUNT # count the number of clock interrupts
adwc $0,_C_LABEL(clock_intrcnt)+EV_COUNT+4
mfpr $PR_SSP, %r0 /* SSP contains ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 321 | 380 |
NetBSD/src:sys/arch/vax/vax/intvec.S:12 | * 24(%sp): Operand 4
* 28(%sp): Operand 5
* 32(%sp): Operand 6
* 36(%sp): saved register 11
* 40(%sp): saved register 10
* 44(%sp): Return PC
* 48(%sp): Return PSL
* 52(%sp): TOS before instruction
* See the VAX Architecture Reference Manual, Section B-5 for more
* information.
*/
SCBENTRY(emulate)
#ifndef N... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/intvec.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/intvec.S | 441 | 472 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:2 | #include "assym.h"
#ifdef MULTIPROCESSOR
.section .bss
.p2align 2
.lcomm cashash,256 /* 2048 bits */
#endif
#ifndef LOCKDEBUG
#if MTX_OWNER != 0
#error MTX_OWNER != 0, need to add offset to (%r1)
#endif
/*
* void mutex_enter(kmutex_t *);
*/
ENTRY(mutex_enter, 0)
movl 4(%ap), %r1 /* get mutex (ptr) */
#ifdef ... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 41 | 100 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:3 | #endif
mfpr $PR_SSP, %r2 /* get curlwp (old) */
clrl %r3 /* get zero (new) */
#ifndef MULTIPROCESSOR
addl3 $CI_CAS_ADDR, L_CPU(%r2), %r4 /* r4 == &curcpu()->ci_cas_addr */
#endif
bsbw _do_cas+2 /* do the compare-and-swap */
cmpl %r0,%r2 /* return == old? */
beql 2f /* yes, branch to return */
1: callg (... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 81 | 140 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:4 | /*
* void mutex_spin_exit(kmutex_t *);
*/
ENTRY(mutex_spin_exit, 0)
movl 4(%ap), %r0 /* get spin mutex */
#if defined(DIAGNOSTIC)
blbc (%r0), 2f /* assert this is a spinlock */
#endif
#if defined(DIAGNOSTIC) || defined(MULTIPROCESSOR)
bbcci $0, MTX_LOCK(%r0), 2f /* clear mutex */
#else
clrb MTX_LOCK(%r0) /... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 121 | 180 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:5 | tstl 8(%ap) /* is this a reader op? */
bneq 2f /* nope, branch to writer */
movl (%r1), %r2 /* get owner field */
bitl $(RW_WRITE_LOCKED|RW_WRITE_WANTED), %r2
/* write active or pending? */
bneq 3f /* yep, go slow */
addl3 $RW_READ_INCR, %r2, %r3 /* incr. reader count (new) */
#ifndef MULTIP... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 161 | 220 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:6 | #ifndef MULTIPROCESSOR
mfpr $PR_SSP, %r4 /* get curlwp */
addl3 $CI_CAS_ADDR, L_CPU(%r4), %r4 /* r4 == &curcpu()->ci_cas_addr */
#endif
1: bsbw _do_cas+2 /* do the compare-and-swap */
cmpl %r0, %r2 /* did it succeed? */
bneq 3f /* nope, go slow */
ret /* yes, return */
2: mfpr $PR_SSP, %r2 /* g... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 201 | 260 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:7 | movl $1,%r0 /* yes, indicate success */
ret /* return */
2: clrl %r0 /* indicate failure */
ret /* return */
3: clrl %r2 /* set old value (0) */
mfpr $PR_SSP, %r3 /* set new value (curlwp) */
#ifndef MULTIPROCESSOR
addl3 $CI_CAS_ADDR, L_CPU(%r3), %r4 /* r4 == &curcpu()->ci_cas_addr */
#endif
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 241 | 300 |
NetBSD/src:sys/arch/vax/vax/lock_stubs.S:8 | cmpl %r0, %r2 /* does it still equal old? */
bneq 2f /* nope, return */
movl %r3,(%r1) /* update *ptr with new */
2:
bbcci %r4,cashash,3f /* clear this pos in the hash table */
3:
mtpr %r5, $PR_IPL /* restore IPL */
4:
rsb /* return */
#else
/*
* entry:
* r1 = address to be CAS'ed
* r2 = old value
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/lock_stubs.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/lock_stubs.S | 281 | 328 |
NetBSD/src:sys/arch/vax/vax/subr.S:2 | #define SCBENTRY(name) \
.text ; \
.align 2 ; \
.globl __CONCAT(X,name) ; \
__CONCAT(X,name):
.text
#ifdef KERNEL_LOADABLE_BY_MOP
/*
* This is a little tricky. The kernel is not loaded at the correct
* address, so the kernel must first be relocated, then copied, then
* jump back to the correct address.
*/... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 41 | 100 |
NetBSD/src:sys/arch/vax/vax/subr.S:3 | bneq 4b
movl %r7,%r8
/* Ok, copy routine copied, set registers and rei */
movab _edata,%r7
movab _end,%r6
movl $0x80000000,%r1
movl $0x80000200,%r0
subl3 $0x200,%r6,%r9
movab 2f,%r2
subl2 $0x200,%r2
movpsl -(%sp)
pushab 4(%sp)
rei
/*
* First entry routine from boot. This should be in a file called locore.
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 81 | 140 |
NetBSD/src:sys/arch/vax/vax/subr.S:4 | mtpr %r0,$PR_KSP # put in IPR KSP
movl %r0,_C_LABEL(Sysmap) # SPT start addr after KSP
movl _C_LABEL(lwp0)+L_PCB,%r0 # get PCB virtual address
mfpr $PR_PCBB,PCB_PADDR(%r0) # save PCB physical address
movab PCB_ONFAULT(%r0),ESP(%r0) # Save trap address in ESP
mtpr 4(%r0),$PR_ESP # Put it in ESP also
# Set so... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 121 | 180 |
NetBSD/src:sys/arch/vax/vax/subr.S:5 | .align 2
.globl _C_LABEL(sigcode),_C_LABEL(esigcode)
_C_LABEL(sigcode):
pushr $0x3f
subl2 $0xc,%sp
movl 0x24(%sp),%r0
calls $3,(%r0)
popr $0x3f
chmk $SYS_compat_16___sigreturn14
chmk $SYS_exit
halt
_C_LABEL(esigcode):
#ifdef COMPAT_ULTRIX
.align 2
.globl _C_LABEL(ultrix_sigcode),_C_LABEL(ultrix_esigcode)
_C... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 161 | 220 |
NetBSD/src:sys/arch/vax/vax/subr.S:6 | _C_LABEL(cmn_idsptch):
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
calls $0,_C_LABEL(krnlock)
#endif
movl (%sp)+,%r0 # get pointer to idspvec
mtpr $IPL_VM,$PR_IPL # Make sure we are at IPL_VM
movl 8(%r0),%r1 # get evcnt pointer
beql 1f # no ptr, skip increment
incl EV_COUNT(%r1) # increment low longword
a... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 201 | 260 |
NetBSD/src:sys/arch/vax/vax/subr.S:7 | caseb %r1,$1,$4 # What is the size
1: .word 1f-1b
.word 2f-1b
.word 3f-1b # This is unused
.word 3f-1b
1: movb (%r2),%r1 # Test a byte
brb 5f
2: movw (%r2),%r1 # Test a word
brb 5f
3: movl (%r2),%r1 # Test a long
brb 5f
4: incl %r3 # Got machine chk => addr bad
5: mtpr (%sp)+,$PR_IPL
movl %r3,%r0
ret
... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 241 | 300 |
NetBSD/src:sys/arch/vax/vax/subr.S:8 | movl 12(%r1), %sp
jmp *8(%r1)
#endif
#if defined(MULTIPROCESSOR)
.align 2
.globl _C_LABEL(vax_mp_tramp) # used to kick off multiprocessor systems.
_C_LABEL(vax_mp_tramp):
ldpctx
rei
#endif
.globl softint_cleanup,softint_exit,softint_process
.type softint_cleanup@function
.type softint_exit@function
.type sof... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 281 | 340 |
NetBSD/src:sys/arch/vax/vax/subr.S:9 | #endif
/* copy AST level from current LWP to pinned LWP, reset
current AST level */
mfpr $PR_SSP,%r4 /* current LWP */
movl L_PCB(%r4),%r4 /* PCB address */
movl P0LR(%r4),%r0 /* LR and ASTLVL field, current PCB */
movl P0LR(%r3),%r1 /* same, pinned LWP */
cmpl %r0,%r1
bgtru 1f /* AST(current) >= AST(p... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 321 | 380 |
NetBSD/src:sys/arch/vax/vax/subr.S:10 | */
movab (USPACE-TRAPFRAMELEN-CALLSFRAMELEN)(%r3),%r0
/* calculate where KSP should be */
movl %r0,KSP(%r3) /* save it as SP */
movl %r0,PCB_FP(%r3) /* and as the FP too */
movab CA_ARGNO(%r0),PCB_AP(%r3) /* update the AP as well */
movab softint_process,PCB_PC(%r3) /* and where we will start */
movl $PSL_... | x86_64 | gas-like | handwritten | NetBSD/src | sys/arch/vax/vax/subr.S | BSD-2-Clause | 3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd | github | kernel | https://github.com/NetBSD/src/blob/3f1390c8cc18c3f67a4bd2632f8c7ad919cf86fd/sys/arch/vax/vax/subr.S | 361 | 420 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.