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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: First pass at pre-VFP2 RA Created 8 years, 1 month 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/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 1e73a55871606f4ce7b2708b856ef6e2e9a3f9d8..195a37f9ea877ec300ca44aa995fcf25869d5d5f 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -504,7 +504,7 @@ void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) {
// 52 fraction bits (20 in the first word, 32 in the second). Zeros is a
// scratch register. Destroys the source register. No GC occurs during this
// stub so you don't have to set up the frame.
-class ConvertToDoubleStub : public CodeStub {
+class ConvertToDoubleStub : public PlatformCodeStub {
public:
ConvertToDoubleStub(Register result_reg_1,
Register result_reg_2,
@@ -3565,10 +3565,10 @@ void MathPowStub::Generate(MacroAssembler* masm) {
const Register exponent = r2;
const Register heapnumbermap = r5;
const Register heapnumber = r0;
- const DoubleRegister double_base = d1;
- const DoubleRegister double_exponent = d2;
- const DoubleRegister double_result = d3;
- const DoubleRegister double_scratch = d0;
+ const DwVfpRegister double_base = d1;
+ const DwVfpRegister double_exponent = d2;
+ const DwVfpRegister double_result = d3;
+ const DwVfpRegister double_scratch = d0;
const SwVfpRegister single_scratch = s0;
const Register scratch = r9;
const Register scratch2 = r7;
@@ -3778,12 +3778,25 @@ void CodeStub::GenerateStubsAheadOfTime() {
void CodeStub::GenerateFPStubs() {
- CEntryStub save_doubles(1, kSaveFPRegs);
- Handle<Code> code = save_doubles.GetCode();
- code->set_is_pregenerated(true);
- StoreBufferOverflowStub stub(kSaveFPRegs);
- stub.GetCode()->set_is_pregenerated(true);
- code->GetIsolate()->set_fp_stubs_generated(true);
+ SaveFPRegsMode mode = CpuFeatures::IsSupported(VFP2)
+ ? kSaveFPRegs
+ : kDontSaveFPRegs;
+ CEntryStub save_doubles(1, mode);
+ StoreBufferOverflowStub stub(mode);
+ // These stubs might already be in the snapshot, detect that and don't
+ // regenerate, which leads to code stubs initialization state being messed up.
+ Code* code_object;
+ if (!save_doubles.FindCodeInCache(&code_object)) {
+ if (CpuFeatures::IsSupported(VFP2)) {
+ CpuFeatures::Scope scope2(VFP2);
+ save_doubles.GetCode()->set_is_pregenerated(true);
Jakob Kummerow 2012/11/19 12:36:00 Suggestion: save the result of save_doubles.GetCod
danno 2012/11/26 17:16:18 Done.
+ stub.GetCode()->set_is_pregenerated(true);
+ } else {
+ save_doubles.GetCode()->set_is_pregenerated(true);
+ stub.GetCode()->set_is_pregenerated(true);
+ }
+ }
+ ISOLATE->set_fp_stubs_generated(true);
}
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/deoptimizer-arm.cc » ('j') | src/arm/deoptimizer-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698