Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far as I know, x86_64 added instructions, modes and memory address changes but the assembly is the same?

https://software.intel.com/en-us/articles/introduction-to-x6...

I mean, you have different modes, and in 64-bit mode EAX becomes RAX for example.



I agree with this, if you are competent at 32-bit those skills are going to translate. It is mostly the same.

Some exceptions that come to mind:

* The old floating point stuff is gone. EDIT: guess I am wrong on that, was thinking of what compilers typically generate for the architecture.

* The C abi now tends to focus on pass-by-register for the first few arguments.

* If you are working in kernel mode, some stuff is going to necessarily look different.


> The old floating point stuff is gone.

Do you mean x87? I’m not sure it’s true that it’s gone is it? The instructions are still documented? Do they not work?


I guess I stand corrected. I was under the impression that C compilers don't tend to use it anymore when compiling for amd64. (Because you can assume SSE support on amd64, unlike a binary that might run on an old Pentium.) Then I misread that situation as it not working.

It does take effort for an OS kernel to save and restore x87 state, so I could imagine somebody dropping support.


> It does take effort for an OS kernel to save and restore x87 state, so I could imagine somebody dropping support.

FXSAVE saves the x87 state with the SSE state, and XSAVE generalizes that to add several optional components, depending on what your processor support (as of right now, AVX state, MPX state, 3 for AVX-512, PT state, and SGX state, IIRC).


> It does take effort for an OS kernel to save and restore x87 state, so I could imagine somebody dropping support.

x86 makes it pretty easy on the kernel devs with XSAVE.


> * The old floating point stuff is gone.

It actually can be used, if you write by hand, at least in Windows.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: