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

Unified Diff: src/assembler.h

Issue 986553005: Contribution of PowerPC port (continuation of 422063005) - serialize.cc cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index b6351fae44d20f71c02b20804d4b760a28421326..1fa9beecc485b983d7d476f4bca2c9f15df042d8 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -379,10 +379,10 @@ class RelocInfo {
EXTERNAL_REFERENCE, // The address of an external C++ function.
INTERNAL_REFERENCE, // An address inside the same function.
- // Marks constant and veneer pools. Only used on ARM and ARM64.
+ // ARCH1/ARCH2 use is architecture dependent.
// They use a custom noncompact encoding.
- CONST_POOL,
- VENEER_POOL,
+ ARCH1,
+ ARCH2,
DEOPT_REASON, // Deoptimization reason index.
@@ -394,12 +394,17 @@ class RelocInfo {
CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by
// code aging.
- // Encoded internal reference, used only on MIPS and MIPS64.
- // Re-uses previous ARM-only encoding, to fit in RealRelocMode space.
- INTERNAL_REFERENCE_ENCODED = CONST_POOL,
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
+ // Marks constant and veneer pools. Only used on ARM and ARM64.
+ CONST_POOL = ARCH1,
Yang 2015/03/09 08:03:56 I strongly object using same enum values for entir
+ VENEER_POOL = ARCH2,
+#elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+ // Encoded internal reference, used only on PPC, MIPS and MIPS64.
+ INTERNAL_REFERENCE_ENCODED = ARCH1,
+#endif
FIRST_REAL_RELOC_MODE = CODE_TARGET,
- LAST_REAL_RELOC_MODE = VENEER_POOL,
+ LAST_REAL_RELOC_MODE = ARCH2,
FIRST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE,
LAST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE,
LAST_CODE_ENUM = DEBUG_BREAK,
@@ -450,10 +455,18 @@ class RelocInfo {
return mode == COMMENT;
}
static inline bool IsConstPool(Mode mode) {
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
return mode == CONST_POOL;
+#else
+ return false;
+#endif
}
static inline bool IsVeneerPool(Mode mode) {
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
return mode == VENEER_POOL;
+#else
+ return false;
+#endif
}
static inline bool IsDeoptReason(Mode mode) {
return mode == DEOPT_REASON;
@@ -471,7 +484,11 @@ class RelocInfo {
return mode == INTERNAL_REFERENCE;
}
static inline bool IsInternalReferenceEncoded(Mode mode) {
+#if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
return mode == INTERNAL_REFERENCE_ENCODED;
+#else
+ return false;
+#endif
}
static inline bool IsDebugBreakSlot(Mode mode) {
return mode == DEBUG_BREAK_SLOT;
@@ -583,9 +600,11 @@ class RelocInfo {
INLINE(Address target_external_reference());
// Read/modify the reference in the instruction this relocation
- // applies to; can only be called if rmode_ is INTERNAL_REFERENCE.
+ // applies to; can only be called if rmode_ is in kInternalReferenceMask.
INLINE(Address target_internal_reference());
- INLINE(void set_target_internal_reference(Address target));
+ INLINE(void set_target_internal_reference(
+ Address target,
+ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED));
// Read/modify the address of a call instruction. This is used to relocate
// the break points where straight-line code is patched with a call
@@ -634,6 +653,7 @@ class RelocInfo {
static const int kDataMask =
(1 << CODE_TARGET_WITH_ID) | kPositionMask | (1 << COMMENT);
static const int kApplyMask; // Modes affected by apply. Depends on arch.
+ static const int kInternalReferenceMask;
private:
// On ARM, note that pc_ is the address of the constant pool entry
@@ -705,7 +725,7 @@ class RelocInfoWriter BASE_EMBEDDED {
inline void WriteTaggedPC(uint32_t pc_delta, int tag);
inline void WriteExtraTaggedPC(uint32_t pc_delta, int extra_tag);
inline void WriteExtraTaggedIntData(int data_delta, int top_tag);
- inline void WriteExtraTaggedPoolData(int data, int pool_type);
+ inline void WriteExtraTaggedArchData(int data, int pool_type);
inline void WriteExtraTaggedData(intptr_t data_delta, int top_tag);
inline void WriteTaggedData(intptr_t data_delta, int tag);
inline void WriteExtraTag(int extra_tag, int top_tag);
@@ -764,7 +784,7 @@ class RelocIterator: public Malloced {
void ReadTaggedPC();
void AdvanceReadPC();
void AdvanceReadId();
- void AdvanceReadPoolData();
+ void AdvanceReadArchData();
void AdvanceReadPosition();
void AdvanceReadData();
void AdvanceReadVariableLengthPCJump();
@@ -813,6 +833,7 @@ class ExternalReference BASE_EMBEDDED {
// Object* f(v8::internal::Arguments).
BUILTIN_CALL, // default
+
// Builtin that takes float arguments and returns an int.
// int f(double, double).
BUILTIN_COMPARE_CALL,
« no previous file with comments | « src/arm64/assembler-arm64-inl.h ('k') | src/assembler.cc » ('j') | src/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698