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

Unified Diff: src/compiler/ppc/code-generator-ppc.cc

Issue 1162993006: Add support for Embedded Constant Pools for PPC and Arm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/compiler/ppc/code-generator-ppc.cc
diff --git a/src/compiler/ppc/code-generator-ppc.cc b/src/compiler/ppc/code-generator-ppc.cc
index d7b038394d937df00b565316c08ecec98352f597..f4fac6daff93403497dc4ef202896e9aab0a8098 100644
--- a/src/compiler/ppc/code-generator-ppc.cc
+++ b/src/compiler/ppc/code-generator-ppc.cc
@@ -1269,8 +1269,16 @@ void CodeGenerator::AssemblePrologue() {
int register_save_area_size = 0;
RegList frame_saves = fp.bit();
__ mflr(r0);
- __ Push(r0, fp);
- __ mr(fp, sp);
+ if (FLAG_enable_embedded_constant_pool) {
+ __ Push(r0, fp, kConstantPoolRegister);
+ // Adjust FP to point to saved FP.
+ __ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset));
+ register_save_area_size += kPointerSize;
+ frame_saves |= kConstantPoolRegister.bit();
+ } else {
+ __ Push(r0, fp);
+ __ mr(fp, sp);
+ }
// Save callee-saved registers.
const RegList saves = descriptor->CalleeSavedRegisters() & ~frame_saves;
for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
@@ -1323,6 +1331,9 @@ void CodeGenerator::AssembleReturn() {
}
// Restore registers.
RegList frame_saves = fp.bit();
+ if (FLAG_enable_embedded_constant_pool) {
+ frame_saves |= kConstantPoolRegister.bit();
+ }
const RegList saves = descriptor->CalleeSavedRegisters() & ~frame_saves;
if (saves != 0) {
__ MultiPop(saves);
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/debug.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698