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

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

Issue 145773008: A64: Synchronize with r17104. (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/macro-assembler-a64.h ('k') | src/a64/stub-cache-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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 1209
1210 1210
1211 void MacroAssembler::TailCallStub(CodeStub* stub) { 1211 void MacroAssembler::TailCallStub(CodeStub* stub) {
1212 ASSERT(allow_stub_calls_ || 1212 ASSERT(allow_stub_calls_ ||
1213 stub->CompilingCallsToThisStubIsGCSafe(isolate())); 1213 stub->CompilingCallsToThisStubIsGCSafe(isolate()));
1214 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); 1214 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
1215 } 1215 }
1216 1216
1217 1217
1218 void MacroAssembler::CallRuntime(const Runtime::Function* f, 1218 void MacroAssembler::CallRuntime(const Runtime::Function* f,
1219 int num_arguments) { 1219 int num_arguments,
1220 SaveFPRegsMode save_doubles) {
1220 // All arguments must be on the stack before this function is called. 1221 // All arguments must be on the stack before this function is called.
1221 // x0 holds the return value after the call. 1222 // x0 holds the return value after the call.
1222 1223
1223 // Check that the number of arguments matches what the function expects. 1224 // Check that the number of arguments matches what the function expects.
1224 // If f->nargs is -1, the function can accept a variable number of arguments. 1225 // If f->nargs is -1, the function can accept a variable number of arguments.
1225 if (f->nargs >= 0 && f->nargs != num_arguments) { 1226 if (f->nargs >= 0 && f->nargs != num_arguments) {
1226 // Illegal operation: drop the stack arguments and return undefined. 1227 // Illegal operation: drop the stack arguments and return undefined.
1227 if (num_arguments > 0) { 1228 if (num_arguments > 0) {
1228 Drop(num_arguments); 1229 Drop(num_arguments);
1229 } 1230 }
1230 LoadRoot(x0, Heap::kUndefinedValueRootIndex); 1231 LoadRoot(x0, Heap::kUndefinedValueRootIndex);
1231 return; 1232 return;
1232 } 1233 }
1233 1234
1234 // Place the necessary arguments. 1235 // Place the necessary arguments.
1235 Mov(x0, num_arguments); 1236 Mov(x0, num_arguments);
1236 Mov(x1, Operand(ExternalReference(f, isolate()))); 1237 Mov(x1, Operand(ExternalReference(f, isolate())));
1237 1238
1238 CEntryStub stub(1); 1239 CEntryStub stub(1, save_doubles);
1239 CallStub(&stub); 1240 CallStub(&stub);
1240 } 1241 }
1241 1242
1242
1243 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
1244 CallRuntime(Runtime::FunctionForId(fid), num_arguments);
1245 }
1246
1247
1248 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) {
1249 const Runtime::Function* function = Runtime::FunctionForId(id);
1250
1251 // Place the necessary arguments.
1252 Mov(x0, function->nargs);
1253 Mov(x1, Operand(ExternalReference(function, isolate())));
1254
1255 CEntryStub stub(1, kSaveFPRegs);
1256 CallStub(&stub);
1257 }
1258
1259 1243
1260 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 1244 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
1261 return ref0.address() - ref1.address(); 1245 return ref0.address() - ref1.address();
1262 } 1246 }
1263 1247
1264 1248
1265 void MacroAssembler::CallApiFunctionAndReturn( 1249 void MacroAssembler::CallApiFunctionAndReturn(
1266 ExternalReference function, 1250 ExternalReference function,
1267 Address function_address, 1251 Address function_address,
1268 ExternalReference thunk_ref, 1252 ExternalReference thunk_ref,
(...skipping 3444 matching lines...) Expand 10 before | Expand all | Expand 10 after
4713 } 4697 }
4714 } 4698 }
4715 4699
4716 4700
4717 #undef __ 4701 #undef __
4718 4702
4719 4703
4720 } } // namespace v8::internal 4704 } } // namespace v8::internal
4721 4705
4722 #endif // V8_TARGET_ARCH_A64 4706 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | src/a64/stub-cache-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698