summaryrefslogtreecommitdiff
path: root/deps/v8/src/mips/assembler-mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/mips/assembler-mips.h')
-rw-r--r--deps/v8/src/mips/assembler-mips.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/deps/v8/src/mips/assembler-mips.h b/deps/v8/src/mips/assembler-mips.h
index 61043eff64..7df318b9ab 100644
--- a/deps/v8/src/mips/assembler-mips.h
+++ b/deps/v8/src/mips/assembler-mips.h
@@ -356,6 +356,9 @@ constexpr DoubleRegister kLithiumScratchDouble = f30;
constexpr DoubleRegister kDoubleRegZero = f28;
// Used on mips32r6 for compare operations.
constexpr DoubleRegister kDoubleCompareReg = f26;
+// MSA zero and scratch regs must have the same numbers as FPU zero and scratch
+constexpr Simd128Register kSimd128RegZero = w28;
+constexpr Simd128Register kSimd128ScratchReg = w30;
// FPU (coprocessor 1) control registers.
// Currently only FCSR (#31) is implemented.
@@ -436,6 +439,8 @@ class Operand BASE_EMBEDDED {
Register rm() const { return rm_; }
+ RelocInfo::Mode rmode() const { return rmode_; }
+
private:
Register rm_;
int32_t imm32_; // Valid if rm_ == no_reg.
@@ -591,10 +596,19 @@ class Assembler : public AssemblerBase {
inline static void deserialization_set_special_target_at(
Isolate* isolate, Address instruction_payload, Code* code,
Address target) {
- set_target_address_at(
- isolate,
- instruction_payload - kInstructionsFor32BitConstant * kInstrSize, code,
- target);
+ if (IsMipsArchVariant(kMips32r6)) {
+ // On R6 the address location is shifted by one instruction
+ set_target_address_at(
+ isolate,
+ instruction_payload -
+ (kInstructionsFor32BitConstant - 1) * kInstrSize,
+ code, target);
+ } else {
+ set_target_address_at(
+ isolate,
+ instruction_payload - kInstructionsFor32BitConstant * kInstrSize,
+ code, target);
+ }
}
// This sets the internal reference at the pc.
@@ -625,7 +639,7 @@ class Assembler : public AssemblerBase {
// Distance between the instruction referring to the address of the call
// target and the return address.
#ifdef _MIPS_ARCH_MIPS32R6
- static constexpr int kCallTargetAddressOffset = 3 * kInstrSize;
+ static constexpr int kCallTargetAddressOffset = 2 * kInstrSize;
#else
static constexpr int kCallTargetAddressOffset = 4 * kInstrSize;
#endif
@@ -1913,6 +1927,9 @@ class Assembler : public AssemblerBase {
inline void CheckBuffer();
private:
+ // Avoid overflows for displacements etc.
+ static const int kMaximalBufferSize = 512 * MB;
+
inline static void set_target_internal_reference_encoded_at(Address pc,
Address target);