3 ms·
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/introduct
by oneplane 7y ago
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-x64-assembly 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.
- asveikau 7y agoI 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.
- acqq 7y ago> * The old floating point stuff is gone. It actually can be used, if you write by hand, at least in Windows.
- chrisseaton 7y ago> 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?
- asveikau 7y agoI 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.
- monocasa 7y ago> 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.
- jcranmer 7y ago> 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).