⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pseudo_intrinsics.h

📁 ARM公司ATC培训的所有练习源码
💻 H
字号:
#ifndef PSEUDO_INTRINSICS_H_
#define PSEUDO_INTRINSICS_H_

/* Small pieces of assembler that the compiler does not have an intrinsic for.
 * 
 * If kept to a single 32bit instruction or 1 or 2 16bit instructions then
 * the linker will be able to inline the instruction(s) in the space occupied 
 * by the 32bit BL that the compiler uses to call the function.
 * Must turn on inlining with --inline i.e.
 * 
 * armlink --inline ...
 * 
 */
 

__asm void __WFI(void)
{
	WFI
	BX r14
}


__asm void __ISB(void)
{
	ISB
	BX r14
}


__asm void __DSB(void)
{
	DSB
	BX r14
}


__asm void __DMB(void)
{
	DMB
	BX r14
}

__asm int __MRS_control(void)
{
	MRS r0,CONTROL
	BX lr
}

__asm void __MSR_control(int control)
{
	MSR CONTROL,r0
	BX lr
}

#endif /*PSEUDO_INTRINSICS_H_*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -