Fixed some compile-time warnings

This commit is contained in:
kobalicek
2020-04-14 22:37:16 +02:00
parent bbc31a91ea
commit d241dfb364
3 changed files with 13 additions and 4 deletions

View File

@@ -462,7 +462,10 @@ public:
//! \name Overloaded Operators //! \name Overloaded Operators
//! \{ //! \{
inline RALiveSpan& operator=(const RALiveSpan& other) = default; inline RALiveSpan& operator=(const RALiveSpan& other) {
init(other);
return *this;
}
//! \} //! \}
}; };

View File

@@ -831,6 +831,9 @@ Error RALocalAllocator::spillAfterAllocation(InstNode* node) noexcept {
} }
Error RALocalAllocator::allocBranch(InstNode* node, RABlock* target, RABlock* cont) noexcept { Error RALocalAllocator::allocBranch(InstNode* node, RABlock* target, RABlock* cont) noexcept {
// TODO: This should be used to make the branch allocation better.
ASMJIT_UNUSED(cont);
// The cursor must point to the previous instruction for a possible instruction insertion. // The cursor must point to the previous instruction for a possible instruction insertion.
_cc->_setCursor(node->prev()); _cc->_setCursor(node->prev());

View File

@@ -15,6 +15,9 @@
#include "../core/type.h" #include "../core/type.h"
#include "../x86/x86internal_p.h" #include "../x86/x86internal_p.h"
// Can be used for debugging...
// #define ASMJIT_DUMP_ARGS_ASSIGNMENT
ASMJIT_BEGIN_SUB_NAMESPACE(x86) ASMJIT_BEGIN_SUB_NAMESPACE(x86)
// ============================================================================ // ============================================================================
@@ -1319,7 +1322,7 @@ ASMJIT_FAVOR_SIZE Error X86Internal::emitEpilog(Emitter* emitter, const FuncFram
// [asmjit::X86Internal - Emit Arguments Assignment] // [asmjit::X86Internal - Emit Arguments Assignment]
// ============================================================================ // ============================================================================
#ifndef ASMJIT_NO_LOGGING #ifdef ASMJIT_DUMP_ARGS_ASSIGNMENT
static void dumpFuncValue(String& sb, uint32_t archId, const FuncValue& value) noexcept { static void dumpFuncValue(String& sb, uint32_t archId, const FuncValue& value) noexcept {
Logging::formatTypeId(sb, value.typeId()); Logging::formatTypeId(sb, value.typeId());
sb.appendChar('@'); sb.appendChar('@');
@@ -1372,13 +1375,13 @@ ASMJIT_FAVOR_SIZE Error X86Internal::emitArgsAssignment(Emitter* emitter, const
X86FuncArgsContext ctx; X86FuncArgsContext ctx;
ASMJIT_PROPAGATE(ctx.initWorkData(frame, args)); ASMJIT_PROPAGATE(ctx.initWorkData(frame, args));
/* #ifdef ASMJIT_DUMP_ARGS_ASSIGNMENT
{ {
String sb; String sb;
dumpAssignment(sb, ctx); dumpAssignment(sb, ctx);
printf("%s\n", sb.data()); printf("%s\n", sb.data());
} }
*/ #endif
uint32_t archId = ctx.archId(); uint32_t archId = ctx.archId();
uint32_t varCount = ctx._varCount; uint32_t varCount = ctx._varCount;