1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-26 01:05:07 +00:00
serenity/Kernel/Arch/riscv64/FPUState.h
Sönke Holz ac79ab0b45 Kernel/riscv64: Specify correct alignment for FPUState struct
The signal handling code (and possibly other code as well) expects this
struct to have an alignment of 16 bytes, as it pushes this struct on the
stack.
2023-12-16 18:21:03 +01:00

23 lines
419 B
C++

/*
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
#include <AK/Platform.h>
VALIDATE_IS_RISCV64()
namespace Kernel {
// This struct will get pushed on the stack by the signal handling code.
// Therefore, it has to be aligned to a 16-byte boundary.
struct [[gnu::aligned(16)]] FPUState {
u64 f[32];
u64 fcsr;
};
}