[问题] 暂存器功能差异

楼主: yshihyu (yshihyu)   2015-04-08 00:29:44
https://gist.github.com/anonymous/d5fa2a96a6e1d17bb43a
as -o hello64.o hello64.s && ld -o hello64 hello64.o && ./hello64
rax rbx rcx rdx 不能混用吗?
mov $4, %rax
mov $1, %rbx
mov $msg, %rcx
mov $len, %rdx
如果改成现在这样编译执行就不对
mov $4, %rbx
mov $1, %rax
mov $4 跟 mov $1 我看不出来用那个暂存器
谢谢
作者: zha0 (这个帐号是挂网用)   2015-04-08 06:35:00

Links booklink

Contact Us: admin [ a t ] ucptt.com