arch/risc-v: get wider visibility for arch instruction macros
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
e6d6734db2
commit
870ca12146
@ -39,10 +39,38 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
# define __STR(s) s
|
||||
#else
|
||||
# define __STR(s) #s
|
||||
#endif
|
||||
#define __XSTR(s) __STR(s)
|
||||
|
||||
#if defined(CONFIG_ARCH_QPFPU)
|
||||
# define FLOAD __STR(flq)
|
||||
# define FSTORE __STR(fsq)
|
||||
#elif defined(CONFIG_ARCH_DPFPU)
|
||||
# define FLOAD __STR(fld)
|
||||
# define FSTORE __STR(fsd)
|
||||
#else
|
||||
# define FLOAD __STR(flw)
|
||||
# define FSTORE __STR(fsw)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_RV32
|
||||
# define REGLOAD __STR(lw)
|
||||
# define REGSTORE __STR(sw)
|
||||
#else
|
||||
# define REGLOAD __STR(ld)
|
||||
# define REGSTORE __STR(sd)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getsp
|
||||
****************************************************************************/
|
||||
@ -58,6 +86,8 @@ static inline uintptr_t up_getsp(void)
|
||||
return sp;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
#include <arch/types.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/csr.h>
|
||||
#include <arch/chip/irq.h>
|
||||
|
||||
|
@ -23,9 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
#include <arch/arch.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -24,10 +24,9 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <arch/arch.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -38,32 +38,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
# define __STR(s) s
|
||||
#else
|
||||
# define __STR(s) #s
|
||||
#endif
|
||||
#define __XSTR(s) __STR(s)
|
||||
|
||||
#if defined(CONFIG_ARCH_QPFPU)
|
||||
# define FLOAD __STR(flq)
|
||||
# define FSTORE __STR(fsq)
|
||||
#elif defined(CONFIG_ARCH_DPFPU)
|
||||
# define FLOAD __STR(fld)
|
||||
# define FSTORE __STR(fsd)
|
||||
#else
|
||||
# define FLOAD __STR(flw)
|
||||
# define FSTORE __STR(fsw)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_RV32
|
||||
# define REGLOAD __STR(lw)
|
||||
# define REGSTORE __STR(sw)
|
||||
#else
|
||||
# define REGLOAD __STR(ld)
|
||||
# define REGSTORE __STR(sd)
|
||||
#endif
|
||||
|
||||
/* This is the value used to mark the stack for subsequent stack monitoring
|
||||
* logic.
|
||||
*/
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <arch/arch.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
|
@ -23,6 +23,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <arch/arch.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "chip.h"
|
||||
|
Loading…
Reference in New Issue
Block a user