| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 Jump(ip); | 42 Jump(ip); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, | 46 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, |
| 47 Condition cond, CRegister cr) { | 47 Condition cond, CRegister cr) { |
| 48 Label skip; | 48 Label skip; |
| 49 | 49 |
| 50 if (cond != al) b(NegateCondition(cond), &skip, cr); | 50 if (cond != al) b(NegateCondition(cond), &skip, cr); |
| 51 | 51 |
| 52 DCHECK(rmode == RelocInfo::CODE_TARGET || rmode == RelocInfo::RUNTIME_ENTRY); | 52 DCHECK(rmode == RelocInfo::CODE_TARGET || rmode == RelocInfo::RUNTIME_ENTRY || |
| 53 rmode == RelocInfo::CONSTRUCT_CALL); |
| 53 | 54 |
| 54 mov(ip, Operand(target, rmode)); | 55 mov(ip, Operand(target, rmode)); |
| 55 mtctr(ip); | 56 mtctr(ip); |
| 56 bctr(); | 57 bctr(); |
| 57 | 58 |
| 58 bind(&skip); | 59 bind(&skip); |
| 59 } | 60 } |
| 60 | 61 |
| 61 | 62 |
| 62 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, Condition cond, | 63 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, Condition cond, |
| (...skipping 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4387 } | 4388 } |
| 4388 if (mag.shift > 0) srawi(result, result, mag.shift); | 4389 if (mag.shift > 0) srawi(result, result, mag.shift); |
| 4389 ExtractBit(r0, dividend, 31); | 4390 ExtractBit(r0, dividend, 31); |
| 4390 add(result, result, r0); | 4391 add(result, result, r0); |
| 4391 } | 4392 } |
| 4392 | 4393 |
| 4393 } // namespace internal | 4394 } // namespace internal |
| 4394 } // namespace v8 | 4395 } // namespace v8 |
| 4395 | 4396 |
| 4396 #endif // V8_TARGET_ARCH_PPC | 4397 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |