What does the GCC error message, “Error: unsupported for `mov'”, mean?

雨燕双飞 提交于 2019-11-30 15:22:51

You are attempting to compile 32-bit assembly code on a 64-bit machine. The inline assembly you list compiles to:

movl -24(%rbp), %ebx
movl %rsi, %ecx       <--- error here
movl -28(%rbp), %edx
movl $103, %eax
int $128
movl %eax, %r12d

As you can see, you're attempting to store a 64-bit register in a 32-bit register, which is illegal. More importantly, this isn't the 64-bit ABI system call protocol either.

Try compiling with -m32 to force 32-bit ABI.

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