-/* $OpenBSD: SYS.h,v 1.3 2021/05/04 04:26:00 drahn Exp $ */
+/* $OpenBSD: SYS.h,v 1.4 2022/12/02 12:27:08 jca Exp $ */
/*-
* Copyright (c) 2020 Brian Bamsch <bbamsch@google.com>
* Copyright (c) 1990 The Regents of the University of California.
#define TP_OFFSET_ERRNO TCB_OFFSET_ERRNO
#define SYSENTRY(x) \
- .weak _C_LABEL(x); \
- _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \
+ .weak x; \
+ x = _thread_sys_ ## x; \
ENTRY(_thread_sys_ ## x)
#define SYSENTRY_HIDDEN(x) \
ENTRY(_thread_sys_ ## x)
-/* $OpenBSD: brk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */
+/* $OpenBSD: brk.S,v 1.3 2022/12/02 12:27:08 jca Exp $ */
/*
* Copyright (c) 2021 Dale Rahn <drahn@openbsd.org>
*
#include "SYS.h"
.extern __curbrk
- .extern _C_LABEL(_end)
+ .extern _end
.data
.align 3
__minbrk:
- .dword _C_LABEL(_end)
+ .dword _end
ENTRY(brk)
RETGUARD_SETUP(brk, t6)
- lla t1, _C_LABEL(__minbrk)
+ lla t1, __minbrk
ld t5, 0(t1)
bgeu a0, t5, .L_brk_call
mv a0, t5
.L_brk_call:
mv a2, a0
- lla t1, _C_LABEL(__curbrk)
+ lla t1, __curbrk
li t0, SYS_break
ecall
-/* $OpenBSD: sbrk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */
+/* $OpenBSD: sbrk.S,v 1.3 2022/12/02 12:27:08 jca Exp $ */
/*
* Copyright (c) 2021 Dale Rahn <drahn@openbsd.org>
*
#include "SYS.h"
- .extern _C_LABEL(_end)
+ .extern _end
.data
.align 3
.hidden __curbrk
.type __curbrk,@object
__curbrk:
- .dword _C_LABEL(_end)
+ .dword _end
END(__curbrk)
ENTRY(sbrk)
RETGUARD_SETUP(sbrk, t6)
- lla t1, _C_LABEL(__curbrk)
+ lla t1, __curbrk
ld a2, 0(t1)
add a0, a0, a2 // compute current break
mv t3, a0
-/* $OpenBSD: asm.h,v 1.5 2022/08/30 16:26:29 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.6 2022/12/02 12:27:08 jca Exp $ */
/*
* Copyright (c) 2020 Brian Bamsch <bbamsch@google.com>
#define _ENTRY(x) \
.text; .globl x; .type x,@function; .p2align 1; x:
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
-#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
+#define ENTRY(y) _ENTRY(y); _PROF_PROLOGUE
+#define ENTRY_NP(y) _ENTRY(y)
+#define ASENTRY(y) _ENTRY(y); _PROF_PROLOGUE
+#define ASENTRY_NP(y) _ENTRY(y)
#define END(y) .size y, . - y
#define EENTRY(sym) .globl sym; sym:
#define EEND(sym)
-/* $OpenBSD: cpuswitch.S,v 1.6 2022/02/22 07:47:46 visa Exp $ */
+/* $OpenBSD: cpuswitch.S,v 1.7 2022/12/02 12:27:08 jca Exp $ */
/*
* Copyright (c) 2015 Dale Rahn <drahn@dalerahn.com>
ENTRY(proc_trampoline)
#ifdef MULTIPROCESSOR
- la t0, _C_LABEL(proc_trampoline_mp)
+ la t0, proc_trampoline_mp
jalr t0
#endif
// call it or just set the variable?
-/* $OpenBSD: exception.S,v 1.5 2021/05/20 04:22:33 drahn Exp $ */
+/* $OpenBSD: exception.S,v 1.6 2022/12/02 12:27:08 jca Exp $ */
/*-
* Copyright (c) 2015-2018 Ruslan Bukin <br@bsdpad.com>
/* handle the ast */
mv a0, sp
- la t0, _C_LABEL(ast)
+ la t0, ast
jalr t0
j 1b
2:
ENTRY(cpu_exception_handler_supervisor)
save_registers 1
mv a0, sp
- call _C_LABEL(do_trap_supervisor)
+ call do_trap_supervisor
restore_registers 1
sret
END(cpu_exception_handler_supervisor)
ENTRY(cpu_exception_handler_user)
save_registers 0
mv a0, sp
- call _C_LABEL(do_trap_user)
+ call do_trap_user
do_ast
restore_registers 0
csrrw sp, sscratch, sp
-/* $OpenBSD: locore.S,v 1.14 2022/01/02 03:41:08 jsg Exp $ */
+/* $OpenBSD: locore.S,v 1.15 2022/12/02 12:27:08 jca Exp $ */
/*-
* Copyright (c) 2015-2018 Ruslan Bukin <br@bsdpad.com>
andi sp, sp, ~STACKALIGNBYTES
/* Clear BSS */
- la t0, _C_LABEL(__bss_start)
- la t1, _C_LABEL(_end)
+ la t0, __bss_start
+ la t1, _end
1:
sd zero, 0(t0)
addi t0, t0, 8
sd t1, 0(t0)
mv a0, sp
- call _C_LABEL(initriscv) /* Off we go */
- call _C_LABEL(main)
+ call initriscv /* Off we go */
+ call main
/*
* Get the physical address the kernel is loaded to. Returned in s9.
li t0, SYS_sigreturn
ecall
- .globl _C_LABEL(sigcoderet)
-_C_LABEL(sigcoderet):
+ .globl sigcoderet
+sigcoderet:
/* sigreturn failed, exit */
li t0, SYS_exit
ecall
END(sigcode)
- .globl _C_LABEL(esigcode)
-_C_LABEL(esigcode):
+ .globl esigcode
+esigcode:
.data
- .global _C_LABEL(esym)
-_C_LABEL(esym):
- .quad _C_LABEL(end)
+ .global esym
+esym:
+ .quad end
.align 12
pagetable_l1:
csrw satp, a2
sfence.vma
- call _C_LABEL(cpu_start_secondary)
+ call cpu_start_secondary
#endif