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

📄 sys_ppc.s

📁 abstract rtos
💻 S
字号:
#define _ASMLANGUAGE#include <vxWorks.h>#include <asm.h>#include <regs.h>        .file "sys_ppc.s"    .text    .align  2    .globl sys_get_cur_spsys_get_cur_sp:    mr         r3,r1    blr        .align 2    .globl ppc_get_timeppc_get_time:loop:    mftbu      r7   #load from TBU    mftb       r5   #load from TBL    mftbu      r6   #load from TBU    cmpw       r7,r6     bne        loop #loop if carry occurred    stw        r5,0(r3)    stw        r7,0(r4)    blr    .type ppc_get_time,@function    .size ppc_get_time,.-ppc_get_time    .align 2    .globl atom_fetch_and_storeatom_fetch_and_store:loop_2:    lwarx  r5,0,r3   #load and reserve    stwcx. r4,0,r3   #store new value    bne-    loop_2    mr     r3,r5    blr    .type atom_fetch_and_store,@function    .size atom_fetch_and_store,.-atom_fetch_and_store    

⌨️ 快捷键说明

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