Y86 assembly global variables

旧时模样 提交于 2019-12-02 06:33:52
Jester

irmovl as the name says is immediate to register. You want mrmovl as that is memory to register.

As for the syntax, since y86 does support displacement, I would expect mrmovl x, %edx to work. You say it doesn't, as a workaround you could use 2 instructions:

irmovl x, %edx     # load address
mrmovl (%edx), %edx # fetch value
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!