deps: reapply patches to vixl

This commit is contained in:
scribam 2023-05-11 10:24:14 +02:00 committed by flyinghead
parent daf8230cca
commit f9da57d87f
6 changed files with 30 additions and 4 deletions

View File

@ -58,7 +58,7 @@ void Assembler::bind(Label* label) {
void Assembler::BindToOffset(Label* label, ptrdiff_t offset) {
VIXL_ASSERT((offset >= 0) && (offset <= GetBuffer()->GetCursorOffset()));
// VIXL_ASSERT((offset >= 0) && (offset <= GetBuffer()->GetCursorOffset())); // hack to have negative offsets
VIXL_ASSERT(offset % kInstructionSize == 0);
label->Bind(offset);

View File

@ -49,7 +49,7 @@ class Label {
VIXL_ASSERT(!IsLinked());
}
bool IsBound() const { return location_ >= 0; }
bool IsBound() const { return location_ != kLocationUnbound; }
bool IsLinked() const { return !links_.empty(); }
ptrdiff_t GetLocation() const { return location_; }

View File

@ -2698,6 +2698,7 @@ void MacroAssembler::PrintfNoPreserve(const char* format,
}
dc32(arg_pattern_list); // kPrintfArgPatternListOffset
} else {
#undef printf
Register tmp = temps.AcquireX();
Mov(tmp, reinterpret_cast<uintptr_t>(printf));
Blr(tmp);

View File

@ -75,7 +75,7 @@ class CodeBuffer {
template <typename T>
T GetOffsetAddress(ptrdiff_t offset) const {
VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t));
VIXL_ASSERT((offset >= 0) && (offset <= (cursor_ - buffer_)));
//VIXL_ASSERT((offset >= 0) && (offset <= (cursor_ - buffer_))); // hack to have negative offsets
return reinterpret_cast<T>(buffer_ + offset);
}

View File

@ -89,7 +89,7 @@ class CodeBufferCheckScope {
VIXL_ASSERT(!initialised_);
VIXL_ASSERT(assembler != NULL);
assembler_ = assembler;
if (check_policy == kReserveBufferSpace) {
if (check_policy == kReserveBufferSpace && assembler->GetBuffer()->IsManaged()) {
assembler->GetBuffer()->EnsureSpaceFor(size);
}
#ifdef VIXL_DEBUG

View File

@ -32,6 +32,31 @@ extern "C" {
#include <signal.h>
}
#define VIXL_INCLUDE_TARGET_A32
#define VIXL_CODE_BUFFER_MALLOC
//#define VIXL_DEBUG
#if defined(__ANDROID__) && defined(VIXL_DEBUG)
#include <android/log.h>
#ifdef printf
#undef printf
#endif
#ifdef puts
#undef puts
#endif
#define LOG_TAG "flycast"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
#define puts LOGI
#define printf LOGI
#define putinf LOGI
#endif
namespace vixl {
inline void HostBreakpoint() { raise(SIGINT); }
} // namespace vixl