12.07.2015 Views

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

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

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

编 译 器 特 有 的 功 能另 请 参 阅• 第 4-93 页 的 __sev• 第 4-91 页 的 __schedule_barrier• 第 4-101 页 的 __wfe• 第 4-102 页 的 __wfi• 第 4-102 页 的 __yield• 《 汇 编 器 指 南 》 中 第 4-138 页 的 NOP、 SEV、 WFE、 WFI 和 YIELD• 《 编 译 器 用 户 指 南 》 中 第 4-3 页 的 通 用 内 在 函 数 。4.7.19 __pld此 内 在 函 数 在 编 译 器 生 成 的 指 令 流 中 插 入 数 据 预 取 , 例 如 PLD。 它 允 许 从 C 或C++ 程 序 中 发 信 号 通 知 内 存 系 统 , 此 后 不 久 可 能 会 从 某 个 地 址 中 加 载 数 据 。语 法void __pld(...)其 中 :... 表 示 任 意 数 量 的 指 针 或 整 数 自 变 量 , 用 于 指 定 要 预 取 的 内 存 地 址 。限 制如 果 目 标 体 系 结 构 不 支 持 数 据 预 取 , 则 此 内 在 函 数 无 效 。示 例extern int data1;extern int data2;volatile int* interrupt = (volatile int *)0x8000;volatile int* uart = (volatile int *)0x9000;void get(void){__pld(data1, data2);while (!*interrupt);*uart = data1; // trigger uart as soon as interrupt occurs*(uart+1) = data2;}4-84 Copyright © 2007-2009 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0348BCNon-Confidential, Unrestricted AccessID090708

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

Saved successfully!

Ooh no, something went wrong!