I read this sentence in a book:

In VLIW architecture, the compiler/and or assembly writer chooses instructions that can be executed in parallel.

What is the difference between assembly writer and compiler? Would an assembly writer also mean the same as assembler?


The "assembly writer" in that book is a human software developer who writes code in assembler language.

  • 15
    $\begingroup$ 1. interpreter doesn't convert anything to assembly language. 2. Any tool that converts source code to assembly language is by definition a compiler. $\endgroup$ – gnasher729 May 14 at 7:10
  • 4
    $\begingroup$ @KellyS.French an assembler converts assembly language code to machine code, so with this definition it isn't a compiler. If, however, you have a tool that converts one assembly language into another (e.g. ARBfp1.0 to native assembly language of a modern GPU), this tool is a compiler (with this definition). $\endgroup$ – Ruslan May 14 at 19:38
  • 1
    $\begingroup$ @gnasher729 - nitpick: by most definitions, the "Assembly language" part of (2) is unnecessary (notably, things like the typescript compiler or the java compiler, neither of which compile the source to assembly, but compile to javascript or java bytecode respectively). More recently it generally means any tool which compiles one programming language into another programming language (and assembly is technically a programming language). $\endgroup$ – Delioth May 14 at 21:11
  • 1
    $\begingroup$ @KellyS.French: A compiler is a program that translates a program in language X into a semantically equivalent program in language Y. Depending on what exactly the languages X and Y are, we have special names for those compilers, and "assembler" is one of those special names. But they are all special kinds of compilers. E.g. if Y = assembly and X is higher-level than Y, then we call it an assembler. If Y = assembly and X is lower-level than Y, we call it a disassembler. If X is lower-level than Y and Y != assembly, we call it a de-compiler. If X and Y are the same level, recent usage would … $\endgroup$ – Jörg W Mittag May 15 at 12:48
  • 1
    $\begingroup$ @KellyS.French: I guess the reason why assemblers aren't typically talked about much in terms of compilers is that assemblers are very boring compilers. At its core, an assembler is just a 1:1 mapping of human-readable mnemonics to machine-readable opcodes. The parsing stage is simple, there are no types, there are no optimizations, the code generation is trivial. None of the interesting algorithmitic stuff that compilers do is present: parsing a complex language, type checking, type inference, optimizations, clever mapping of semantics etc. $\endgroup$ – Jörg W Mittag May 16 at 5:10

In VLIW architecture, the compiler/and or assembly writer chooses instructions that can be executed in parallel

The meaning of this sentence is that in VLIW architecture, assembler (machine) code defines which instruction will be executed in parallel, so it's fixed at the time assembly code is written by a human or generated by a compiler.

This differs from super-scalar cpus, where instructions may be executed in parallel, this is a decision made by CPU each time it executes the instructions.

There are also CPUs that combine both approaches - Itanium2 is backward-compatible with Itanium, packing 3 instructions into VLIW word. But, afair, Itanium2 can execute two such packs in the single CPU cycle, and this decision is made at execution time.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.