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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 11801002: MIPS: Re-land Crankshaft-generated KeyedLoad stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/mips/codegen-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 20 matching lines...) Expand all
31 31
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "code-stubs.h" 33 #include "code-stubs.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "regexp-macro-assembler.h" 35 #include "regexp-macro-assembler.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 40
41 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
42 Isolate* isolate,
43 CodeStubInterfaceDescriptor* descriptor) {
44 static Register registers[] = { a1, a0 };
45 descriptor->register_param_count_ = 2;
46 descriptor->register_params_ = registers;
47 descriptor->deoptimization_handler_ =
48 isolate->builtins()->KeyedLoadIC_Miss();
49 }
50
51
41 #define __ ACCESS_MASM(masm) 52 #define __ ACCESS_MASM(masm)
42 53
43 static void EmitIdenticalObjectComparison(MacroAssembler* masm, 54 static void EmitIdenticalObjectComparison(MacroAssembler* masm,
44 Label* slow, 55 Label* slow,
45 Condition cc); 56 Condition cc);
46 static void EmitSmiNonsmiComparison(MacroAssembler* masm, 57 static void EmitSmiNonsmiComparison(MacroAssembler* masm,
47 Register lhs, 58 Register lhs,
48 Register rhs, 59 Register rhs,
49 Label* rhs_not_nan, 60 Label* rhs_not_nan,
50 Label* slow, 61 Label* slow,
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 __ bind(&slow_case); 504 __ bind(&slow_case);
494 __ TailCallRuntime(Runtime::kCreateObjectLiteralShallow, 4, 1); 505 __ TailCallRuntime(Runtime::kCreateObjectLiteralShallow, 4, 1);
495 } 506 }
496 507
497 508
498 // Takes a Smi and converts to an IEEE 64 bit floating point value in two 509 // Takes a Smi and converts to an IEEE 64 bit floating point value in two
499 // registers. The format is 1 sign bit, 11 exponent bits (biased 1023) and 510 // registers. The format is 1 sign bit, 11 exponent bits (biased 1023) and
500 // 52 fraction bits (20 in the first word, 32 in the second). Zeros is a 511 // 52 fraction bits (20 in the first word, 32 in the second). Zeros is a
501 // scratch register. Destroys the source register. No GC occurs during this 512 // scratch register. Destroys the source register. No GC occurs during this
502 // stub so you don't have to set up the frame. 513 // stub so you don't have to set up the frame.
503 class ConvertToDoubleStub : public CodeStub { 514 class ConvertToDoubleStub : public PlatformCodeStub {
504 public: 515 public:
505 ConvertToDoubleStub(Register result_reg_1, 516 ConvertToDoubleStub(Register result_reg_1,
506 Register result_reg_2, 517 Register result_reg_2,
507 Register source_reg, 518 Register source_reg,
508 Register scratch_reg) 519 Register scratch_reg)
509 : result1_(result_reg_1), 520 : result1_(result_reg_1),
510 result2_(result_reg_2), 521 result2_(result_reg_2),
511 source_(source_reg), 522 source_(source_reg),
512 zeros_(scratch_reg) { } 523 zeros_(scratch_reg) { }
513 524
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3886 3897
3887 void CodeStub::GenerateStubsAheadOfTime() { 3898 void CodeStub::GenerateStubsAheadOfTime() {
3888 CEntryStub::GenerateAheadOfTime(); 3899 CEntryStub::GenerateAheadOfTime();
3889 WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(); 3900 WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime();
3890 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(); 3901 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime();
3891 RecordWriteStub::GenerateFixedRegStubsAheadOfTime(); 3902 RecordWriteStub::GenerateFixedRegStubsAheadOfTime();
3892 } 3903 }
3893 3904
3894 3905
3895 void CodeStub::GenerateFPStubs() { 3906 void CodeStub::GenerateFPStubs() {
3896 CEntryStub save_doubles(1, kSaveFPRegs); 3907 SaveFPRegsMode mode = CpuFeatures::IsSupported(FPU)
3897 Handle<Code> code = save_doubles.GetCode(); 3908 ? kSaveFPRegs
3898 code->set_is_pregenerated(true); 3909 : kDontSaveFPRegs;
3899 StoreBufferOverflowStub stub(kSaveFPRegs); 3910 CEntryStub save_doubles(1, mode);
3900 stub.GetCode()->set_is_pregenerated(true); 3911 StoreBufferOverflowStub stub(mode);
3901 code->GetIsolate()->set_fp_stubs_generated(true); 3912 // These stubs might already be in the snapshot, detect that and don't
3913 // regenerate, which would lead to code stub initialization state being messed
3914 // up.
3915 Code* save_doubles_code = NULL;
3916 Code* store_buffer_overflow_code = NULL;
3917 if (!save_doubles.FindCodeInCache(&save_doubles_code, ISOLATE)) {
3918 if (CpuFeatures::IsSupported(FPU)) {
3919 CpuFeatures::Scope scope2(FPU);
3920 save_doubles_code = *save_doubles.GetCode();
3921 store_buffer_overflow_code = *stub.GetCode();
3922 } else {
3923 save_doubles_code = *save_doubles.GetCode();
3924 store_buffer_overflow_code = *stub.GetCode();
3925 }
3926 save_doubles_code->set_is_pregenerated(true);
3927 store_buffer_overflow_code->set_is_pregenerated(true);
3928 }
3929 ISOLATE->set_fp_stubs_generated(true);
3902 } 3930 }
3903 3931
3904 3932
3905 void CEntryStub::GenerateAheadOfTime() { 3933 void CEntryStub::GenerateAheadOfTime() {
3906 CEntryStub stub(1, kDontSaveFPRegs); 3934 CEntryStub stub(1, kDontSaveFPRegs);
3907 Handle<Code> code = stub.GetCode(); 3935 Handle<Code> code = stub.GetCode();
3908 code->set_is_pregenerated(true); 3936 code->set_is_pregenerated(true);
3909 } 3937 }
3910 3938
3911 3939
(...skipping 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after
7813 __ Pop(ra, t1, a1); 7841 __ Pop(ra, t1, a1);
7814 __ Ret(); 7842 __ Ret();
7815 } 7843 }
7816 7844
7817 7845
7818 #undef __ 7846 #undef __
7819 7847
7820 } } // namespace v8::internal 7848 } } // namespace v8::internal
7821 7849
7822 #endif // V8_TARGET_ARCH_MIPS 7850 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/mips/codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698