arch/arm/src/include/xxx/syscall.h: Align semi-hosting call style with other syscalls
This commit is contained in:
parent
5a6108c172
commit
9f408e9937
@ -56,6 +56,12 @@
|
|||||||
|
|
||||||
#define SYS_syscall 0x900001
|
#define SYS_syscall 0x900001
|
||||||
|
|
||||||
|
#if defined(__thumb__) || defined(__thumb2__)
|
||||||
|
# define SYS_smhcall 0xab
|
||||||
|
#else
|
||||||
|
# define SYS_smhcall 0x123456
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -227,14 +233,10 @@ static inline long smh_call(unsigned int nbr, void *parm)
|
|||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
#if defined(__thumb__) || defined(__thumb2__)
|
"svc %1"
|
||||||
"svc #0xab"
|
|
||||||
#else
|
|
||||||
"svc #0x123456"
|
|
||||||
#endif
|
|
||||||
: "=r"(reg0)
|
: "=r"(reg0)
|
||||||
: "r"(reg0), "r"(reg1)
|
: "i"(SYS_smhcall), "r"(reg0), "r"(reg1)
|
||||||
: "memory"
|
: "memory", "r14"
|
||||||
);
|
);
|
||||||
|
|
||||||
return reg0;
|
return reg0;
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYS_syscall 0x00
|
#define SYS_syscall 0x00
|
||||||
|
#define SYS_smhcall 0xab
|
||||||
|
|
||||||
/* The SYS_signal_handler_return is executed here... its value is not always
|
/* The SYS_signal_handler_return is executed here... its value is not always
|
||||||
* available in this context and so is assumed to be 7.
|
* available in this context and so is assumed to be 7.
|
||||||
@ -250,9 +251,9 @@ static inline long smh_call(unsigned int nbr, void *parm)
|
|||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
"bkpt #0xab"
|
"bkpt %1"
|
||||||
: "=r"(reg0)
|
: "=r"(reg0)
|
||||||
: "r"(reg0), "r"(reg1)
|
: "i"(SYS_smhcall), "r"(reg0), "r"(reg1)
|
||||||
: "memory"
|
: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -56,6 +56,12 @@
|
|||||||
|
|
||||||
#define SYS_syscall 0x900001
|
#define SYS_syscall 0x900001
|
||||||
|
|
||||||
|
#if defined(__thumb__) || defined(__thumb2__)
|
||||||
|
# define SYS_smhcall 0xab
|
||||||
|
#else
|
||||||
|
# define SYS_smhcall 0x123456
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -227,14 +233,10 @@ static inline long smh_call(unsigned int nbr, void *parm)
|
|||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
#if defined(__thumb__) || defined(__thumb2__)
|
"svc %1"
|
||||||
"svc #0xab"
|
|
||||||
#else
|
|
||||||
"svc #0x123456"
|
|
||||||
#endif
|
|
||||||
: "=r"(reg0)
|
: "=r"(reg0)
|
||||||
: "r"(reg0), "r"(reg1)
|
: "i"(SYS_smhcall), "r"(reg0), "r"(reg1)
|
||||||
: "memory"
|
: "memory", "r14"
|
||||||
);
|
);
|
||||||
|
|
||||||
return reg0;
|
return reg0;
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYS_syscall 0x00
|
#define SYS_syscall 0x00
|
||||||
|
#define SYS_smhcall 0xab
|
||||||
|
|
||||||
/* The SYS_signal_handler_return is executed here... its value is not always
|
/* The SYS_signal_handler_return is executed here... its value is not always
|
||||||
* available in this context and so is assumed to be 7.
|
* available in this context and so is assumed to be 7.
|
||||||
@ -250,9 +251,9 @@ static inline long smh_call(unsigned int nbr, void *parm)
|
|||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
"bkpt #0xab"
|
"bkpt %1"
|
||||||
: "=r"(reg0)
|
: "=r"(reg0)
|
||||||
: "r"(reg0), "r"(reg1)
|
: "i"(SYS_smhcall), "r"(reg0), "r"(reg1)
|
||||||
: "memory"
|
: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -56,6 +56,12 @@
|
|||||||
|
|
||||||
#define SYS_syscall 0x900001
|
#define SYS_syscall 0x900001
|
||||||
|
|
||||||
|
#if defined(__thumb__) || defined(__thumb2__)
|
||||||
|
# define SYS_smhcall 0xab
|
||||||
|
#else
|
||||||
|
# define SYS_smhcall 0x123456
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -227,14 +233,10 @@ static inline long smh_call(unsigned int nbr, void *parm)
|
|||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
#if defined(__thumb__) || defined(__thumb2__)
|
"svc %1"
|
||||||
"svc #0xab"
|
|
||||||
#else
|
|
||||||
"svc #0x123456"
|
|
||||||
#endif
|
|
||||||
: "=r"(reg0)
|
: "=r"(reg0)
|
||||||
: "r"(reg0), "r"(reg1)
|
: "i"(SYS_smhcall), "r"(reg0), "r"(reg1)
|
||||||
: "memory"
|
: "memory", "r14"
|
||||||
);
|
);
|
||||||
|
|
||||||
return reg0;
|
return reg0;
|
||||||
|
Loading…
Reference in New Issue
Block a user