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

Side by Side Diff: src/arm/macro-assembler-arm.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/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.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 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 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 2610
2611 2611
2612 void MacroAssembler::GetLeastBitsFromInt32(Register dst, 2612 void MacroAssembler::GetLeastBitsFromInt32(Register dst,
2613 Register src, 2613 Register src,
2614 int num_least_bits) { 2614 int num_least_bits) {
2615 and_(dst, src, Operand((1 << num_least_bits) - 1)); 2615 and_(dst, src, Operand((1 << num_least_bits) - 1));
2616 } 2616 }
2617 2617
2618 2618
2619 void MacroAssembler::CallRuntime(const Runtime::Function* f, 2619 void MacroAssembler::CallRuntime(const Runtime::Function* f,
2620 int num_arguments) { 2620 int num_arguments,
2621 SaveFPRegsMode save_doubles) {
2621 // All parameters are on the stack. r0 has the return value after call. 2622 // All parameters are on the stack. r0 has the return value after call.
2622 2623
2623 // If the expected number of arguments of the runtime function is 2624 // If the expected number of arguments of the runtime function is
2624 // constant, we check that the actual number of arguments match the 2625 // constant, we check that the actual number of arguments match the
2625 // expectation. 2626 // expectation.
2626 if (f->nargs >= 0 && f->nargs != num_arguments) { 2627 if (f->nargs >= 0 && f->nargs != num_arguments) {
2627 IllegalOperation(num_arguments); 2628 IllegalOperation(num_arguments);
2628 return; 2629 return;
2629 } 2630 }
2630 2631
2631 // TODO(1236192): Most runtime routines don't need the number of 2632 // TODO(1236192): Most runtime routines don't need the number of
2632 // arguments passed in because it is constant. At some point we 2633 // arguments passed in because it is constant. At some point we
2633 // should remove this need and make the runtime routine entry code 2634 // should remove this need and make the runtime routine entry code
2634 // smarter. 2635 // smarter.
2635 mov(r0, Operand(num_arguments)); 2636 mov(r0, Operand(num_arguments));
2636 mov(r1, Operand(ExternalReference(f, isolate()))); 2637 mov(r1, Operand(ExternalReference(f, isolate())));
2637 CEntryStub stub(1); 2638 CEntryStub stub(1, save_doubles);
2638 CallStub(&stub); 2639 CallStub(&stub);
2639 } 2640 }
2640 2641
2641
2642 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
2643 CallRuntime(Runtime::FunctionForId(fid), num_arguments);
2644 }
2645
2646
2647 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) {
2648 const Runtime::Function* function = Runtime::FunctionForId(id);
2649 mov(r0, Operand(function->nargs));
2650 mov(r1, Operand(ExternalReference(function, isolate())));
2651 CEntryStub stub(1, kSaveFPRegs);
2652 CallStub(&stub);
2653 }
2654
2655 2642
2656 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 2643 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
2657 int num_arguments) { 2644 int num_arguments) {
2658 mov(r0, Operand(num_arguments)); 2645 mov(r0, Operand(num_arguments));
2659 mov(r1, Operand(ext)); 2646 mov(r1, Operand(ext));
2660 2647
2661 CEntryStub stub(1); 2648 CEntryStub stub(1);
2662 CallStub(&stub); 2649 CallStub(&stub);
2663 } 2650 }
2664 2651
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 void CodePatcher::EmitCondition(Condition cond) { 3966 void CodePatcher::EmitCondition(Condition cond) {
3980 Instr instr = Assembler::instr_at(masm_.pc_); 3967 Instr instr = Assembler::instr_at(masm_.pc_);
3981 instr = (instr & ~kCondMask) | cond; 3968 instr = (instr & ~kCondMask) | cond;
3982 masm_.emit(instr); 3969 masm_.emit(instr);
3983 } 3970 }
3984 3971
3985 3972
3986 } } // namespace v8::internal 3973 } } // namespace v8::internal
3987 3974
3988 #endif // V8_TARGET_ARCH_ARM 3975 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698