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

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

Issue 11428137: ARM: Make use of d16-d31 when available. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address more comments Created 8 years 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
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 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 } 2029 }
2030 2030
2031 2031
2032 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { 2032 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
2033 // We don't allow a GC during a store buffer overflow so there is no need to 2033 // We don't allow a GC during a store buffer overflow so there is no need to
2034 // store the registers in any particular way, but we do have to store and 2034 // store the registers in any particular way, but we do have to store and
2035 // restore them. 2035 // restore them.
2036 __ stm(db_w, sp, kCallerSaved | lr.bit()); 2036 __ stm(db_w, sp, kCallerSaved | lr.bit());
2037 if (save_doubles_ == kSaveFPRegs) { 2037 if (save_doubles_ == kSaveFPRegs) {
2038 CpuFeatures::Scope scope(VFP2); 2038 CpuFeatures::Scope scope(VFP2);
2039 __ sub(sp, sp, Operand(kDoubleSize * DwVfpRegister::kNumRegisters)); 2039 // Number of d-regs not known at snapshot time.
2040 for (int i = 0; i < DwVfpRegister::kNumRegisters; i++) { 2040 ASSERT(!Serializer::enabled());
2041 __ sub(sp, sp, Operand(kDoubleSize *
2042 DwVfpRegister::NumAvailableRegisters()));
2043 for (int i = 0; i < DwVfpRegister::NumAvailableRegisters(); i++) {
2041 DwVfpRegister reg = DwVfpRegister::from_code(i); 2044 DwVfpRegister reg = DwVfpRegister::from_code(i);
2042 __ vstr(reg, MemOperand(sp, i * kDoubleSize)); 2045 __ vstr(reg, MemOperand(sp, i * kDoubleSize));
2043 } 2046 }
2044 } 2047 }
2045 const int argument_count = 1; 2048 const int argument_count = 1;
2046 const int fp_argument_count = 0; 2049 const int fp_argument_count = 0;
2047 const Register scratch = r1; 2050 const Register scratch = r1;
2048 2051
2049 AllowExternalCallThatCantCauseGC scope(masm); 2052 AllowExternalCallThatCantCauseGC scope(masm);
2050 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch); 2053 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch);
2051 __ mov(r0, Operand(ExternalReference::isolate_address())); 2054 __ mov(r0, Operand(ExternalReference::isolate_address()));
2052 __ CallCFunction( 2055 __ CallCFunction(
2053 ExternalReference::store_buffer_overflow_function(masm->isolate()), 2056 ExternalReference::store_buffer_overflow_function(masm->isolate()),
2054 argument_count); 2057 argument_count);
2055 if (save_doubles_ == kSaveFPRegs) { 2058 if (save_doubles_ == kSaveFPRegs) {
2056 CpuFeatures::Scope scope(VFP2); 2059 CpuFeatures::Scope scope(VFP2);
2057 for (int i = 0; i < DwVfpRegister::kNumRegisters; i++) { 2060 for (int i = 0; i < DwVfpRegister::NumAvailableRegisters(); i++) {
2058 DwVfpRegister reg = DwVfpRegister::from_code(i); 2061 DwVfpRegister reg = DwVfpRegister::from_code(i);
2059 __ vldr(reg, MemOperand(sp, i * kDoubleSize)); 2062 __ vldr(reg, MemOperand(sp, i * kDoubleSize));
2060 } 2063 }
2061 __ add(sp, sp, Operand(kDoubleSize * DwVfpRegister::kNumRegisters)); 2064 __ add(sp, sp, Operand(kDoubleSize *
2065 DwVfpRegister::NumAvailableRegisters()));
2062 } 2066 }
2063 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). 2067 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0).
2064 } 2068 }
2065 2069
2066 2070
2067 void UnaryOpStub::PrintName(StringStream* stream) { 2071 void UnaryOpStub::PrintName(StringStream* stream) {
2068 const char* op_name = Token::Name(op_); 2072 const char* op_name = Token::Name(op_);
2069 const char* overwrite_name = NULL; // Make g++ happy. 2073 const char* overwrite_name = NULL; // Make g++ happy.
2070 switch (mode_) { 2074 switch (mode_) {
2071 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; 2075 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break;
(...skipping 5532 matching lines...) Expand 10 before | Expand all | Expand 10 after
7604 7608
7605 __ Pop(lr, r5, r1); 7609 __ Pop(lr, r5, r1);
7606 __ Ret(); 7610 __ Ret();
7607 } 7611 }
7608 7612
7609 #undef __ 7613 #undef __
7610 7614
7611 } } // namespace v8::internal 7615 } } // namespace v8::internal
7612 7616
7613 #endif // V8_TARGET_ARCH_ARM 7617 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698