开发者

Can't compile/assemble MRC and MCR coprocessor instructions on iPhone?

开发者 https://www.devze.com 2023-04-07 14:10 出处:网络
I don\'t seem to be able to assemble the MCR and MRC ARMv7 instructions (these are coprocessor access instructions) with iPhone? I have some of these instructions in some inline assembly blocks that w

I don't seem to be able to assemble the MCR and MRC ARMv7 instructions (these are coprocessor access instructions) with iPhone? I have some of these instructions in some inline assembly blocks that work quite nicely with the Code Sourcery gcc toolchain building for a different CortexA8 chip (an OMAP chip), but Apple's assemblers - the Clang assembler and their buil开发者_StackOverflow中文版d of the gnu assembler - throw up errors:

{standard input}:41:bad instruction `MRC p15,0,r2,C9,C12,0'
{standard input}:56:bad instruction `MCR p15,0,r0,C9,C12,0'
{standard input}:78:bad instruction `MCR p15,0,r0,C9,C12,1'
{standard input}:96:bad instruction `MCR p15,0,r0,C9,C12,2'
{standard input}:119:bad instruction `MCR p15,0,r2,C9,C12,4'
{standard input}:143:bad instruction `MCR p15,0,r0,C9,C12,5'
{standard input}:165:bad instruction `MCR p15,0,r0,C9,C13,1'
{standard input}:187:bad instruction `MCR p15,0,r0,C9,C13,2'
{standard input}:209:bad instruction `MCR p15,0,r0,C9,C13,0'
{standard input}:228:bad instruction `MRC p15,0,r0,C9,C13,0'
{standard input}:253:bad instruction `MRC p15,0,r0,C9,C13,2'

Any ideas?


(Originally as a comment on the question)

Random guess: have you tried changing "MRC" to "mrc"? Apple has a relatively ancient ARM assembler that has trouble with anything written in upper-case.

0

精彩评论

暂无评论...
验证码 换一张
取 消