简体   繁体   中英

Assembly register vs CPU register

As a CS beginner, I know that the CPU has some hardware called register that used to store temporary variables. But I also see x86 assembly code has the "register" conception like %EAX, %ECX. Wondering what's the difference here, or are they the same thing or do they have any relationships?

They were once the same thing, and in a more primitive CPU architecture they are still the same thing.

x86 now does register renaming and the CPU actually has a lot more registers than it would appear. On the other hand, you may write code as though that were not true. If you can tell the difference by any means other than execution speed, the CPU is buggy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM