Does evolution of microprocessors warrants evolution of compilers and language standards?

StackOverflow https://stackoverflow.com/questions/4971475

  •  12-11-2019
  •  | 
  •  

Pergunta

As chip makers add new functions, instructions etc to new chips, do we need newer versions of the compilers accordingly to use those new instructions and features of the chip? Also does it mean that programming language also needs new opcodes,syntax etc to use the new features of the chip?

Foi útil?

Solução

Yes, new hardware features are reflected in language extensions and in new languages. For example, see the various vector extensions for C and C++ that reflects the availability of SIMD instructions, and the new derived data-parallel languages like CUDA and OpenCL.

If the hardware is significantly different from the others, it is likely that it will require its own, different programming language, see the late Transputers and their Occam language.

Outras dicas

Compilers that compile to machine code (not to a VM) might need to change any time its target architecture changes (although ideally all changes would be backward compatible, so that additions just mean there's new optimizations possible, but that old compilers would still work).

Programming languages don't need to change, but might if a desirable feature is made newly possible by a change in the machine's capabilities. Unless, by "programming languges" you mean assembly/machine language, in which case a one to one chip-instruction to assembly/machine instruction probably ought to be (but doesn't have to be) be added.

Notice all the "might"s. Chances are that these changes are invisible to you unless you're working in Assembly, Machine code, compiler design, or programming language design. If you're not, then worrying yourself about these things is a waste of your time.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top