AARCH64上不存在MCR和MRC吗? [英] MCR and MRC does not exist on AARCH64?

查看:349
本文介绍了AARCH64上不存在MCR和MRC吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试基于Board在AARCH64上编译"mrc"和"mcr"指令,但是我看到以下错误消息

I am trying to compile "mrc" and "mcr" instruction on AARCH64 based on Board but I am seeing below error message

   tmp/ccqOHmrK.s: Assembler messages:
  /tmp/ccqOHmrK.s:43: Error: unknown mnemonic `mrc' -- `mrc p15,0,x0,c14,c3,1'
  /tmp/ccqOHmrK.s:53: Error: unknown mnemonic `mrc' -- `mrc p15,0,x2,c14,c3,0'

我尝试查看内核源代码/arch/arm64,但没有在没有仿真的情况下使用过mcr& mrc的地方.

I tried looking into the kernel source /arch/arm64 but no where mcr&&mrc has been used without emulation.

这是语法问题吗?

推荐答案

您应将它们替换为相应的msr指令. 例如,

You should replace these with the appropriate msr instructions. For example, arch/arm/include/asm/arch_timer.h has:

case ARCH_TIMER_REG_CTRL:
    asm volatile("mcr p15, 0, %0, c14, c3, 1" : : "r" (val));

这篇关于AARCH64上不存在MCR和MRC吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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