1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 08:27:46 +00:00

Userland+Tests: Add initial riscv64 support

This commit is contained in:
Sönke Holz 2023-09-18 12:56:39 +02:00 committed by Andrew Kaster
parent c6b2a07326
commit 6824d2a788
23 changed files with 262 additions and 34 deletions

View file

@ -1 +1,11 @@
# Intentionally empty.
/*
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
.globl _invoke_entry
.hidden _invoke_entry
.type _invoke_entry,@function
_invoke_entry: # (argc, argv, envp, entry)
jr a3

View file

@ -1 +1,14 @@
# Intentionally empty.
/*
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
.p2align 4
.globl _plt_trampoline
.hidden _plt_trampoline
.type _plt_trampoline,@function
_plt_trampoline:
// FIXME: Implement the PLT trampoline.
unimp

View file

@ -723,8 +723,12 @@ void ELF::DynamicLinker::linker_main(DeprecatedString&& main_program_path, int m
if (s_do_breakpoint_trap_before_entry) {
#if ARCH(AARCH64)
asm("brk #0");
#else
#elif ARCH(RISCV64)
asm("ebreak");
#elif ARCH(X86_64)
asm("int3");
#else
# error "Unknown architecture"
#endif
}