如何在 WinMobile6 上启用 ARMv6 未对齐访问? [英] How to enable ARMv6 unaligned access on WinMobile6?

查看:20
本文介绍了如何在 WinMobile6 上启用 ARMv6 未对齐访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ARMv6 引入了一个很棒的功能 - 未对齐的内存访问,它使代码中的某些内容更加简单和快速.但是微软只在winCE6中为其提供了API.并且大多数 PDA 现在基于 WinMobile6(基于 CE 5.x).默认情况下禁用未对齐的访问:(

ARMv6 introduce a great feature - unaligned memory access, which make some things in code much more simplier and faster. But microsoft gives API for it only in winCE6. And most PDAs now based on WinMobile6 (which is on CE 5.x). And unaligned access is disabled by default :(

我尝试在 CP15 寄存器中设置未对齐标志,但这不起作用 - 我在读取未对齐数据时崩溃.

I've try to set unaligned flag in CP15 register, but this doesn't work - I have a crash on read unaligned data.

是否可以在 WinMobile6 上启用非对齐访问?

Is it possible to enable unaligned access on WinMobile6?

我找到了可以启用未对齐访问的工具,但我想从我的代码中打开/关闭它.它是 nueAdvancedProcessor.

I've found the tool, which can enable unaligned access, but I want to on/off it from my code. It's nueAdvancedProcessor.

推荐答案

有一个未对齐的访问标志(CP15 控制寄存器中的 U 位)和一个对齐错误检查器(A 位).确保您拥有适合您想做的事情的正确组合.特别是,如果设置了 A 位,即使您打开了 U 位,所有未对齐的访问都会导致数据中止异常.查看 ARM 文档 - 可在 http://www.arm.com 上找到.

There is an unaligned access flag (the U bit in CP15 control register) and also an alignment fault checker (the A bit). Make sure you have the right combination for what you want to do. In particular, if the A bit is set, all of your unaligned accesses will cause a data abort exception, even if you have the U bit on. Check out the ARM docs on that - all available at http://www.arm.com.

特别是,您需要 ARM 体系结构参考手册中的第 A2.8.2 节ARMv6 系统中的未对齐数据访问".文档编号 ARM DDI 0100I.它的标题是ARMv5 体系结构参考手册",但包含初始 ARMv6 信息.我希望这个链接有效:http://infocenter.arm.com/help/topic/com.arm.doc.ddi0100i/index.html

In particular, you want Section A2.8.2 "Unaligned data access in ARMv6 systems" in the ARM Architecture Reference Manual. Document number ARM DDI 0100I. It's titled "ARMv5 Architecture Reference Manual", but contains the initial ARMv6 information. I hope this link works: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0100i/index.html

这篇关于如何在 WinMobile6 上启用 ARMv6 未对齐访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆