My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

jitasm

[En]
jitasm is C++ library for runtime code generation of x86/x64. You can write the code like a inline assembler.

[Ja]
jitasmはx86/x64のコードを動的に生成するためのC++ライブラリです。
インラインアセンブラのような直感的な記述で動的なコード生成・実行を行うことができます。

Features

[En]

  • Header only library
  • Support for x86, x64, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, avx, fma, xop, fma4
  • Automatic code generation of prolog and epilog according to function calling convention
  • Register allocation
  • Support for Windows, Linux, FreeBSD, Mac
[Ja]
  • 単一のヘッダファイルのみのライブラリ
  • x86, x64, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, avx, fma, xop, fma4サポート
  • 関数呼び出し規約に従ったプロローグ・エピローグの自動生成
  • レジスタアロケーション
  • Windows, Linux, FreeBSD, Macサポート

Example

// int plus(int a, int b)
// {
//   return a + b;
// }
struct Plus : public jitasm::function<int, Plus, int, int>
{
  Result main(Reg32 a, Reg32 b)
  {
    add(a, b);
    return a;
  }
};

// Generate plus function and call.
Plus plus;
int c = plus(1, 2);
Powered by Google Project Hosting