On Saturday, 29 April 2017 at 14:13:18 UTC, Patrick Schluter
That's not a simple assumption, it's acknowledgment that a C
program runs on real
hardware not a virtual machine like Java or C#.
Modern X86s are basically virtual machines... The instruction set
is decoded and executed on a completely different machine than
the original X86.
This is no longer true of course, as "registers" are "SIMD
SIMD and GP are not related and one will never replace the
other. SIMD is generally for floating point, when it is used
for integer, it is not for the usual integer semantics and
requires special handling in any case.
Huh? No, at least on X86 the register is only bits. You can mask
floats with ints.
So I am pretty sure it will lead to suboptimal code in some
Can also be said if it had another semantic.
Not sure what you mean here. If every byte is recast to 32bit
then you have to prove that it ends up with the same result when
computed as 8bit.
In C it is cast to the register size (16bit, 32bit or 64bit),
because C was designed for 40 years old CPUs where you had a
fixed word size (register size).
D has locked int to 32 bit, so the register argument no longer
For the same reason it is in C. If the ambition for D is to be
a system language then it should avoid introducing artificial
abstractions and work with the machine it runs on, not against.
But the C environment no longer works well with the machine it
runs on. It is archaic and doesn't really reflect the underlying
hardware well. It may seem like it does, but that's only because
hardware vendors target C-generated code...