在x86-64上的此语句有什么问题?

此函数用于获取堆栈的起始地址:

unsigned long find_start(void){
        __asm__("movq %rsp, %eax");
}

当我编译它时,得到一个错误:
Error: suffix or operands invalid for `movq'


最佳答案:

movq是需要64位操作数的指令。rsp是64位寄存器,而eax是32位寄存器。
也许可以试试?