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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 130743006: Merged r16772, r18000, r18298, r18319 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Fix x64 Created 6 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/ia32/macro-assembler-ia32.h ('k') | src/mips/assembler-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 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 STATIC_ASSERT(String::kHashShift >= kSmiTagSize && kSmiTag == 0); 2134 STATIC_ASSERT(String::kHashShift >= kSmiTagSize && kSmiTag == 0);
2135 if (String::kHashShift > kSmiTagSize) { 2135 if (String::kHashShift > kSmiTagSize) {
2136 shr(hash, String::kHashShift - kSmiTagSize); 2136 shr(hash, String::kHashShift - kSmiTagSize);
2137 } 2137 }
2138 if (!index.is(hash)) { 2138 if (!index.is(hash)) {
2139 mov(index, hash); 2139 mov(index, hash);
2140 } 2140 }
2141 } 2141 }
2142 2142
2143 2143
2144 void MacroAssembler::CallRuntime(Runtime::FunctionId id, int num_arguments) { 2144 void MacroAssembler::CallRuntime(Runtime::FunctionId fid,
2145 CallRuntime(Runtime::FunctionForId(id), num_arguments); 2145 int num_arguments,
2146 SaveFPRegsMode save_doubles) {
2147 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
2146 } 2148 }
2147 2149
2148 2150
2149 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { 2151 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) {
2150 const Runtime::Function* function = Runtime::FunctionForId(id); 2152 const Runtime::Function* function = Runtime::FunctionForId(id);
2151 Set(eax, Immediate(function->nargs)); 2153 Set(eax, Immediate(function->nargs));
2152 mov(ebx, Immediate(ExternalReference(function, isolate()))); 2154 mov(ebx, Immediate(ExternalReference(function, isolate())));
2153 CEntryStub ces(1, CpuFeatures::IsSupported(SSE2) ? kSaveFPRegs 2155 CEntryStub ces(1, CpuFeatures::IsSupported(SSE2) ? kSaveFPRegs
2154 : kDontSaveFPRegs); 2156 : kDontSaveFPRegs);
2155 CallStub(&ces); 2157 CallStub(&ces);
2156 } 2158 }
2157 2159
2158 2160
2159 void MacroAssembler::CallRuntime(const Runtime::Function* f, 2161 void MacroAssembler::CallRuntime(const Runtime::Function* f,
2160 int num_arguments) { 2162 int num_arguments,
2163 SaveFPRegsMode save_doubles) {
2161 // If the expected number of arguments of the runtime function is 2164 // If the expected number of arguments of the runtime function is
2162 // constant, we check that the actual number of arguments match the 2165 // constant, we check that the actual number of arguments match the
2163 // expectation. 2166 // expectation.
2164 if (f->nargs >= 0 && f->nargs != num_arguments) { 2167 if (f->nargs >= 0 && f->nargs != num_arguments) {
2165 IllegalOperation(num_arguments); 2168 IllegalOperation(num_arguments);
2166 return; 2169 return;
2167 } 2170 }
2168 2171
2169 // TODO(1236192): Most runtime routines don't need the number of 2172 // TODO(1236192): Most runtime routines don't need the number of
2170 // arguments passed in because it is constant. At some point we 2173 // arguments passed in because it is constant. At some point we
2171 // should remove this need and make the runtime routine entry code 2174 // should remove this need and make the runtime routine entry code
2172 // smarter. 2175 // smarter.
2173 Set(eax, Immediate(num_arguments)); 2176 Set(eax, Immediate(num_arguments));
2174 mov(ebx, Immediate(ExternalReference(f, isolate()))); 2177 mov(ebx, Immediate(ExternalReference(f, isolate())));
2175 CEntryStub ces(1); 2178 CEntryStub ces(1, CpuFeatures::IsSupported(SSE2) ? save_doubles
2179 : kDontSaveFPRegs);
2176 CallStub(&ces); 2180 CallStub(&ces);
2177 } 2181 }
2178 2182
2179 2183
2180 void MacroAssembler::CallExternalReference(ExternalReference ref, 2184 void MacroAssembler::CallExternalReference(ExternalReference ref,
2181 int num_arguments) { 2185 int num_arguments) {
2182 mov(eax, Immediate(num_arguments)); 2186 mov(eax, Immediate(num_arguments));
2183 mov(ebx, Immediate(ref)); 2187 mov(ebx, Immediate(ref));
2184 2188
2185 CEntryStub stub(1); 2189 CEntryStub stub(1);
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 j(greater, &no_memento_available); 3428 j(greater, &no_memento_available);
3425 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3429 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3426 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); 3430 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map())));
3427 bind(&no_memento_available); 3431 bind(&no_memento_available);
3428 } 3432 }
3429 3433
3430 3434
3431 } } // namespace v8::internal 3435 } } // namespace v8::internal
3432 3436
3433 #endif // V8_TARGET_ARCH_IA32 3437 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698