mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
arch/risc-v: get wider visibility for arch instruction macros
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
e6d6734db2
commit
870ca12146
@@ -39,10 +39,38 @@
|
|||||||
* Pre-processor Definitions
|
* 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
|
* Inline functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_getsp
|
* Name: up_getsp
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -58,6 +86,8 @@ static inline uintptr_t up_getsp(void)
|
|||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <arch/types.h>
|
#include <arch/types.h>
|
||||||
|
|
||||||
#include <nuttx/irq.h>
|
|
||||||
#include <arch/csr.h>
|
#include <arch/csr.h>
|
||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <arch/irq.h>
|
|
||||||
|
|
||||||
#include "riscv_internal.h"
|
#include <arch/arch.h>
|
||||||
|
#include <arch/irq.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <arch/arch.h>
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
|
|
||||||
#include "riscv_internal.h"
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_FPU
|
#ifdef CONFIG_ARCH_FPU
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
|
|||||||
@@ -38,32 +38,6 @@
|
|||||||
* Pre-processor Definitions
|
* 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
|
/* This is the value used to mark the stack for subsequent stack monitoring
|
||||||
* logic.
|
* logic.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <arch/arch.h>
|
||||||
#include <arch/syscall.h>
|
#include <arch/syscall.h>
|
||||||
|
|
||||||
#include "riscv_internal.h"
|
#include "riscv_internal.h"
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <arch/arch.h>
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user