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

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

Issue 130743006: Merged r16772, r18000, r18298, r18319 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Fix x64 Created 6 years, 11 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/assembler.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 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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 2596
2597 2597
2598 void MacroAssembler::GetLeastBitsFromInt32(Register dst, 2598 void MacroAssembler::GetLeastBitsFromInt32(Register dst,
2599 Register src, 2599 Register src,
2600 int num_least_bits) { 2600 int num_least_bits) {
2601 and_(dst, src, Operand((1 << num_least_bits) - 1)); 2601 and_(dst, src, Operand((1 << num_least_bits) - 1));
2602 } 2602 }
2603 2603
2604 2604
2605 void MacroAssembler::CallRuntime(const Runtime::Function* f, 2605 void MacroAssembler::CallRuntime(const Runtime::Function* f,
2606 int num_arguments) { 2606 int num_arguments,
2607 SaveFPRegsMode save_doubles) {
2607 // All parameters are on the stack. r0 has the return value after call. 2608 // All parameters are on the stack. r0 has the return value after call.
2608 2609
2609 // If the expected number of arguments of the runtime function is 2610 // If the expected number of arguments of the runtime function is
2610 // constant, we check that the actual number of arguments match the 2611 // constant, we check that the actual number of arguments match the
2611 // expectation. 2612 // expectation.
2612 if (f->nargs >= 0 && f->nargs != num_arguments) { 2613 if (f->nargs >= 0 && f->nargs != num_arguments) {
2613 IllegalOperation(num_arguments); 2614 IllegalOperation(num_arguments);
2614 return; 2615 return;
2615 } 2616 }
2616 2617
2617 // TODO(1236192): Most runtime routines don't need the number of 2618 // TODO(1236192): Most runtime routines don't need the number of
2618 // arguments passed in because it is constant. At some point we 2619 // arguments passed in because it is constant. At some point we
2619 // should remove this need and make the runtime routine entry code 2620 // should remove this need and make the runtime routine entry code
2620 // smarter. 2621 // smarter.
2621 mov(r0, Operand(num_arguments)); 2622 mov(r0, Operand(num_arguments));
2622 mov(r1, Operand(ExternalReference(f, isolate()))); 2623 mov(r1, Operand(ExternalReference(f, isolate())));
2623 CEntryStub stub(1); 2624 CEntryStub stub(1, save_doubles);
2624 CallStub(&stub); 2625 CallStub(&stub);
2625 } 2626 }
2626 2627
2627 2628
2628 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) { 2629 void MacroAssembler::CallRuntime(Runtime::FunctionId fid,
2629 CallRuntime(Runtime::FunctionForId(fid), num_arguments); 2630 int num_arguments,
2631 SaveFPRegsMode save_doubles) {
2632 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
2630 } 2633 }
2631 2634
2632 2635
2633 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { 2636 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) {
2634 const Runtime::Function* function = Runtime::FunctionForId(id); 2637 const Runtime::Function* function = Runtime::FunctionForId(id);
2635 mov(r0, Operand(function->nargs)); 2638 mov(r0, Operand(function->nargs));
2636 mov(r1, Operand(ExternalReference(function, isolate()))); 2639 mov(r1, Operand(ExternalReference(function, isolate())));
2637 CEntryStub stub(1, kSaveFPRegs); 2640 CEntryStub stub(1, kSaveFPRegs);
2638 CallStub(&stub); 2641 CallStub(&stub);
2639 } 2642 }
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
3884 void CodePatcher::EmitCondition(Condition cond) { 3887 void CodePatcher::EmitCondition(Condition cond) {
3885 Instr instr = Assembler::instr_at(masm_.pc_); 3888 Instr instr = Assembler::instr_at(masm_.pc_);
3886 instr = (instr & ~kCondMask) | cond; 3889 instr = (instr & ~kCondMask) | cond;
3887 masm_.emit(instr); 3890 masm_.emit(instr);
3888 } 3891 }
3889 3892
3890 3893
3891 } } // namespace v8::internal 3894 } } // namespace v8::internal
3892 3895
3893 #endif // V8_TARGET_ARCH_ARM 3896 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698