AsmJit Project
Machine Code Generation for C++
Represents an environment, which is usually related to a Target.
Environment has usually an 'arch-subarch-vendor-os-abi' format, which is sometimes called "Triple" (historically it used to be 3 only parts) or "Tuple", which is a convention used by Debian Linux.
AsmJit doesn't support all possible combinations or architectures and ABIs, however, it models the environment similarly to other compilers for future extensibility.
Architecture.
Platform / OS.
Object format.
Constant | Description |
---|---|
kFormatUnknown | Unknown or uninitialized object format. |
kFormatJIT | JIT code generation object, most likely JitRuntime or a custom Target implementation. |
kFormatELF | Executable and linkable format (ELF). |
kFormatCOFF | Common object file format. |
kFormatXCOFF | Extended COFF object format. |
kFormatMachO | Mach object file format. |
kFormatCount | Count of object format types. |
Tests whether the environment is not set up.
Returns true if all members are zero, and thus unknown.
Tests whether the environment is intialized, which means it must have a valid architecture.
Resets all members of the environment to zero / unknown.
Returns the architecture, see Arch.
Returns the sub-architecture, see SubArch.
Returns vendor, see Vendor.
Returns target's platform or operating system, see Platform.
Returns target's ABI, see Abi.
Returns target's object format, see Format.
Tests whether the architecture is 32-bit.
Tests whether the architecture is 64-bit.
Tests whether the architecture is little endian.
Tests whether the architecture is big endian.
Tests whether this architecture is of X86 family.
Tests whether this architecture family is RISC-V (both 32-bit and 64-bit).
Tests whether this architecture family is ARM, Thumb, or AArch64.
Tests whether this architecture family is MISP or MIPS64.
Tests whether the environment platform is Windows.
Tests whether the environment platform is Linux.
Tests whether the environment platform is Hurd.
Tests whether the environment platform is Haiku.
Tests whether the environment platform is any BSD.
Tests whether the environment platform is any Apple platform (OSX, iOS, TVOS, WatchOS).
Tests whether the ABI is MSVC.
Tests whether the ABI is GNU.
Returns a calculated stack alignment for this environment.
Returns a native register size of this architecture.
Sets the architecture to arch
.
Sets the sub-architecture to subArch
.
Sets the vendor to vendor
.
Sets the platform to platform
.
Sets the ABI to abi
.
Sets the object format to format
.
Tests whether the given architecture arch
is 32-bit.
Tests whether the given architecture arch
is 64-bit.
Tests whether the given architecture arch
is little endian.
Tests whether the given architecture arch
is big endian.
Tests whether the given architecture is AArch64.
Tests whether the given architecture family is X86 or X64.
Tests whether the given architecture family is RISC-V (both 32-bit and 64-bit).
Tests whether the given architecture family is ARM, Thumb, or AArch64.
Tests whether the given architecture family is MISP or MIPS64.
Returns a native general purpose register size from the given architecture.
Architecture type, see Arch.
Sub-architecture type, see SubArch.
Vendor type, see Vendor.
Platform type, see Platform.
ABI type, see Abi.
Object format, see Format.
Reserved for future use, must be zero.
Architecture detected at compile-time (architecture of the host).
Sub-architecture detected at compile-time (sub-architecture of the host).
Vendor detected at compile-time (vendor of the host).
Platform detected at compile-time (platform of the host).
ABI detected at compile-time (ABI of the host).