aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-01-20 10:43:55 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-01-31 17:09:02 +0000
commit4eca12e9f5b6e6b09d89cd4438e8557c5b66dbd1 (patch)
treeb9670bbfe9e682098376f8d0f63b6ab47dac9766 /src/3rdparty/masm/assembler/AbstractMacroAssembler.h
parent64f21fc7825404ab12d08f233114f2895dea58d8 (diff)
Remove branch compaction #ifdef
Since the #ifdef for ARMv7 and ARM64 makes it impossible to cross compile, we need to replace it with a template specialization of LinkBuffer. The "old" LinkBuffer becomes LinkBufferBase, then there's a generic LinkBuffer that's a sub-class of LinkBufferBase. Then there's a BranchCompactingLinkBuffer template that implements the compaction and two ARMv7 and ARM64 specializations of LinkBuffer<T> end up being sub-classes of BranchCompactingLinkBuffer instead of LinkBufferBase. Change-Id: Ib62fe24aa6c3570dfa311edc39fde6fb5975f3cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty/masm/assembler/AbstractMacroAssembler.h')
-rw-r--r--src/3rdparty/masm/assembler/AbstractMacroAssembler.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/3rdparty/masm/assembler/AbstractMacroAssembler.h b/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
index ea91a99b08..a9035efed7 100644
--- a/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
+++ b/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
@@ -47,8 +47,10 @@
namespace JSC {
class JumpReplacementWatchpoint;
+template <typename, template <typename> class>
+class LinkBufferBase;
template <typename>
-class LinkBuffer;
+class BranchCompactingLinkBuffer;
class RepatchBuffer;
class Watchpoint;
namespace DFG {
@@ -326,7 +328,7 @@ public:
friend class Jump;
friend class JumpReplacementWatchpoint;
friend class MacroAssemblerCodeRef;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
friend class Watchpoint;
public:
@@ -357,7 +359,7 @@ public:
class ConvertibleLoadLabel {
template<class TemplateAssemblerType>
friend class AbstractMacroAssembler;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
ConvertibleLoadLabel()
@@ -381,7 +383,7 @@ public:
class DataLabelPtr {
template<class TemplateAssemblerType>
friend class AbstractMacroAssembler;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
DataLabelPtr()
{
@@ -405,7 +407,7 @@ public:
class DataLabel32 {
template<class TemplateAssemblerType>
friend class AbstractMacroAssembler;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
DataLabel32()
{
@@ -429,7 +431,7 @@ public:
class DataLabelCompact {
template<class TemplateAssemblerType>
friend class AbstractMacroAssembler;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
DataLabelCompact()
{
@@ -504,7 +506,7 @@ public:
friend class AbstractMacroAssembler;
friend class Call;
friend struct DFG::OSRExit;
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
Jump()
{
@@ -646,7 +648,7 @@ public:
// A JumpList is a set of Jump objects.
// All jumps in the set will be linked to the same destination.
class JumpList {
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
public:
typedef Vector<Jump, 2> JumpVector;
@@ -820,7 +822,8 @@ protected:
static bool shouldBlindForSpecificArch(uint64_t) { return true; }
#endif
- template <typename> friend class LinkBuffer;
+ template <typename, template <typename> class> friend class LinkBufferBase;
+ template <typename> friend class BranchCompactingLinkBuffer;
friend class RepatchBuffer;
static void linkJump(void* code, Jump jump, CodeLocationLabel target)