Am 12.12.2013 21:08, schrieb H. S. Teoh:
On Thu, Dec 12, 2013 at 08:57:42PM +0100, Max Samukha wrote:
On Thursday, 12 December 2013 at 17:56:12 UTC, Walter Bright wrote:
11. inline assembler being a part of the language rather than an
extension that is in a markedly different format for every
compiler
Ahem. If we admit that x86 is not the only ISA in exsistence, then
what is (under)specified here http://dlang.org/iasm.html is a
platform-specific extension.
I've always wondered about that. What is D supposed to do with asm
blocks when compiling for a CPU that *isn't* x86?? What *should* a
conforming compiler do? Translate x86 asm into the target CPU's
instructions? Abort compilation? None of those options sound
particularly appealing to me.
T
I already argued a few times here that although inline assembly seems
convenient, I do favour the use of external macro assemblers.
There will always be some ISAs that are more special than others. So I
rather have clean higher level code that drops out to assembly, that
having version() for each processor and lack thereof.
So far I have only used dmd, but as far as I know both gdc and ldc don't
follow the same asm syntax anyway.
--
Paulo