// ------------------------------------------------------------------------------ // // Enable FPU for RISC-V // // Copyright (c) 2024, Canonical Services Ltd.
// Copyright (c) 2025, Ventana Micro Systems Inc. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // // ------------------------------------------------------------------------------ #include .global ASM_PFX(InitializeFloatingPointUnits) ASM_PFX(InitializeFloatingPointUnits): csrr a0, CSR_SSTATUS li a1, MSTATUS_FS or a0, a0, a1 csrw CSR_SSTATUS, a0 csrw CSR_FCSR, x0 li a0, 0 ret