Portable "asm" (Was: The D Programming Language)

Doug Gwyn gwyn at brl-smoke.ARPA
Thu Mar 3 04:35:54 AEST 1988


In article <2738 at mmintl.UUCP> franka at mmintl.UUCP (Frank Adams) writes:
>Clearly, assembler statements should have been defined as:
>#asm <statement>
>instead of
>asm("statement");

A properly-designed system programming language should not have such
a feature at all.  (It is not guaranteed in C, either.)  The interface
between the optimized code produced for the HLL and the in-line
assembly code is quite problematic.  Also, the compiler should not be
forced to have an assembler built-in just to handle such stuff; many
compilers directly generate relocatable object code.

If there is some feature that might be worth having asm() for, for
example "rotate" instructions, then consider designing it into the
HLL.



More information about the Comp.lang.c mailing list