Re: Why does the Project distinguish between AMD64 and x86?

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Tue, 07 Jan 2025 03:07:48 UTC
On Mon, Jan 6, 2025 at 9:48 PM Matt Timpson <mdtymczyszyn@proton.me> wrote:
>
> Hello,
>
> I have to assume they use slightly different instruction sets, right? Does AMD64 just imply that the programmers wrote the software with AMD's particular chips in mind? One of those annoying articles written by "Contributor" sent me here, saying you don't use both terms interchangably.
>

There's lots of differences.
Some 32 bit instructions have been retired and no longer exist on 64 bit cpus.
Those instructions that haven't been retired and still exist have to
be expanded to include instruction 'parameters' to include new cpu
registers.  You could say, same instruction but larger depending on
registers used.
Not only this, the way parameters are passed to functions differs as
well -- mostly.  Stack vs registers.
The 64 bit arch has a red zone, the 32 bit arch doesn't.

I could go on and on, but when we're talking about architecture the
above come to mind immediately.
These can't be used interchangeably.  Just try running a 64 bit OS of
any kind on a 32bit cpu and well, it won't work.

As an aside, 99.999% of programmers don't target their program for a
specific chipset.  They write generic code and a compiler does all the
heavy lifting for them.
I left .001% of the programmers that do, but they aren't in the wild.

~Paul