Asmjit - JIT asm compiler (for C++)
Bill Baxter
wbaxter at gmail.com
Mon Feb 2 23:50:22 PST 2009
On Tue, Feb 3, 2009 at 4:27 PM, dennis luehring <dl.soluz at gmx.net> wrote:
> Bill Baxter schrieb:
>
>> That's pretty cool already, but I was thinking with D you could just
>> write the assembly function directly as a string mixin. Or really
>> (even in C++ ) you could just parse the darn assembly function at
>> runtime.
>
> other JIT assemblers:
>
> http://homepage1.nifty.com/herumi/soft/xbyak_e.html
> http://www.transgaming.com/products/swiftshader/
>
>> With compile time parsing you get to keep the compile time
>> check to make sure the asm instructions are at least typo-free.
>> Also kind of relevant to the other thread here about compiling
>> different versions of the same function for different target
>> processors.
>
> that makes no sense for an "JIT" assembler
> to find code errors in assembly or produce different version at compiletime
> ---> use version-flag and the inline assembler :-)
It would let you find out if you typed "psuh" instead of "push" in
your chunk of assembly code that you will only be compiling at runtime
in the event it is appropriate for that platform. Maybe it's not much
better than just doing what the asmjit guys are doing, though.
a.push(ebp); is already close to looking like assembly, and the
compiler will already check that for typos and proper argument counts
just fine.
--bb
More information about the Digitalmars-d
mailing list