An ARM Assembler Written in Lisp
forum.ulisp.com
forum.ulisp.com
This paradigm is well seen in the GOAL (Game Oriented Assembly Lisp) code for Jak & Daxter that could mix relatively standard lisp, MIPS asm, and PS2 custom vector asm all within the same function: https://web.archive.org/web/20070127022728/http://lists.midn...
Your explanation makes far more sense.
Later the CPUs were actually Microprocessors (from TI and Symbolics). At least for the Symbolics Ivory microprocessor, the microcode no longer was loadable.
The turns the world does instead of adopting good ideas from the get go.
You can still find its leaked source code on the internet.
"We built a prototype of the emulator in C, but it quickly became obvious that we could not achieve the level of performance desired in C. Examination of code emitted by the C compiler showed it took very poor advantage of the Alpha's dual-issue capabilities. A second implementation was done in Alpha assembly language and is the basis for the current product.
We built a number of tools (in Lisp, running on Genera) that supported the level of complexity of the assembly language program we were attempting. A translator was built that allowed us to use Lisp as a macro language. One of the primary benefits of using Lisp was that we could use all our normal development tools, including incremental patching, even though we were working in another machine's assembly language. Even more beneficial, however, was that early on in the project, we were able to easily graft on to the translator a cycle-counting tool that allowed one to easily and automatically "preview" any code fragment and see its total cycle cost, dual-issues that were taken or missed, and any free stall slots. Because this tool was integrated directly with the Genera editor, we were able to pro-actively optimize our code, right from the start. The full paper describes this tool in more detail, with examples, and compares it with tools that have recently become available from DEC that attempt to automatically re-organize executable files. It is our claim that our tool, because of its interactive nature, offers many more opportunities for optimization."
Clozure CL should also include an inline assembler.
Lisp assemblers date back to the 60s.
https://github.com/nathell/lithium/blob/master/src/lithium/a...
In general, I find that s-expressions are actually a nice syntax for assembly languages. For x86, they kind of sidestep the AT&T vs. Intel conundrum, and you get to write macro-like functions in the host Lisp that compile down to s-expressions.
http://pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-cod...
The original site seems to be unavailable right now, but it's mirrored on archive.org:
https://web.archive.org/web/20230331151459/http://interim-os...
E.g. look at the defarmlap function definitions in Clozure Common Lisp:
https://github.com/Clozure/ccl/blob/master/level-0/ARM/arm-h...
.. and other files, plus other architectures in other subdirectories.