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

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

Issue 201042: Win64 - Allow returning two values from a runtime function. (Closed)
Patch Set: Fixed typo. Created 11 years, 3 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 CallStub(&stub); 971 CallStub(&stub);
972 } 972 }
973 973
974 974
975 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) { 975 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
976 CallRuntime(Runtime::FunctionForId(fid), num_arguments); 976 CallRuntime(Runtime::FunctionForId(fid), num_arguments);
977 } 977 }
978 978
979 979
980 void MacroAssembler::TailCallRuntime(const ExternalReference& ext, 980 void MacroAssembler::TailCallRuntime(const ExternalReference& ext,
981 int num_arguments) { 981 int num_arguments,
982 int result_size) {
982 // TODO(1236192): Most runtime routines don't need the number of 983 // TODO(1236192): Most runtime routines don't need the number of
983 // arguments passed in because it is constant. At some point we 984 // arguments passed in because it is constant. At some point we
984 // should remove this need and make the runtime routine entry code 985 // should remove this need and make the runtime routine entry code
985 // smarter. 986 // smarter.
986 mov(r0, Operand(num_arguments)); 987 mov(r0, Operand(num_arguments));
987 JumpToBuiltin(ext); 988 JumpToBuiltin(ext);
988 } 989 }
989 990
990 991
991 void MacroAssembler::JumpToBuiltin(const ExternalReference& builtin) { 992 void MacroAssembler::JumpToBuiltin(const ExternalReference& builtin) {
992 #if defined(__thumb__) 993 #if defined(__thumb__)
993 // Thumb mode builtin. 994 // Thumb mode builtin.
994 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); 995 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1);
995 #endif 996 #endif
996 mov(r1, Operand(builtin)); 997 mov(r1, Operand(builtin));
997 CEntryStub stub; 998 CEntryStub stub(1);
998 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 999 Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
999 } 1000 }
1000 1001
1001 1002
1002 Handle<Code> MacroAssembler::ResolveBuiltin(Builtins::JavaScript id, 1003 Handle<Code> MacroAssembler::ResolveBuiltin(Builtins::JavaScript id,
1003 bool* resolved) { 1004 bool* resolved) {
1004 // Contract with compiled functions is that the function is passed in r1. 1005 // Contract with compiled functions is that the function is passed in r1.
1005 int builtins_offset = 1006 int builtins_offset =
1006 JSBuiltinsObject::kJSBuiltinsOffset + (id * kPointerSize); 1007 JSBuiltinsObject::kJSBuiltinsOffset + (id * kPointerSize);
1007 ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 1008 ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 mov(r0, Operand(p0)); 1125 mov(r0, Operand(p0));
1125 push(r0); 1126 push(r0);
1126 mov(r0, Operand(Smi::FromInt(p1 - p0))); 1127 mov(r0, Operand(Smi::FromInt(p1 - p0)));
1127 push(r0); 1128 push(r0);
1128 CallRuntime(Runtime::kAbort, 2); 1129 CallRuntime(Runtime::kAbort, 2);
1129 // will not return here 1130 // will not return here
1130 } 1131 }
1131 1132
1132 1133
1133 } } // namespace v8::internal 1134 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | src/codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698