棋子 · 2020年02月10日

Is a MOV using high registers (R8-R15) possible

The ARMv6-M Architecture Reference Manual section "A6.7.40 MOV (register)" on page A6-140 states that the T1 encoding of the MOV instruction is only available on the ARMv6-M architecture if both the source and destination register are from R0-R7. However arm-none-eabi-as assembles the instruction "MOV r15, r14" without any problems:

$ echo 'mov r15,r14' | arm-none-eabi-as -march=armv6-m
$ arm-none-eabi-objdump -d a.out
...
0: 46f7 mov pc, lr
Also, this answer on stackoverflow states that it is possible to acces the high registers on the ARMv6-M architecture.

Could this be a mistake in the reference manual? Or am I reading it wrong?

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年02月10日

Right, the comment seems to be wrong. In fact, you can move to/from hi-regs.

你的回答
关注数
1
收藏数
0
浏览数
2133
极术小姐姐
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息