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

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

Issue 133443009: A64: Synchronize with r17441. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/a64/builtins-a64.cc ('k') | src/a64/codegen-a64.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 63
64 void NumberToStringStub::InitializeInterfaceDescriptor( 64 void NumberToStringStub::InitializeInterfaceDescriptor(
65 Isolate* isolate, 65 Isolate* isolate,
66 CodeStubInterfaceDescriptor* descriptor) { 66 CodeStubInterfaceDescriptor* descriptor) {
67 // x0: value 67 // x0: value
68 static Register registers[] = { x0 }; 68 static Register registers[] = { x0 };
69 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); 69 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]);
70 descriptor->register_params_ = registers; 70 descriptor->register_params_ = registers;
71 descriptor->deoptimization_handler_ = NULL; 71 descriptor->deoptimization_handler_ =
72 Runtime::FunctionForId(Runtime::kNumberToString)->entry;
72 } 73 }
73 74
74 75
75 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 76 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
76 Isolate* isolate, 77 Isolate* isolate,
77 CodeStubInterfaceDescriptor* descriptor) { 78 CodeStubInterfaceDescriptor* descriptor) {
78 // x3: array literals array 79 // x3: array literals array
79 // x2: array literal index 80 // x2: array literal index
80 // x1: constant elements 81 // x1: constant elements
81 static Register registers[] = { x3, x2, x1 }; 82 static Register registers[] = { x3, x2, x1 };
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 Isolate* isolate, 208 Isolate* isolate,
208 CodeStubInterfaceDescriptor* descriptor, 209 CodeStubInterfaceDescriptor* descriptor,
209 int constant_stack_parameter_count) { 210 int constant_stack_parameter_count) {
210 // x1: function 211 // x1: function
211 // x2: type info cell with elements kind 212 // x2: type info cell with elements kind
212 static Register registers[] = { x1, x2 }; 213 static Register registers[] = { x1, x2 };
213 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); 214 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]);
214 if (constant_stack_parameter_count != 0) { 215 if (constant_stack_parameter_count != 0) {
215 // stack param count needs (constructor pointer, and single argument) 216 // stack param count needs (constructor pointer, and single argument)
216 // x0: number of arguments to the constructor function 217 // x0: number of arguments to the constructor function
217 descriptor->stack_parameter_count_ = &x0; 218 descriptor->stack_parameter_count_ = x0;
218 } 219 }
219 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 220 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
220 descriptor->register_params_ = registers; 221 descriptor->register_params_ = registers;
221 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 222 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
222 descriptor->deoptimization_handler_ = 223 descriptor->deoptimization_handler_ =
223 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; 224 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry;
224 } 225 }
225 226
226 227
227 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 228 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 20 matching lines...) Expand all
248 static void InitializeInternalArrayConstructorDescriptor( 249 static void InitializeInternalArrayConstructorDescriptor(
249 Isolate* isolate, 250 Isolate* isolate,
250 CodeStubInterfaceDescriptor* descriptor, 251 CodeStubInterfaceDescriptor* descriptor,
251 int constant_stack_parameter_count) { 252 int constant_stack_parameter_count) {
252 // x1: constructor function 253 // x1: constructor function
253 static Register registers[] = { x1 }; 254 static Register registers[] = { x1 };
254 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); 255 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]);
255 if (constant_stack_parameter_count != 0) { 256 if (constant_stack_parameter_count != 0) {
256 // stack param count needs (constructor pointer, and single argument) 257 // stack param count needs (constructor pointer, and single argument)
257 // x0: number of arguments to the constructor function 258 // x0: number of arguments to the constructor function
258 descriptor->stack_parameter_count_ = &x0; 259 descriptor->stack_parameter_count_ = x0;
259 } 260 }
260 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 261 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
261 descriptor->register_params_ = registers; 262 descriptor->register_params_ = registers;
262 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 263 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
263 descriptor->deoptimization_handler_ = 264 descriptor->deoptimization_handler_ =
264 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; 265 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry;
265 } 266 }
266 267
267 268
268 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 269 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 4801 matching lines...) Expand 10 before | Expand all | Expand 10 after
5070 __ Add(right_len, right_len, right_len); 5071 __ Add(right_len, right_len, right_len);
5071 __ CopyBytes(result_char, right_char, right_len, temp, kCopyShort); 5072 __ CopyBytes(result_char, right_char, right_len, temp, kCopyShort);
5072 __ IncrementCounter(counters->string_add_native(), 1, x3, x4); 5073 __ IncrementCounter(counters->string_add_native(), 1, x3, x4);
5073 __ Ret(); 5074 __ Ret();
5074 5075
5075 5076
5076 // Just jump to runtime to add the two strings. 5077 // Just jump to runtime to add the two strings.
5077 __ Bind(&call_runtime); 5078 __ Bind(&call_runtime);
5078 // Restore stack arguments. 5079 // Restore stack arguments.
5079 __ Push(left, right); 5080 __ Push(left, right);
5080 if ((flags_ & STRING_ADD_ERECT_FRAME) != 0) { 5081 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
5081 GenerateRegisterArgsPop(masm);
5082 // Build a frame
5083 {
5084 FrameScope scope(masm, StackFrame::INTERNAL);
5085 GenerateRegisterArgsPush(masm);
5086 __ CallRuntime(Runtime::kStringAdd, 2);
5087 }
5088 __ Ret();
5089 } else {
5090 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
5091 }
5092 5082
5093 if (call_builtin.is_linked()) { 5083 if (call_builtin.is_linked()) {
5094 __ Bind(&call_builtin); 5084 __ Bind(&call_builtin);
5095 // Restore stack arguments. 5085 // Restore stack arguments.
5096 __ Push(left, right); 5086 __ Push(left, right);
5097 if ((flags_ & STRING_ADD_ERECT_FRAME) != 0) { 5087 __ InvokeBuiltin(builtin_id, JUMP_FUNCTION);
5098 GenerateRegisterArgsPop(masm);
5099 // Build a frame
5100 {
5101 FrameScope scope(masm, StackFrame::INTERNAL);
5102 GenerateRegisterArgsPush(masm);
5103 __ InvokeBuiltin(builtin_id, CALL_FUNCTION);
5104 }
5105 __ Ret();
5106 } else {
5107 __ InvokeBuiltin(builtin_id, JUMP_FUNCTION);
5108 }
5109 } 5088 }
5110 } 5089 }
5111 5090
5112 5091
5113 void StringAddStub::GenerateConvertArgument(MacroAssembler* masm, 5092 void StringAddStub::GenerateConvertArgument(MacroAssembler* masm,
5114 Register arg, 5093 Register arg,
5115 Register scratch1, 5094 Register scratch1,
5116 Register scratch2, 5095 Register scratch2,
5117 Register scratch3, 5096 Register scratch3,
5118 Register scratch4, 5097 Register scratch4,
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
6169 __ Bind(&fast_elements_case); 6148 __ Bind(&fast_elements_case);
6170 GenerateCase(masm, FAST_ELEMENTS); 6149 GenerateCase(masm, FAST_ELEMENTS);
6171 } 6150 }
6172 6151
6173 6152
6174 #undef __ 6153 #undef __
6175 6154
6176 } } // namespace v8::internal 6155 } } // namespace v8::internal
6177 6156
6178 #endif // V8_TARGET_ARCH_A64 6157 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/builtins-a64.cc ('k') | src/a64/codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698