herumi/xbyak
A JIT assembler for x86/x64 architectures supporting the latest instruction set extensions such as AVX10.2 and ACE
Featured achievements
The project's latest awards
#2 Repository of the week
#4 Repository of the week
#7 Repository of the week
Xbyak 7.37.6 
A JIT assembler for x86/x64 architectures supporting advanced instruction sets up to AVX10.2
Menu
Abstract
Xbyak is a C++ header-only library that enables dynamic assembly of x86/x64 instructions using mnemonics.
The pronunciation of Xbyak is /kʌɪbjæk/ (kai-byak).
The name is derived from the Japanese word 開闢 (kaibyaku), which means "the beginning of the world" or "creation".
Features
- Header-only library
- Intel/MASM-like syntax
- Full support for AVX-512, APX, and AVX10.2
Note:
Use and_(), or_(), ... instead of and(), or().
If you want to use them, then specify -fno-operator-names option to gcc/clang.
Derived Projects
- Xbyak_aarch64 : for AArch64
- Xbyak_riscv : for RISC-V
News
- Support AVX10.2
- Support xresldtrk/xsusldtrk
- Support RAO-INT for APX
- Support AVX10 detection, AESKLE, WIDE_KL, KEYLOCKER, KEYLOCKER_WIDE
- Support APX except for a few instructions
- Add amx_fp16/avx_vnni_int8/avx_ne_convert/avx-ifma
- Add movdiri, movdir64b, clwb, cldemote
- WAITPKG instructions (tpause, umonitor, umwait) are supported.
- MmapAllocator supports memfd with user-defined strings. see sample/memfd.cpp
- Strictly check address offset disp32 in a signed 32-bit integer. e.g.,
ptr[(void*)0xffffffff]causes an error.- Define
XBYAK_OLD_DISP_CHECKif you need an old check, but the option will be remoevd.
- Define
- Add
jmp(mem, T_FAR),call(mem, T_FAR)retf()for far absolute indirect jump. - VNNI instructions such as vpdpbusd supports vex encoding.
- (Break backward compatibility)
push(byte, imm)(resp.push(word, imm)) forces to castimmto 8(resp. 16) bit. - (Windows)
#include <winsock2.h>has been removed from xbyak.h, so add it explicitly if you need it. - Support exception-less mode see. Exception-less mode
XBYAK_USE_MMAP_ALLOCATORwill be defined on Linux/macOS unlessXBYAK_DONT_USE_MMAP_ALLOCATORis defined.
Supported OS
- Windows (Xp, Vista, 7, 10, 11) (32 / 64 bit)
- Linux (32 / 64 bit)
- macOS (Intel CPU)
Supported Compilers
Almost C++03 or later compilers for x86/x64 such as Visual Studio, g++, clang++, Intel C++ compiler and g++ on mingw/cygwin.
References
- Intel 64 and IA-32 Architectures Software Developer Manuals
- Intel Advanced Performance Extensions (Intel APX) Architecture Specification
- Intel Advanced Vector Extensions 10.2 (Intel AVX10.2) Architecture Specification
- Intel Architecture Instruction Set Extensions Programming Reference
- Intel Software Development Emulator
License
Author
光成滋生 Mitsunari Shigeo
GitHub | Website (Japanese) | herumi@nifty.com
Sponsors welcome
Similar Projects
Discover other similar projects and AI models.
An online assembly editor, emulator and debugger for the x86-64 architecture
Visual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window
Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
Modern, secure, portable, multiprotocol bootloader and boot manager.