mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:07:35 +00:00
Toolchain: Add (basic) support for riscv64
This makes `ARCH=riscv64 Toolchain/BuildGNU.sh` work, but the patches might not be completely correct.
This commit is contained in:
parent
68924a8e81
commit
9522794a0e
5 changed files with 136 additions and 27 deletions
|
@ -10,4 +10,6 @@
|
|||
# include <Kernel/Arch/x86_64/mcontext.h>
|
||||
#elif defined(__aarch64__)
|
||||
# include <Kernel/Arch/aarch64/mcontext.h>
|
||||
#elif defined(__riscv) && __riscv_xlen == 64
|
||||
# include <Kernel/Arch/riscv64/mcontext.h>
|
||||
#endif
|
||||
|
|
23
Kernel/Arch/riscv64/mcontext.h
Normal file
23
Kernel/Arch/riscv64/mcontext.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct __attribute__((packed)) __mcontext {
|
||||
uint64_t x[31];
|
||||
uint64_t sp;
|
||||
uint64_t pc;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue