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

Unified Diff: src/ppc/assembler-ppc-inl.h

Issue 965823002: Contribution of PowerPC port (continuation of 422063005) - currency (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/ppc/assembler-ppc.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/assembler-ppc-inl.h
diff --git a/src/ppc/assembler-ppc-inl.h b/src/ppc/assembler-ppc-inl.h
index 3665aff5660ad04a53e89619586924d16838e263..7ae89883400dad51b56bfdc14322bf1a610f8db0 100644
--- a/src/ppc/assembler-ppc-inl.h
+++ b/src/ppc/assembler-ppc-inl.h
@@ -69,14 +69,6 @@ Address RelocInfo::target_address_address() {
DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) ||
rmode_ == EMBEDDED_OBJECT || rmode_ == EXTERNAL_REFERENCE);
-#if V8_OOL_CONSTANT_POOL
- if (Assembler::IsConstantPoolLoadStart(pc_)) {
- // We return the PC for ool constant pool since this function is used by the
- // serializerer and expects the address to reside within the code object.
- return reinterpret_cast<Address>(pc_);
- }
-#endif
-
// Read the address of the word containing the target_address in an
// instruction stream.
// The only architecture-independent user of this function is the serializer.
@@ -91,13 +83,8 @@ Address RelocInfo::target_address_address() {
Address RelocInfo::constant_pool_entry_address() {
-#if V8_OOL_CONSTANT_POOL
- return Assembler::target_constant_pool_address_at(pc_,
- host_->constant_pool());
-#else
UNREACHABLE();
return NULL;
-#endif
}
@@ -131,22 +118,12 @@ Address Assembler::target_address_from_return_address(Address pc) {
// mtlr ip
// blrl
// @ return address
-#if V8_OOL_CONSTANT_POOL
- if (IsConstantPoolLoadEnd(pc - 3 * kInstrSize)) {
- return pc - (kMovInstructionsConstantPool + 2) * kInstrSize;
- }
-#endif
- return pc - (kMovInstructionsNoConstantPool + 2) * kInstrSize;
+ return pc - (kMovInstructions + 2) * kInstrSize;
}
Address Assembler::return_address_from_call_start(Address pc) {
-#if V8_OOL_CONSTANT_POOL
- Address load_address = pc + (kMovInstructionsConstantPool - 1) * kInstrSize;
- if (IsConstantPoolLoadEnd(load_address))
- return pc + (kMovInstructionsConstantPool + 2) * kInstrSize;
-#endif
- return pc + (kMovInstructionsNoConstantPool + 2) * kInstrSize;
+ return pc + (kMovInstructions + 2) * kInstrSize;
}
@@ -224,13 +201,8 @@ void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode write_barrier_mode,
}
-#if V8_OOL_CONSTANT_POOL
-static const int kNoCodeAgeInstructions = 7;
-#else
static const int kNoCodeAgeInstructions = 6;
-#endif
-static const int kCodeAgingInstructions =
- Assembler::kMovInstructionsNoConstantPool + 3;
+static const int kCodeAgingInstructions = Assembler::kMovInstructions + 3;
static const int kNoCodeAgeSequenceInstructions =
((kNoCodeAgeInstructions >= kCodeAgingInstructions)
? kNoCodeAgeInstructions
@@ -456,61 +428,12 @@ Address Assembler::target_address_at(Address pc,
(instr2 & kImm16Mask));
#endif
}
-#if V8_OOL_CONSTANT_POOL
- return Memory::Address_at(target_constant_pool_address_at(pc, constant_pool));
-#else
- DCHECK(false);
- return (Address)0;
-#endif
-}
-
-
-#if V8_OOL_CONSTANT_POOL
-bool Assembler::IsConstantPoolLoadStart(Address pc) {
-#if V8_TARGET_ARCH_PPC64
- if (!IsLi(instr_at(pc))) return false;
- pc += kInstrSize;
-#endif
- return GetRA(instr_at(pc)).is(kConstantPoolRegister);
-}
-
-bool Assembler::IsConstantPoolLoadEnd(Address pc) {
-#if V8_TARGET_ARCH_PPC64
- pc -= kInstrSize;
-#endif
- return IsConstantPoolLoadStart(pc);
-}
-
-
-int Assembler::GetConstantPoolOffset(Address pc) {
- DCHECK(IsConstantPoolLoadStart(pc));
- Instr instr = instr_at(pc);
- int offset = SIGN_EXT_IMM16((instr & kImm16Mask));
- return offset;
-}
-
-
-void Assembler::SetConstantPoolOffset(Address pc, int offset) {
- DCHECK(IsConstantPoolLoadStart(pc));
- DCHECK(is_int16(offset));
- Instr instr = instr_at(pc);
- instr &= ~kImm16Mask;
- instr |= (offset & kImm16Mask);
- instr_at_put(pc, instr);
+ UNREACHABLE();
+ return NULL;
}
-Address Assembler::target_constant_pool_address_at(
- Address pc, ConstantPoolArray* constant_pool) {
- Address addr = reinterpret_cast<Address>(constant_pool);
- DCHECK(addr);
- addr += GetConstantPoolOffset(pc);
- return addr;
-}
-#endif
-
-
// This sets the branch destination (which gets loaded at the call address).
// This is for calls and branches within generated code. The serializer
// has already deserialized the mov instructions etc.
@@ -575,14 +498,9 @@ void Assembler::set_target_address_at(Address pc,
CpuFeatures::FlushICache(p, 2 * kInstrSize);
}
#endif
- } else {
-#if V8_OOL_CONSTANT_POOL
- Memory::Address_at(target_constant_pool_address_at(pc, constant_pool)) =
- target;
-#else
- UNREACHABLE();
-#endif
+ return;
}
+ UNREACHABLE();
}
}
} // namespace v8::internal
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698