Re: Embedding assembler in a language

On 2009-11-19, tm <thomas.mertes@xxxxxx> wrote:
such crap.

If there is a genuine need for assembler, isn't it much better to make it
available within the discipline of a high-level language?

Why is there a need for assembler?
I want to know about each and every problem where people think they
need assembler and where they think something cannot be solved in a
high level language. If it is for performance reasons I want to know
which language feature is considered slow.

These are slower than assembler in Pascal/Delphi, and thus in all languages:

- move a block of memory
- fill a block of memory (byte/word/dword/qword)
- search for a value in a block of memory (byte/word/dword/qword)
- Compare a range of memory (byte/word/dword/qword)
- int64/qword language helpers
- (>32-bit elements) set language helpers
- Two hands full of the deepest string primitives. While maybe these
could be expressed in other primitives, coding these out, and
with certain assumptions about used registers is notacibly faster.
- mpi routines. Every cycle the loop is shorter is noticable
- most math primitives, due to setting copro mask inline and using FPU

Some stuff is only doable in assembler, because they e.g. break the
procedural regime or touch registers and instructions not modeled by the

- most math primitives, due to setting copro mask inline and using FPU
- exception helpers
- Change a coprocessor exceptions mask. Switch to MMX mode etc
- check cpu version and capabilityies
- spinlock primitives, CAS etc.


Relevant Pages

  • Re: Jit Implementation
    ... but, it is confusing here as "M" is said to represent x86 instructions, ... I didn't want to go the route of assembler output, object code, linking and ... I wanted to maintain the dynamicism of an ... interpreted language. ...
  • Re: for your languages
    ... provided by the C programming language, and how it compares with other ... "enforces" specific machine instructions. ... If I ran that through an assembler and got something other than ...
  • Re: Evolution
    ... > inline assembler and larger parts by linking to an assembler ... in the HLL. ... language, particularly in smaller projects. ... > or two instructions if you ...
  • Re: HLA StdLib2 criticism
    ... HLC.EXE with an already existing C compiler and calls it HLC system. ... Suppose someone creates a new language and calls it "High Level ... Assembler" (HLA). ...
  • Re: What is an assembly language?
    ... HLA is an assembler. ... So what is this essential ability of an assembly language that is ... > that Randy-HLA isn't an x86 assembler. ...