asmjit::ujit::UniCompiler Class Reference [¶]
Universal compiler.
Creates UniCompiler
that would use the existing BackendCompiler (it would keep the pointer to it).
Creates UniCompiler
that would use the existing BackendCompiler (it would keep the pointer to it).
Destroys UniCompiler
- the existing BackendCompiler would be untouched.
Returns the behavior of scalar operations (mostly floating point).
Returns the behavior of floating point min/max operations.
Returns the behavior of floating point mul+add (madd
) operations.
Returns the behavior of float-to-integer conversion when the floating point is outside of the integer representable range, infinite, or NaN.
Tests whether a scalar operation is zeroing the rest of the destination register (AArch64).
Tests whether a scalar operation is preserving the low 128-bit part of the destination register (X86|X86_64).
Tests whether a floating point min/max operation selects a finite value if one of the values is NaN (AArch64).
Tests whether a floating point min/max operation works as a ternary if - if a <|> b ? a : b
(X86|X86_64).
Tests whether a floating point mul+add operation is fused (uses FMA).
Tests whether a FMA operation is available and that it can store the result to any register (true of X86).
Tests whether a FMA operation is available and that it only stores the result to accumulator register.
Tests whether a CPU hint hint
is enabled.
Returns a native register signature, either 32-bit or 64-bit depending on the target architecture).
Clones the given reg
register into a native register (either 32-bit or 64-bit depending on the target architecture).
Returns the current SIMD width (in bytes) that this compiler and all its parts must use.
The returned width is in bytes and it's calculated from the maximum supported widths of all pipeline parts. This means that SIMD width returned could be actually lower than a SIMD width supported by the target CPU.
Returns whether the compiler and all parts use 256-bit SIMD.
Returns whether the compiler and all parts use 512-bit SIMD.
Returns a constant that can be used to multiply a baseline SIMD width to get the value returned by vec_width()
.
A baseline SIMD width would be 16 bytes on most platforms.
Creates a new anonymous label.
See BaseEmitter::new_label() for more details.
Creates a new named label.
See BaseEmitter::new_named_label() for more details.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a new anonymous label with a name, which can only be used for debugging purposes.
See BaseEmitter::new_anonymous_label() for more details.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a new external label.
See BaseEmitter::new_external_label() for more details.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Binds the label
to the current position of the current section.
See BaseEmitter::bind() for more details.
Aligns the current position to the alignment
specified.
See BaseEmitter::align() for more details.
Embeds raw data into the instruction stream.
See BaseEmitter::embed() for more details.
Embeds a typed data array.
See BaseEmitter::embed_data_array() for more details.
Embeds int8_t value
repeated by repeat_count
.
Embeds uint8_t value
repeated by repeat_count
.
Embeds int16_t value
repeated by repeat_count
.
Embeds uint16_t value
repeated by repeat_count
.
Embeds int32_t value
repeated by repeat_count
.
Embeds uint32_t value
repeated by repeat_count
.
Embeds int64_t value
repeated by repeat_count
.
Embeds uint64_t value
repeated by repeat_count
.
Embeds a 32-bit floating point value
repeated by repeat_count
.
Embeds a 64-bit floating point value
repeated by repeat_count
.
Embeds a constant pool at the current offset.
See BaseEmitter::embed_const_pool() for more details.
Embeds an absolute label
address as data.
See BaseEmitter::embed_label() for more details.
Embeds a delta (distance) between the label
and base
calculating it as label - base
.
See BaseEmitter::embed_label_delta() for more details.
Emits a comment stored in data
with an optional size
parameter.
Emits a formatted comment specified by fmt
and variable number of arguments.
Emits a formatted comment specified by fmt
and ap
.
Returns the function being generated.
This is just a convenience wrapper that calls BaseCompiler::func().
Hooks a function that is being generated by BaseCompiler.
This function is called automatically by add_func_node() and add_func(). However, if BaseCompiler was called instead of UniCompiler to add the function node to the instruction stream, then it has to be hooked manually.
Unhooks a function.
In general this mostly does a cleanup of UniCompiler.
Creates a new FuncNode.
This is just a convenience wrapper that calls BaseCompiler::new_func_node().
Creates a new FuncNode adds it to the instruction stream.
This is just a convenience wrapper that calls BaseCompiler::add_func_node().
Creates a new FuncNode with the given signature
, adds it to the instruction stream by using add_func(FuncNode* func)
overload, and returns the node.
Adds a function node
to the instruction stream.
Creates a new FuncRetNode.
This is just a convenience wrapper that calls BaseCompiler::new_func_ret_node().
Creates a new FuncRetNode and adds it to the instruction stream.
This is just a convenience wrapper that calls BaseCompiler::add_func_ret_node().
Ends the current function by emitting a sentinel that marks the end of it.
Return from function, a convenience function that calls BaseCompiler::ret().
This doesn't end the function - it just emits a return.
Return from function - one value.
This doesn't end the function - it just emits a return.
Return from function - two values / register pair.
This doesn't end the function - it just emits a return.
Calls BaseCompiler::finalize().
Creates a new InvokeNode.
Creates a new InvokeNode and adds it to the instruction stream.
Wraps BackendCompiler::new_reg(type_id, args...)
.
Wraps BackendCompiler::new_similar_reg(ref, args...)
.
Wraps BackendCompiler::new_gp32(args...)
.
Wraps BackendCompiler::new_gp64(args...)
.
Wraps BackendCompiler::new_gpz(args...)
.
Wraps BackendCompiler::new_gpz(args...)
.
AsmJit compiler.
Reference to a table that provides global constants.
This table can be extended by users so it fits a particular use-case, see UniCompiler constructor.
The behavior of scalar operations (mostly floating point).
The behavior of floating point min/max operation.
The behavior of floating point madd
operation.
The behavior of a float-to-int conversion when the float is out of integer range, infinite, or NaN.
Target CPU features.
Number of available vector registers.
SIMD width.
SIMD multiplier, derived from _vec_width
(1, 2, 4).
SIMD register type (AsmJit).
SIMD type id (AsmJit).
Temporary stack used to transfer SIMD regs to GP.
Offset to the first constant to the commonTable
global.