OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 Jump(ip); | 43 Jump(ip); |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, | 47 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, |
48 Condition cond, CRegister cr) { | 48 Condition cond, CRegister cr) { |
49 Label skip; | 49 Label skip; |
50 | 50 |
51 if (cond != al) b(NegateCondition(cond), &skip, cr); | 51 if (cond != al) b(NegateCondition(cond), &skip, cr); |
52 | 52 |
53 DCHECK(rmode == RelocInfo::CODE_TARGET || rmode == RelocInfo::RUNTIME_ENTRY || | 53 DCHECK(rmode == RelocInfo::CODE_TARGET || rmode == RelocInfo::RUNTIME_ENTRY); |
54 rmode == RelocInfo::CODE_TARGET); | |
55 | 54 |
56 mov(ip, Operand(target, rmode)); | 55 mov(ip, Operand(target, rmode)); |
57 mtctr(ip); | 56 mtctr(ip); |
58 bctr(); | 57 bctr(); |
59 | 58 |
60 bind(&skip); | 59 bind(&skip); |
61 } | 60 } |
62 | 61 |
63 | 62 |
64 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, Condition cond, | 63 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, Condition cond, |
(...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4409 } | 4408 } |
4410 if (mag.shift > 0) srawi(result, result, mag.shift); | 4409 if (mag.shift > 0) srawi(result, result, mag.shift); |
4411 ExtractBit(r0, dividend, 31); | 4410 ExtractBit(r0, dividend, 31); |
4412 add(result, result, r0); | 4411 add(result, result, r0); |
4413 } | 4412 } |
4414 | 4413 |
4415 } // namespace internal | 4414 } // namespace internal |
4416 } // namespace v8 | 4415 } // namespace v8 |
4417 | 4416 |
4418 #endif // V8_TARGET_ARCH_PPC | 4417 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |