12.07.2015 Views

RealView 编译工具编译器参考指南 - ARM Information Center

RealView 编译工具编译器参考指南 - ARM Information Center

RealView 编译工具编译器参考指南 - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

编 译 器 特 有 的 功 能示 例void foo(void){int loc=0xff;__strt(0x20, (volatile char *)loc);}编 译 此 代 码 时 , 将 生 成 以 下 内 容 :||foo|| PROCMOVMOVSTRBTBXENDPr0,#0xffr1,#0x20r1,[r0],#0lr另 请 参 阅• 第 2-119 页 的 --thumb• 《 汇 编 器 指 南 》 中 第 4-17 页 的 LDR 和 STR ( 用 户 模 式 )。4.7.39 __swp此 内 在 函 数 在 编 译 器 生 成 的 指 令 流 中 插 入 SWP{size} 指 令 。 它 允 许 从 C 或 C++ 代码 中 在 内 存 位 置 之 间 交 换 数 据 。注 意在 <strong>ARM</strong>v6 和 更 高 版 本 中 , 不 提 倡 使 用 SWP 和 SWPB。语 法unsigned int __swp(unsigned int val, volatile void *ptr)其 中 :val 是 要 写 入 到 内 存 中 的 数 据 值 。<strong>ARM</strong> DUI 0348BC Copyright © 2007-2009 <strong>ARM</strong> Limited. All rights reserved. 4-99ID090708Non-Confidential, Unrestricted Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!