};
static const RegisterID stackPointerRegister = MIPSRegisters::sp;
+ static const RegisterID framePointerRegister = MIPSRegisters::fp;
static const RegisterID returnAddressRegister = MIPSRegisters::ra;
// Integer arithmetic operations:
}
}
+ ALWAYS_INLINE void load8(AbsoluteAddress address, RegisterID dest)
+ {
+ load8(address.m_ptr, dest);
+ }
+
+ void load8(const void* address, RegisterID dest)
+ {
+ /*
+ li addrTemp, address
+ lbu dest, 0(addrTemp)
+ */
+ move(TrustedImmPtr(address), addrTempRegister);
+ m_assembler.lbu(dest, addrTempRegister, 0);
+ }
+
void load8Signed(BaseIndex address, RegisterID dest)
{
if (address.offset >= -32768 && address.offset <= 32767
}
}
+ void store8(RegisterID src, void* address)
+ {
+ move(TrustedImmPtr(address), addrTempRegister);
+ m_assembler.sb(src, addrTempRegister, 0);
+ }
+
void store8(TrustedImm32 imm, void* address)
{
/*
return branch32(cond, dataTempRegister, immTempRegister);
}
+ Jump branch8(RelationalCondition cond, AbsoluteAddress left, TrustedImm32 right)
+ {
+ // Make sure the immediate value is unsigned 8 bits.
+ ASSERT(!(right.m_value & 0xFFFFFF00));
+ load8(left, dataTempRegister);
+ move(right, immTempRegister);
+ return branch32(cond, dataTempRegister, immTempRegister);
+ }
+
void compare8(RelationalCondition cond, Address left, TrustedImm32 right, RegisterID dest)
{
// Make sure the immediate value is unsigned 8 bits.
return branchTest32(cond, dataTempRegister, mask);
}
+ Jump branchTest8(ResultCondition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1))
+ {
+ load8(address, dataTempRegister);
+ return branchTest32(cond, dataTempRegister, mask);
+ }
+
Jump branchTest8(ResultCondition cond, Address address, TrustedImm32 mask = TrustedImm32(-1))
{
load8(address, dataTempRegister);
#endif
}
- void loadDouble(const void* address, FPRegisterID dest)
+ void loadDouble(TrustedImmPtr address, FPRegisterID dest)
{
#if WTF_MIPS_ISA(1)
/*
lwc1 dest, 0(addrTemp)
lwc1 dest+1, 4(addrTemp)
*/
- move(TrustedImmPtr(address), addrTempRegister);
+ move(address, addrTempRegister);
m_assembler.lwc1(dest, addrTempRegister, 0);
m_assembler.lwc1(FPRegisterID(dest + 1), addrTempRegister, 4);
#else
li addrTemp, address
ldc1 dest, 0(addrTemp)
*/
- move(TrustedImmPtr(address), addrTempRegister);
+ move(address, addrTempRegister);
m_assembler.ldc1(dest, addrTempRegister, 0);
#endif
}
#endif
}
- void storeDouble(FPRegisterID src, const void* address)
+ void storeDouble(FPRegisterID src, TrustedImmPtr address)
{
#if WTF_MIPS_ISA(1)
- move(TrustedImmPtr(address), addrTempRegister);
+ move(address, addrTempRegister);
m_assembler.swc1(src, addrTempRegister, 0);
m_assembler.swc1(FPRegisterID(src + 1), addrTempRegister, 4);
#else
- move(TrustedImmPtr(address), addrTempRegister);
+ move(address, addrTempRegister);
m_assembler.sdc1(src, addrTempRegister, 0);
#endif
}
void addDouble(AbsoluteAddress address, FPRegisterID dest)
{
- loadDouble(address.m_ptr, fpTempRegister);
+ loadDouble(TrustedImmPtr(address.m_ptr), fpTempRegister);
m_assembler.addd(dest, dest, fpTempRegister);
}
m_assembler.nop();
}
+ void memoryFence()
+ {
+ m_assembler.sync();
+ }
+
static FunctionPtr readCallTarget(CodeLocationCall call)
{
return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())));
return CodeLocationLabel();
}
- static void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel instructionStart, Address, void* initialValue)
+ static void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel, Address, void*)
{
UNREACHABLE_FOR_PLATFORM();
}