ARM 程序集中的立即数是否需要散列? [英] Is the hash required for immediate values in ARM assembly?

查看:15
本文介绍了ARM 程序集中的立即数是否需要散列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力阅读由 gcc 生成的一些不同的 arm 汇编代码,但我发现了一些我在规范中找不到的东西.

I've been working on reading through some different arm assembly code generated by gcc, and I came across something that I haven't been able to find in the spec.

movw    r0, #39784
movt    r0, 1

显然第一个是将值 39784 移动到底部 16 位或 r0,但 movt 的1"操作数是奇数,因为它前面没有散列,我的印象是立即数需要散列.在某些情况下它是否是可选的?还是我错过了什么神奇的东西?

Obviously the first one is moving the value 39784 into the bottom 16bits or r0, but the movt's operand of '1' is odd because it doesnt have the hash before it, and I was under the impression that immediate values required the hash. Is it somehow optional in certain situations? or am I missing something magical?

推荐答案

GNU 汇编器不需要在 ARM 汇编代码的立即数操作数之前使用 octothorpe.您的印象有误.

The GNU assembler does not require an octothorpe before an immediate operand for ARM assembly code. Your impression is incorrect.

这篇关于ARM 程序集中的立即数是否需要散列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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