mirror of
https://github.com/n64dev/cen64.git
synced 2025-04-02 10:31:54 -04:00
28 lines
599 B
C
28 lines
599 B
C
//
|
|
// os/unix/arm/fpu/fpu.h
|
|
//
|
|
// Extern declarations for host FPU functions.
|
|
//
|
|
// This file is subject to the terms and conditions defined in
|
|
// 'LICENSE', which is part of this source code package.
|
|
//
|
|
|
|
#ifndef __os_fpu_h__
|
|
#define __os_fpu_h__
|
|
#include "common.h"
|
|
|
|
#include "arch/arm/fpu/fpu.h"
|
|
|
|
static inline fpu_state_t fpu_get_state(void) {
|
|
fpu_state_t state;
|
|
|
|
__asm__ __volatile__("mrc p10, 7, %0, cr1, cr0, 0\n\t" : "=r"(state));
|
|
return state;
|
|
}
|
|
|
|
static inline void fpu_set_state(fpu_state_t state) {
|
|
__asm__ __volatile__("mcr p10, 7, %0, cr1, cr0, 0\n\t" :: "r"(state));
|
|
}
|
|
|
|
#endif
|
|
|