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

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

Issue 1053143005: Collect type feedback on result of Math.[round|ceil|floor] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: MIPS port Created 5 years, 7 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/math-ceil-minus-zero.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 727
728 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { 728 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
729 DCHECK(!target.is(rdi)); 729 DCHECK(!target.is(rdi));
730 // Load the JavaScript builtin function from the builtins object. 730 // Load the JavaScript builtin function from the builtins object.
731 GetBuiltinFunction(rdi, id); 731 GetBuiltinFunction(rdi, id);
732 movp(target, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); 732 movp(target, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
733 } 733 }
734 734
735 735
736 void MacroAssembler::BranchIfNotBuiltin(Register function, Register temp,
737 BuiltinFunctionId id, Label* miss) {
738 movp(temp, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset));
739 movp(temp, FieldOperand(temp, SharedFunctionInfo::kFunctionDataOffset));
740 Cmp(temp, Smi::FromInt(id));
741 j(not_equal, miss);
742 }
743
744
736 #define REG(Name) { kRegister_ ## Name ## _Code } 745 #define REG(Name) { kRegister_ ## Name ## _Code }
737 746
738 static const Register saved_regs[] = { 747 static const Register saved_regs[] = {
739 REG(rax), REG(rcx), REG(rdx), REG(rbx), REG(rbp), REG(rsi), REG(rdi), REG(r8), 748 REG(rax), REG(rcx), REG(rdx), REG(rbx), REG(rbp), REG(rsi), REG(rdi), REG(r8),
740 REG(r9), REG(r10), REG(r11) 749 REG(r9), REG(r10), REG(r11)
741 }; 750 };
742 751
743 #undef REG 752 #undef REG
744 753
745 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); 754 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register);
(...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5099 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5091 movl(rax, dividend); 5100 movl(rax, dividend);
5092 shrl(rax, Immediate(31)); 5101 shrl(rax, Immediate(31));
5093 addl(rdx, rax); 5102 addl(rdx, rax);
5094 } 5103 }
5095 5104
5096 5105
5097 } } // namespace v8::internal 5106 } } // namespace v8::internal
5098 5107
5099 #endif // V8_TARGET_ARCH_X64 5108 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/math-ceil-minus-zero.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698