SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk_arch_arm-cortex-m-asm.h File Reference
#include "stk_config.h"
Include dependency graph for stk_arch_arm-cortex-m-asm.h:

Go to the source code of this file.

Macros

#define STK_ASM_SYNTAX_UNIFIED   ".syntax unified \n"
#define STK_ASM_POOL   ".pool \n"
#define STK_ASM_ALIGN_2   ".align 2 \n"
#define STK_ASM_GLOBAL_SYMBOL(name)
 Generates a toolchain-agnostic assembly directive to declare a global symbol.
#define STK_ASM_EXTRACT_STACK_POINTER_TO_R0

Macro Definition Documentation

◆ STK_ASM_ALIGN_2

#define STK_ASM_ALIGN_2   ".align 2 \n"

Definition at line 23 of file stk_arch_arm-cortex-m-asm.h.

◆ STK_ASM_EXTRACT_STACK_POINTER_TO_R0

#define STK_ASM_EXTRACT_STACK_POINTER_TO_R0
Value:
"MOV r0, LR \n" /* r0 = LR */ \
"LSLS r0, r0, #29 \n" /* if (r0 & 4) */ \
"BMI 6f \n" /* else */ \
"MRS r0, MSP \n" /* r0 = MSP */ \
"B 7f \n" \
"6: \n" \
"MRS r0, PSP \n" /* else r0 = PSP */ \
"7: \n"

Definition at line 103 of file stk_arch_arm-cortex-m-asm.h.

103#define STK_ASM_EXTRACT_STACK_POINTER_TO_R0 \
104 "MOV r0, LR \n" /* r0 = LR */ \
105 "LSLS r0, r0, #29 \n" /* if (r0 & 4) */ \
106 "BMI 6f \n" /* else */ \
107 "MRS r0, MSP \n" /* r0 = MSP */ \
108 "B 7f \n" \
109 "6: \n" \
110 "MRS r0, PSP \n" /* else r0 = PSP */ \
111 "7: \n"

◆ STK_ASM_GLOBAL_SYMBOL

#define STK_ASM_GLOBAL_SYMBOL ( name)
Value:
".global " #name "\n"

Generates a toolchain-agnostic assembly directive to declare a global symbol.

Parameters
[in]nameSymbol identifier to export globally.

Definition at line 35 of file stk_arch_arm-cortex-m-asm.h.

◆ STK_ASM_POOL

#define STK_ASM_POOL   ".pool \n"

Definition at line 22 of file stk_arch_arm-cortex-m-asm.h.

◆ STK_ASM_SYNTAX_UNIFIED

#define STK_ASM_SYNTAX_UNIFIED   ".syntax unified \n"

Definition at line 21 of file stk_arch_arm-cortex-m-asm.h.