From 6aaf6abb692dbdc0f0400ab5c76c438034957d55 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 13 Jan 2017 16:45:54 +0100 Subject: Include the ARMv7 assembler in the qmldevtools bootstrap build Even when the C++ target is not ARMv7 we want to include it in order to be able to generate QML cache files with code ahead of time. This requires a few changes: * The Jump classes need to move from the AbstractMacroAssembler super-class into the concrete assembler sub-class, in order to use it in specializations. * Some of the template specializations in LinkBuffer for example or for platform dependent operations need to be pre-processor enabled when bootstrapping * The generic loadPtr/addPtr etc. functions need to move to the concrete assemblers to be able to call the correct 32-bit or 64-bit variations. * We need to force what looks like a loss of precision to the compiler in the 32-bit ARMv7 linking code when linking jumps. Finally then we can explicitly instantiate at least QV4::JIT::Assembler for ARMv7 when bootstrapping. Currently only on x86-64 hosts, but that is a temporary limitation. Change-Id: I501db2360e1fded48f17f17d9e87252d47f8537e Reviewed-by: Simon Hausmann --- src/3rdparty/masm/stubs/ExecutableAllocator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/3rdparty/masm/stubs') diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h index 8617229b06..9a2a9773b5 100644 --- a/src/3rdparty/masm/stubs/ExecutableAllocator.h +++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h @@ -61,7 +61,7 @@ namespace JSC { class JSGlobalData; struct ExecutableMemoryHandle : public RefCounted { - ExecutableMemoryHandle(QV4::ExecutableAllocator *allocator, int size) + ExecutableMemoryHandle(QV4::ExecutableAllocator *allocator, size_t size) : m_allocator(allocator) , m_size(size) { @@ -79,14 +79,14 @@ struct ExecutableMemoryHandle : public RefCounted { inline bool isManaged() const { return true; } void* start() { return m_allocation->start(); } - int sizeInBytes() { return m_size; } + size_t sizeInBytes() { return m_size; } QV4::ExecutableAllocator::ChunkOfPages *chunk() const { return m_allocator->chunkForAllocation(m_allocation); } QV4::ExecutableAllocator *m_allocator; QV4::ExecutableAllocator::Allocation *m_allocation; - int m_size; + size_t m_size; }; struct ExecutableAllocator { @@ -94,7 +94,7 @@ struct ExecutableAllocator { : realAllocator(alloc) {} - PassRefPtr allocate(JSGlobalData&, int size, void*, int) + PassRefPtr allocate(JSGlobalData&, size_t size, void*, int) { return adoptRef(new ExecutableMemoryHandle(realAllocator, size)); } -- cgit v1.2.3