在ARM汇编中,立即数是否需要哈希值? [英] Is the hash required for immediate values in ARM assembly?

查看:105
本文介绍了在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汇编代码的立即数操作数之前不需要八位字符.您的印象不正确.

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

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

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