summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/assembler/MacroAssemblerARMv7.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-05-28 17:59:34 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-05-28 17:59:40 +0200
commit1f3c157ec6b8be5de1eb89295713c2980fb1a7aa (patch)
treeb85888d73518f6abc7bbde74ab71a27887682f9d /src/3rdparty/masm/assembler/MacroAssemblerARMv7.h
parent44ca7e31ee9365a72cd17ecd335ec4d0161420a9 (diff)
parent0f5c34f2c6b64bae3429706a6c4211334c689092 (diff)
Merge "Merge remote-tracking branch 'origin/dev' into wip/scenegraphng"wip/scenegraphng
Diffstat (limited to 'src/3rdparty/masm/assembler/MacroAssemblerARMv7.h')
-rw-r--r--src/3rdparty/masm/assembler/MacroAssemblerARMv7.h71
1 files changed, 1 insertions, 70 deletions
diff --git a/src/3rdparty/masm/assembler/MacroAssemblerARMv7.h b/src/3rdparty/masm/assembler/MacroAssemblerARMv7.h
index 99801a0e3b..6232834fde 100644
--- a/src/3rdparty/masm/assembler/MacroAssemblerARMv7.h
+++ b/src/3rdparty/masm/assembler/MacroAssemblerARMv7.h
@@ -27,7 +27,7 @@
#ifndef MacroAssemblerARMv7_h
#define MacroAssemblerARMv7_h
-#if ENABLE(ASSEMBLER) && (CPU(ARM_THUMB2) || defined(V4_BOOTSTRAP))
+#if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
#include "ARMv7Assembler.h"
#include "AbstractMacroAssembler.h"
@@ -162,41 +162,12 @@ public:
{
add32(imm, dest, dest);
}
-
-#if defined(V4_BOOTSTRAP)
- void loadPtr(ImplicitAddress address, RegisterID dest)
- {
- load32(address, dest);
- }
-
- void subPtr(TrustedImm32 imm, RegisterID dest)
- {
- sub32(imm, dest);
- }
-
- void addPtr(TrustedImm32 imm, RegisterID dest)
- {
- add32(imm, dest);
- }
-
- void addPtr(TrustedImm32 imm, RegisterID src, RegisterID dest)
- {
- add32(imm, src, dest);
- }
-
- void storePtr(RegisterID src, ImplicitAddress address)
- {
- store32(src, address);
- }
-#endif
-#if !defined(V4_BOOTSTRAP)
void add32(AbsoluteAddress src, RegisterID dest)
{
load32(src.m_ptr, dataTempRegister);
add32(dataTempRegister, dest);
}
-#endif
void add32(TrustedImm32 imm, RegisterID src, RegisterID dest)
{
@@ -237,7 +208,6 @@ public:
add32(dataTempRegister, dest);
}
-#if !defined(V4_BOOTSTRAP)
void add32(TrustedImm32 imm, AbsoluteAddress address)
{
load32(address.m_ptr, dataTempRegister);
@@ -282,7 +252,6 @@ public:
m_assembler.adc(dataTempRegister, dataTempRegister, ARMThumbImmediate::makeEncodedImm(imm.m_value >> 31));
m_assembler.str(dataTempRegister, addressTempRegister, ARMThumbImmediate::makeUInt12(4));
}
-#endif
void and32(RegisterID op1, RegisterID op2, RegisterID dest)
{
@@ -384,7 +353,6 @@ public:
or32(dataTempRegister, dest);
}
-#if !defined(V4_BOOTSTRAP)
void or32(RegisterID src, AbsoluteAddress dest)
{
move(TrustedImmPtr(dest.m_ptr), addressTempRegister);
@@ -392,7 +360,6 @@ public:
or32(src, dataTempRegister);
store32(dataTempRegister, addressTempRegister);
}
-#endif
void or32(TrustedImm32 imm, RegisterID dest)
{
@@ -504,7 +471,6 @@ public:
sub32(dataTempRegister, dest);
}
-#if !defined(V4_BOOTSTRAP)
void sub32(TrustedImm32 imm, AbsoluteAddress address)
{
load32(address.m_ptr, dataTempRegister);
@@ -521,7 +487,6 @@ public:
store32(dataTempRegister, address.m_ptr);
}
-#endif
void xor32(Address src, RegisterID dest)
{
@@ -698,13 +663,11 @@ public:
load16(setupArmAddress(address), dest);
}
-#if !defined(V4_BOOTSTRAP)
void load32(const void* address, RegisterID dest)
{
move(TrustedImmPtr(address), addressTempRegister);
m_assembler.ldr(dest, addressTempRegister, ARMThumbImmediate::makeUInt16(0));
}
-#endif
ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest)
{
@@ -809,7 +772,6 @@ public:
store32(dataTempRegister, setupArmAddress(address));
}
-#if !defined(V4_BOOTSTRAP)
void store32(RegisterID src, const void* address)
{
move(TrustedImmPtr(address), addressTempRegister);
@@ -821,7 +783,6 @@ public:
move(imm, dataTempRegister);
store32(dataTempRegister, address);
}
-#endif
void store8(RegisterID src, BaseIndex address)
{
@@ -839,7 +800,6 @@ public:
store8(dataTempRegister, address);
}
-#if !defined(V4_BOOTSTRAP)
void store8(RegisterID src, void* address)
{
move(TrustedImmPtr(address), addressTempRegister);
@@ -851,7 +811,6 @@ public:
move(imm, dataTempRegister);
store8(dataTempRegister, address);
}
-#endif
void store16(RegisterID src, BaseIndex address)
{
@@ -949,13 +908,11 @@ public:
m_assembler.vmov(dest, src);
}
-#if !defined(V4_BOOTSTRAP)
void loadDouble(const void* address, FPRegisterID dest)
{
move(TrustedImmPtr(address), addressTempRegister);
m_assembler.vldr(dest, addressTempRegister, 0);
}
-#endif
void storeDouble(FPRegisterID src, ImplicitAddress address)
{
@@ -987,13 +944,11 @@ public:
m_assembler.fsts(ARMRegisters::asSingle(src), base, offset);
}
-#if !defined(V4_BOOTSTRAP)
void storeDouble(FPRegisterID src, const void* address)
{
move(TrustedImmPtr(address), addressTempRegister);
storeDouble(src, addressTempRegister);
}
-#endif
void storeDouble(FPRegisterID src, BaseIndex address)
{
@@ -1027,13 +982,11 @@ public:
m_assembler.vadd(dest, op1, op2);
}
-#if !defined(V4_BOOTSTRAP)
void addDouble(AbsoluteAddress address, FPRegisterID dest)
{
loadDouble(address.m_ptr, fpTempRegister);
m_assembler.vadd(dest, dest, fpTempRegister);
}
-#endif
void divDouble(FPRegisterID src, FPRegisterID dest)
{
@@ -1112,7 +1065,6 @@ public:
m_assembler.vcvt_signedToFloatingPoint(dest, fpTempRegisterAsSingle());
}
-#if !defined(V4_BOOTSTRAP)
void convertInt32ToDouble(AbsoluteAddress address, FPRegisterID dest)
{
// Fixme: load directly into the fpr!
@@ -1120,7 +1072,6 @@ public:
m_assembler.vmov(fpTempRegister, dataTempRegister, dataTempRegister);
m_assembler.vcvt_signedToFloatingPoint(dest, fpTempRegisterAsSingle());
}
-#endif
void convertUInt32ToDouble(RegisterID src, FPRegisterID dest, RegisterID /*scratch*/)
{
@@ -1316,12 +1267,10 @@ public:
m_assembler.mov(dest, src);
}
-#if !defined(V4_BOOTSTRAP)
void move(TrustedImmPtr imm, RegisterID dest)
{
move(TrustedImm32(imm), dest);
}
-#endif
void swap(RegisterID reg1, RegisterID reg2)
{
@@ -1462,7 +1411,6 @@ public:
return branch32(cond, addressTempRegister, right);
}
-#if !defined(V4_BOOTSTRAP)
Jump branch32(RelationalCondition cond, AbsoluteAddress left, RegisterID right)
{
load32(left.m_ptr, dataTempRegister);
@@ -1475,7 +1423,6 @@ public:
load32(left.m_ptr, addressTempRegister);
return branch32(cond, addressTempRegister, right);
}
-#endif
Jump branch8(RelationalCondition cond, RegisterID left, TrustedImm32 right)
{
@@ -1532,7 +1479,6 @@ public:
return branchTest32(cond, addressTempRegister, mask);
}
-#if !defined(V4_BOOTSTRAP)
Jump branchTest8(ResultCondition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1))
{
// use addressTempRegister incase the branchTest8 we call uses dataTempRegister. :-/
@@ -1540,7 +1486,6 @@ public:
load8(Address(addressTempRegister), addressTempRegister);
return branchTest32(cond, addressTempRegister, mask);
}
-#endif
void jump(RegisterID target)
{
@@ -1554,14 +1499,12 @@ public:
m_assembler.bx(dataTempRegister);
}
-#if !defined(V4_BOOTSTRAP)
void jump(AbsoluteAddress address)
{
move(TrustedImmPtr(address.m_ptr), dataTempRegister);
load32(Address(dataTempRegister), dataTempRegister);
m_assembler.bx(dataTempRegister);
}
-#endif
// Arithmetic control flow operations:
@@ -1602,7 +1545,6 @@ public:
return branchAdd32(cond, dest, imm, dest);
}
-#if !defined(V4_BOOTSTRAP)
Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest)
{
// Move the high bits of the address into addressTempRegister,
@@ -1628,7 +1570,6 @@ public:
return Jump(makeBranch(cond));
}
-#endif
Jump branchMul32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest)
{
@@ -1799,7 +1740,6 @@ public:
return DataLabel32(this);
}
-#if !defined(V4_BOOTSTRAP)
ALWAYS_INLINE DataLabelPtr moveWithPatch(TrustedImmPtr imm, RegisterID dst)
{
padBeforePatch();
@@ -1827,7 +1767,6 @@ public:
m_makeJumpPatchable = false;
return PatchableJump(result);
}
-#endif
PatchableJump patchableBranchTest32(ResultCondition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1))
{
@@ -1845,7 +1784,6 @@ public:
return PatchableJump(result);
}
-#if !defined(V4_BOOTSTRAP)
PatchableJump patchableBranchPtrWithPatch(RelationalCondition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0))
{
m_makeJumpPatchable = true;
@@ -1853,7 +1791,6 @@ public:
m_makeJumpPatchable = false;
return PatchableJump(result);
}
-#endif
PatchableJump patchableJump()
{
@@ -1864,7 +1801,6 @@ public:
return PatchableJump(result);
}
-#if !defined(V4_BOOTSTRAP)
ALWAYS_INLINE DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address)
{
DataLabelPtr label = moveWithPatch(initialValue, dataTempRegister);
@@ -1872,7 +1808,6 @@ public:
return label;
}
ALWAYS_INLINE DataLabelPtr storePtrWithPatch(ImplicitAddress address) { return storePtrWithPatch(TrustedImmPtr(0), address); }
-#endif
ALWAYS_INLINE Call tailRecursiveCall()
{
@@ -1893,7 +1828,6 @@ public:
return m_assembler.executableOffsetFor(location);
}
-#if !defined(V4_BOOTSTRAP)
static FunctionPtr readCallTarget(CodeLocationCall call)
{
return FunctionPtr(reinterpret_cast<void(*)()>(ARMv7Assembler::readCallTarget(call.dataLocation())));
@@ -1906,7 +1840,6 @@ public:
const unsigned twoWordOpSize = 4;
return label.labelAtOffset(-twoWordOpSize * 2);
}
-#endif
static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID rd, void* initialValue)
{
@@ -2024,7 +1957,6 @@ private:
template <typename, template <typename> class> friend class LinkBufferBase;
friend class RepatchBuffer;
-#if !defined(V4_BOOTSTRAP)
static void linkCall(void* code, Call call, FunctionPtr function)
{
ARMv7Assembler::linkCall(code, call.m_label, function.value());
@@ -2039,7 +1971,6 @@ private:
{
ARMv7Assembler::relinkCall(call.dataLocation(), destination.executableAddress());
}
-#endif
bool m_makeJumpPatchable;
};