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

Side by Side Diff: src/a64/builtins-a64.cc

Issue 153773002: A64: Synchronize with r16679. (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/assembler-a64-inl.h ('k') | src/a64/code-stubs-a64.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 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 { 932 {
933 FrameScope scope(masm, StackFrame::INTERNAL); 933 FrameScope scope(masm, StackFrame::INTERNAL);
934 __ CallRuntime(Runtime::kNotifyOSR, 0); 934 __ CallRuntime(Runtime::kNotifyOSR, 0);
935 } 935 }
936 __ PopXRegList(kSafepointSavedRegisters); 936 __ PopXRegList(kSafepointSavedRegisters);
937 __ Ret(); 937 __ Ret();
938 } 938 }
939 939
940 940
941 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { 941 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
942 // Lookup the function in the JavaScript frame and push it as an 942 // Lookup the function in the JavaScript frame.
943 // argument to the on-stack replacement function.
944 __ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 943 __ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
945 { 944 {
946 FrameScope scope(masm, StackFrame::INTERNAL); 945 FrameScope scope(masm, StackFrame::INTERNAL);
947 __ Push(x0); 946 // Lookup and calculate pc offset.
948 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1); 947 __ Ldr(x1, MemOperand(fp, StandardFrameConstants::kCallerPCOffset));
948 __ Ldr(x2, FieldMemOperand(x0, JSFunction::kSharedFunctionInfoOffset));
949 __ Ldr(x2, FieldMemOperand(x2, SharedFunctionInfo::kCodeOffset));
950 __ Sub(x1, x1, Code::kHeaderSize - kHeapObjectTag);
951 __ Sub(x1, x1, x2);
952 __ SmiTag(x1);
953
954 // Pass both function and pc offset as arguments.
955 __ Push(x0, x1);
956 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 2);
949 } 957 }
950 958
951 // If the code object is null, just return to the unoptimized code. 959 // If the code object is null, just return to the unoptimized code.
952 Label skip; 960 Label skip;
953 __ CompareAndBranch(x0, Operand(Smi::FromInt(0)), ne, &skip); 961 __ CompareAndBranch(x0, Operand(Smi::FromInt(0)), ne, &skip);
954 __ Ret(); 962 __ Ret();
955 963
956 __ Bind(&skip); 964 __ Bind(&skip);
957 965
958 // Load deoptimization data from the code object. 966 // Load deoptimization data from the code object.
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 __ Bind(&dont_adapt_arguments); 1472 __ Bind(&dont_adapt_arguments);
1465 __ Jump(x3); 1473 __ Jump(x3);
1466 } 1474 }
1467 1475
1468 1476
1469 #undef __ 1477 #undef __
1470 1478
1471 } } // namespace v8::internal 1479 } } // namespace v8::internal
1472 1480
1473 #endif // V8_TARGET_ARCH_ARM 1481 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/a64/assembler-a64-inl.h ('k') | src/a64/code-stubs-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698