mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 04:54:36 +03:00
Minor changes, fixed a very rare X86Compiler bug in liveness analysis
This commit is contained in:
@@ -145,7 +145,7 @@ AsmJit is designed to be easy embeddable in any project. However, it depends on
|
||||
### Build Type:
|
||||
|
||||
* **ASMJIT_DEBUG** - Define to always turn debugging on (regardless of compile-time options detected).
|
||||
* **ASMJIT_RELEASE** - Define to always turn debugging off (regardless of compiler-time options detected).
|
||||
* **ASMJIT_RELEASE** - Define to always turn debugging off (regardless of compile-time options detected).
|
||||
|
||||
By default none of these is defined, AsmJit detects build-type based on compile-time macros and supports most IDE and compiler settings out of box.
|
||||
|
||||
@@ -154,7 +154,7 @@ By default none of these is defined, AsmJit detects build-type based on compile-
|
||||
* **ASMJIT_EMBED** - Define to embed AsmJit in another project. Embedding means that neither shared nor static library is created and AsmJit's source files and source files of the product that embeds AsmJit are part of the same target. This way of building AsmJit has certain advantages that are beyond this manual. **ASMJIT_EMBED** behaves similarly to **ASMJIT_STATIC** (no API exports).
|
||||
* **ASMJIT_STATIC** - Define to build AsmJit as a static library. No symbols are exported in such case.
|
||||
|
||||
By default AsmJit build is configured to be built as a shared library, thus note of **ASMJIT_EMBED** and **ASMJIT_STATIC** is defined.
|
||||
By default AsmJit build is configured to be built as a shared library, thus none of **ASMJIT_EMBED** and **ASMJIT_STATIC** is defined.
|
||||
|
||||
### Build Backends:
|
||||
|
||||
@@ -170,7 +170,7 @@ If none of **ASMJIT_BUILD_...** is defined AsmJit bails to **ASMJIT_BUILD_HOST**
|
||||
* **ASMJIT_DISABLE_COMPILER** - Disables **CodeCompiler** emitter. For users that use **CodeBuilder**, but not **CodeCompiler**
|
||||
* **ASMJIT_DISABLE_LOGGING** - Disables logging (**Logger** and all classes that inherit it) and formatting features.
|
||||
* **ASMJIT_DISABLE_TEXT** - Disables everything that uses text-representation and that causes certain strings to be stored in the resulting binary. For example when this flag is enabled all instruction and error names (and related APIs) will not be available. This flag has to be disabled together with **ASMJIT_DISABLE_LOGGING**. This option is suitable for deployment builds or builds that don't want to reveal the use of AsmJit.
|
||||
* **ASMJIT_DISABLE_VALIDATION** - Disables instruction validation. Saves around 5kB of space when used.
|
||||
* **ASMJIT_DISABLE_VALIDATION** - Disables instruction validation feature. Saves around 5kB of space when used.
|
||||
|
||||
NOTE: Please don't disable any features if you plan to build AsmJit as a shared library that will be used by multiple projects that you don't control (for example asmjit in a Linux distribution). The possibility to disable certain features exists mainly for static builds of AsmJit.
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ CBSentinel* CodeCompiler::endFunc() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Add the local constant pool at the end of the function (if exist).
|
||||
// Add the local constant pool at the end of the function (if exists).
|
||||
setCursor(func->getExitNode());
|
||||
|
||||
if (_localConstPool) {
|
||||
|
||||
@@ -92,11 +92,7 @@ CodeHolder::CodeHolder() noexcept
|
||||
_trampolinesSize(0),
|
||||
_baseZone(16384 - Zone::kZoneOverhead),
|
||||
_dataZone(16384 - Zone::kZoneOverhead),
|
||||
_baseHeap(&_baseZone),
|
||||
_labels(),
|
||||
_sections(),
|
||||
_relocations() {
|
||||
}
|
||||
_baseHeap(&_baseZone) {}
|
||||
|
||||
CodeHolder::~CodeHolder() noexcept {
|
||||
CodeHolder_resetInternal(this, true);
|
||||
@@ -562,9 +558,7 @@ size_t CodeHolder::relocate(void* _dst, uint64_t baseAddress) const noexcept {
|
||||
SectionEntry* section = _sections[0];
|
||||
ASMJIT_ASSERT(section != nullptr);
|
||||
|
||||
uint32_t archType = getArchType();
|
||||
uint8_t* dst = static_cast<uint8_t*>(_dst);
|
||||
|
||||
if (baseAddress == Globals::kNoBaseAddress)
|
||||
baseAddress = static_cast<uint64_t>((uintptr_t)dst);
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@ struct RelocEntry {
|
||||
//! NOTE: CodeHolder has ability to attach an \ref ErrorHandler, however, this
|
||||
//! error handler is not triggered by CodeHolder itself, it's only used by the
|
||||
//! attached code generators.
|
||||
class ASMJIT_VIRTAPI CodeHolder {
|
||||
class CodeHolder {
|
||||
public:
|
||||
ASMJIT_NONCOPYABLE(CodeHolder)
|
||||
|
||||
|
||||
@@ -4934,9 +4934,7 @@ struct X86EmitterImplicitT : public X86EmitterExplicitT<This> {
|
||||
// [MONITOR|MWAIT]
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//! Setup monitor address [IMPLICIT] (MONITOR|MWAIT).
|
||||
ASMJIT_INST_0x(monitor, Monitor)
|
||||
//! Monitor wait [IMPLICIT] (MONITOR|MWAIT).
|
||||
ASMJIT_INST_0x(mwait, Mwait)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -1749,7 +1749,7 @@ _NextGroup:
|
||||
// We also advance our node pointer to the target node to simulate
|
||||
// natural flow of the function.
|
||||
if (jNode->isJmp()) {
|
||||
if (!next->hasPassData())
|
||||
if (next && !next->hasPassData())
|
||||
ASMJIT_PROPAGATE(addUnreachableNode(next));
|
||||
|
||||
// Jump not followed.
|
||||
|
||||
Reference in New Issue
Block a user