Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: src/mips/assembler-mips.h

Issue 922043005: MIPS: Fix 'Assembler support for internal references.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/assembler.h ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/assembler-mips.h
diff --git a/src/mips/assembler-mips.h b/src/mips/assembler-mips.h
index 1779e0b02a12f97530cdd1a4aea4bb913b790e38..9772a66a08cd1a7837395e77162b82d1256191fb 100644
--- a/src/mips/assembler-mips.h
+++ b/src/mips/assembler-mips.h
@@ -38,6 +38,8 @@
#include <stdio.h>
+#include <tr1/unordered_set>
+
#include "src/assembler.h"
#include "src/mips/constants-mips.h"
#include "src/serialize.h"
@@ -1021,7 +1023,8 @@ class Assembler : public AssemblerBase {
void RecordDeoptReason(const int reason, const int raw_position);
- static int RelocateInternalReference(byte* pc, intptr_t pc_delta);
+ static int RelocateInternalReference(RelocInfo::Mode rmode, byte* pc,
+ intptr_t pc_delta);
// Writes a single byte or word of data in the code stream. Used for
// inline tables, e.g., jump-tables.
@@ -1126,10 +1129,10 @@ class Assembler : public AssemblerBase {
int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; }
// Decode branch instruction at pos and return branch target pos.
- int target_at(int32_t pos);
+ int target_at(int32_t pos, bool is_internal);
// Patch branch instruction at pos to branch to given branch target pos.
- void target_at_put(int32_t pos, int32_t target_pos);
+ void target_at_put(int32_t pos, int32_t target_pos, bool is_internal);
// Say if we need to relocate with this mode.
bool MustUseReg(RelocInfo::Mode rmode);
@@ -1298,7 +1301,7 @@ class Assembler : public AssemblerBase {
// Labels.
void print(Label* L);
void bind_to(Label* L, int pos);
- void next(Label* L);
+ void next(Label* L, bool is_internal);
// One trampoline consists of:
// - space for trampoline slots,
@@ -1363,6 +1366,10 @@ class Assembler : public AssemblerBase {
static const int kMaxBranchOffset = (1 << (18 - 1)) - 1;
static const int kInvalidSlotPos = -1;
+ // Internal reference positions, required for unbounded internal reference
+ // labels.
+ std::tr1::unordered_set<int> internal_reference_positions_;
+
Trampoline trampoline_;
bool internal_trampoline_exception_;
« no previous file with comments | « src/assembler.h ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698