asmjit::a64::Compiler Class Reference
Inheritance diagram for asmjit::a64::Compiler:
asmjit::BaseCompiler asmjit::a64::EmitterExplicitT< Compiler > asmjit::BaseBuilder asmjit::BaseEmitter

AArch64 compiler implementation.

Public Types

- Public Types inherited from asmjit::BaseCompiler
- Public Types inherited from asmjit::BaseBuilder

Member Functions

Construction & Destruction
Virtual Registers
Stack
Constants
Instruction Options
Compiler specific
Function Call & Ret Intrinsics
Jump Tables Support
Events
Finalize
- Public Member Functions inherited from asmjit::BaseCompiler
- Public Member Functions inherited from asmjit::BaseBuilder
- Public Member Functions inherited from asmjit::BaseEmitter
- Public Member Functions inherited from asmjit::a64::EmitterExplicitT< Compiler >

Additional Inherited Members

- Public Attributes inherited from asmjit::BaseCompiler
- Public Attributes inherited from asmjit::BaseBuilder
- Public Attributes inherited from asmjit::BaseEmitter

Member Function Documentation

Mem a64::Compiler::newStack(uint32_t size, uint32_t alignment, const char* name = nullptr)◆ 

Creates a new memory chunk allocated on the current function's stack.

Mem a64::Compiler::newConst(ConstPoolScope scope, const void* data, size_t size)◆ 

Put data to a constant-pool and get a memory reference to it.

Mem a64::Compiler::newByteConst(ConstPoolScope scope, uint8_t val)noexcept◆ 

Put a BYTE val to a constant-pool (8 bits).

Mem a64::Compiler::newHWordConst(ConstPoolScope scope, uint16_t val)noexcept◆ 

Put a HWORD val to a constant-pool (16 bits).

Mem a64::Compiler::newWordConst(ConstPoolScope scope, uint32_t val)noexcept◆ 

Put a WORD val to a constant-pool (32 bits).

Mem a64::Compiler::newDWordConst(ConstPoolScope scope, uint64_t val)noexcept◆ 

Put a DWORD val to a constant-pool (64 bits).

Mem a64::Compiler::newInt16Const(ConstPoolScope scope, int16_t val)noexcept◆ 

Put a WORD val to a constant-pool.

Mem a64::Compiler::newUInt16Const(ConstPoolScope scope, uint16_t val)noexcept◆ 

Put a WORD val to a constant-pool.

Mem a64::Compiler::newInt32Const(ConstPoolScope scope, int32_t val)noexcept◆ 

Put a DWORD val to a constant-pool.

Mem a64::Compiler::newUInt32Const(ConstPoolScope scope, uint32_t val)noexcept◆ 

Put a DWORD val to a constant-pool.

Mem a64::Compiler::newInt64Const(ConstPoolScope scope, int64_t val)noexcept◆ 

Put a QWORD val to a constant-pool.

Mem a64::Compiler::newUInt64Const(ConstPoolScope scope, uint64_t val)noexcept◆ 

Put a QWORD val to a constant-pool.

Mem a64::Compiler::newFloatConst(ConstPoolScope scope, float val)noexcept◆ 

Put a SP-FP val to a constant-pool.

Mem a64::Compiler::newDoubleConst(ConstPoolScope scope, double val)noexcept◆ 

Put a DP-FP val to a constant-pool.

Compiler& a64::Compiler::unfollow()noexcept◆ 

Force the compiler to not follow the conditional or unconditional jump.

Error a64::Compiler::loadAddressOf(const Gp& o0, const Mem& o1)◆ 

Special pseudo-instruction that can be used to load a memory address into o0 GP register.

Note
At the moment this instruction is only useful to load a stack allocated address into a GP register for further use. It makes very little sense to use it for anything else. The semantics of this instruction is the same as X86 LEA (load effective address) instruction.

Error a64::Compiler::invoke_(InvokeNode** out, const Operand_& target, const FuncSignature& signature)◆ 

Invoke a function call without target type enforcement.

Error a64::Compiler::invoke(InvokeNode** out, const Gp& target, const FuncSignature& signature)[1/5]◆ 

Invoke a function call of the given target and signature and store the added node to out.

Creates a new InvokeNode, initializes all the necessary members to match the given function signature, adds the node to the compiler, and stores its pointer to out. The operation is atomic, if anything fails nullptr is stored in out and error code is returned.

Error a64::Compiler::invoke(InvokeNode** out, const Mem& target, const FuncSignature& signature)[2/5]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::invoke(InvokeNode** out, const Label& target, const FuncSignature& signature)[3/5]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::invoke(InvokeNode** out, const Imm& target, const FuncSignature& signature)[4/5]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::invoke(InvokeNode** out, uint64_t target, const FuncSignature& signature)[5/5]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::ret()[1/3]◆ 

Return.

Error a64::Compiler::ret(const BaseReg& o0)[2/3]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::ret(const BaseReg& o0, const BaseReg& o1)[3/3]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Error a64::Compiler::br(const BaseReg& target, JumpAnnotation* annotation)◆ 

Adds a jump to the given target with the provided jump annotation.

Error a64::Compiler::onAttach(CodeHolder* code)overridenoexcept◆ 

Called after the emitter was attached to CodeHolder.

Reimplemented from asmjit::BaseEmitter.

Error a64::Compiler::onDetach(CodeHolder* code)overridenoexcept◆ 

Called after the emitter was detached from CodeHolder.

Reimplemented from asmjit::BaseEmitter.

Error a64::Compiler::finalize()override◆ 

Finalizes this emitter.

Materializes the content of the emitter by serializing it to the attached CodeHolder through an architecture specific BaseAssembler. This function won't do anything if the emitter inherits from BaseAssembler as assemblers emit directly to a CodeBuffer held by CodeHolder. However, if this is an emitter that inherits from BaseBuilder or BaseCompiler then these emitters need the materialization phase as they store their content in a representation not visible to CodeHolder.

Reimplemented from asmjit::BaseEmitter.