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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 void MacroAssembler::Store(Register src, const Operand& dst, Representation r) { | 51 void MacroAssembler::Store(Register src, const Operand& dst, Representation r) { |
52 ASSERT(!r.IsDouble()); | 52 ASSERT(!r.IsDouble()); |
53 if (r.IsInteger8() || r.IsUInteger8()) { | 53 if (r.IsInteger8() || r.IsUInteger8()) { |
54 mov_b(dst, src); | 54 mov_b(dst, src); |
55 } else if (r.IsInteger16() || r.IsUInteger16()) { | 55 } else if (r.IsInteger16() || r.IsUInteger16()) { |
56 mov_w(dst, src); | 56 mov_w(dst, src); |
57 } else { | 57 } else { |
| 58 if (r.IsHeapObject()) { |
| 59 AssertNotSmi(src); |
| 60 } else if (r.IsSmi()) { |
| 61 AssertSmi(src); |
| 62 } |
58 mov(dst, src); | 63 mov(dst, src); |
59 } | 64 } |
60 } | 65 } |
61 | 66 |
62 | 67 |
63 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { | 68 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { |
64 if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { | 69 if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { |
65 Handle<Object> value(&isolate()->heap()->roots_array_start()[index]); | 70 Handle<Object> value(&isolate()->heap()->roots_array_start()[index]); |
66 mov(destination, value); | 71 mov(destination, value); |
67 return; | 72 return; |
(...skipping 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3438 if (ms.shift() > 0) sar(edx, ms.shift()); | 3443 if (ms.shift() > 0) sar(edx, ms.shift()); |
3439 mov(eax, dividend); | 3444 mov(eax, dividend); |
3440 shr(eax, 31); | 3445 shr(eax, 31); |
3441 add(edx, eax); | 3446 add(edx, eax); |
3442 } | 3447 } |
3443 | 3448 |
3444 | 3449 |
3445 } } // namespace v8::internal | 3450 } } // namespace v8::internal |
3446 | 3451 |
3447 #endif // V8_TARGET_ARCH_IA32 | 3452 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |