| OLD | NEW |
| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 | 928 |
| 929 void MacroAssembler::Store(const Operand& dst, Register src, Representation r) { | 929 void MacroAssembler::Store(const Operand& dst, Register src, Representation r) { |
| 930 ASSERT(!r.IsDouble()); | 930 ASSERT(!r.IsDouble()); |
| 931 if (r.IsInteger8() || r.IsUInteger8()) { | 931 if (r.IsInteger8() || r.IsUInteger8()) { |
| 932 movb(dst, src); | 932 movb(dst, src); |
| 933 } else if (r.IsInteger16() || r.IsUInteger16()) { | 933 } else if (r.IsInteger16() || r.IsUInteger16()) { |
| 934 movw(dst, src); | 934 movw(dst, src); |
| 935 } else if (r.IsInteger32()) { | 935 } else if (r.IsInteger32()) { |
| 936 movl(dst, src); | 936 movl(dst, src); |
| 937 } else { | 937 } else { |
| 938 if (r.IsHeapObject()) { |
| 939 AssertNotSmi(src); |
| 940 } else if (r.IsSmi()) { |
| 941 AssertSmi(src); |
| 942 } |
| 938 movp(dst, src); | 943 movp(dst, src); |
| 939 } | 944 } |
| 940 } | 945 } |
| 941 | 946 |
| 942 | 947 |
| 943 void MacroAssembler::Set(Register dst, int64_t x) { | 948 void MacroAssembler::Set(Register dst, int64_t x) { |
| 944 if (x == 0) { | 949 if (x == 0) { |
| 945 xorl(dst, dst); | 950 xorl(dst, dst); |
| 946 } else if (is_uint32(x)) { | 951 } else if (is_uint32(x)) { |
| 947 movl(dst, Immediate(static_cast<uint32_t>(x))); | 952 movl(dst, Immediate(static_cast<uint32_t>(x))); |
| (...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5246 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); | 5251 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); |
| 5247 movl(rax, dividend); | 5252 movl(rax, dividend); |
| 5248 shrl(rax, Immediate(31)); | 5253 shrl(rax, Immediate(31)); |
| 5249 addl(rdx, rax); | 5254 addl(rdx, rax); |
| 5250 } | 5255 } |
| 5251 | 5256 |
| 5252 | 5257 |
| 5253 } } // namespace v8::internal | 5258 } } // namespace v8::internal |
| 5254 | 5259 |
| 5255 #endif // V8_TARGET_ARCH_X64 | 5260 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |