Commit a1892ff9 authored by Miran.Karic's avatar Miran.Karic Committed by Commit Bot

MIPS[64]: Fix mips port.

The CL fixes the mips port in the CL [debug] introduced runtime side
effect check (7a2c3713), that caused
several test failures.

BUG=

Change-Id: Ia1b45fd57d7b77c912562c97f7fc6bf2aa378fe2
Reviewed-on: https://chromium-review.googlesource.com/1030193Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Miran Karić <miran.karic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52982}
parent 4c972d66
......@@ -10,6 +10,7 @@
#include "src/deoptimizer.h"
#include "src/frame-constants.h"
#include "src/frames.h"
#include "src/mips/constants-mips.h"
#include "src/objects-inl.h"
#include "src/runtime/runtime.h"
......@@ -1048,7 +1049,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ExternalReference debug_execution_mode =
ExternalReference::debug_execution_mode_address(masm->isolate());
__ li(t0, Operand(debug_execution_mode));
__ lb(t0, MemOperand(t0));
__ lb(t0, MemOperand(t0, kLeastSignificantByteInInt32Offset));
STATIC_ASSERT(static_cast<int>(DebugInfo::kDebugExecutionMode) ==
static_cast<int>(DebugInfo::kSideEffects));
__ Branch(&bytecode_array_loaded, eq, t0, Operand(t1));
......
......@@ -10,6 +10,7 @@
#include "src/deoptimizer.h"
#include "src/frame-constants.h"
#include "src/frames.h"
#include "src/mips64/constants-mips64.h"
#include "src/objects-inl.h"
#include "src/runtime/runtime.h"
......@@ -1046,7 +1047,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ExternalReference debug_execution_mode =
ExternalReference::debug_execution_mode_address(masm->isolate());
__ li(a4, Operand(debug_execution_mode));
__ Lb(a4, MemOperand(a4));
__ Lb(a4, MemOperand(a4, kLeastSignificantByteInInt32Offset));
STATIC_ASSERT(static_cast<int>(DebugInfo::kDebugExecutionMode) ==
static_cast<int>(DebugInfo::kSideEffects));
__ Branch(&bytecode_array_loaded, eq, a4, Operand(a5));
......
......@@ -122,6 +122,14 @@ const uint32_t kMipsSwlOffset = 0;
#error Unknown endianness
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 0;
#elif defined(V8_TARGET_BIG_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 3;
#else
#error Unknown endianness
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
......
......@@ -82,6 +82,14 @@ const uint32_t kMipsSdlOffset = 0;
#error Unknown endianness
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 0;
#elif defined(V8_TARGET_BIG_ENDIAN)
const uint32_t kLeastSignificantByteInInt32Offset = 3;
#else
#error Unknown endianness
#endif
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment