| 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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, | 1116 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
| 1117 const ParameterCount& expected, | 1117 const ParameterCount& expected, |
| 1118 const ParameterCount& actual, | 1118 const ParameterCount& actual, |
| 1119 InvokeFlag flag, | 1119 InvokeFlag flag, |
| 1120 const CallWrapper& call_wrapper) { | 1120 const CallWrapper& call_wrapper) { |
| 1121 Move(r4, function); | 1121 Move(r4, function); |
| 1122 InvokeFunction(r4, expected, actual, flag, call_wrapper); | 1122 InvokeFunction(r4, expected, actual, flag, call_wrapper); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 | 1125 |
| 1126 void MacroAssembler::IsObjectJSObjectType(Register heap_object, Register map, | |
| 1127 Register scratch, Label* fail) { | |
| 1128 LoadP(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); | |
| 1129 IsInstanceJSObjectType(map, scratch, fail); | |
| 1130 } | |
| 1131 | |
| 1132 | |
| 1133 void MacroAssembler::IsInstanceJSObjectType(Register map, Register scratch, | |
| 1134 Label* fail) { | |
| 1135 lbz(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | |
| 1136 cmpi(scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
| 1137 blt(fail); | |
| 1138 cmpi(scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
| 1139 bgt(fail); | |
| 1140 } | |
| 1141 | |
| 1142 | |
| 1143 void MacroAssembler::IsObjectJSStringType(Register object, Register scratch, | 1126 void MacroAssembler::IsObjectJSStringType(Register object, Register scratch, |
| 1144 Label* fail) { | 1127 Label* fail) { |
| 1145 DCHECK(kNotStringTag != 0); | 1128 DCHECK(kNotStringTag != 0); |
| 1146 | 1129 |
| 1147 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 1130 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 1148 lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); | 1131 lbz(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
| 1149 andi(r0, scratch, Operand(kIsNotStringMask)); | 1132 andi(r0, scratch, Operand(kIsNotStringMask)); |
| 1150 bne(fail, cr0); | 1133 bne(fail, cr0); |
| 1151 } | 1134 } |
| 1152 | 1135 |
| (...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4426 } | 4409 } |
| 4427 if (mag.shift > 0) srawi(result, result, mag.shift); | 4410 if (mag.shift > 0) srawi(result, result, mag.shift); |
| 4428 ExtractBit(r0, dividend, 31); | 4411 ExtractBit(r0, dividend, 31); |
| 4429 add(result, result, r0); | 4412 add(result, result, r0); |
| 4430 } | 4413 } |
| 4431 | 4414 |
| 4432 } // namespace internal | 4415 } // namespace internal |
| 4433 } // namespace v8 | 4416 } // namespace v8 |
| 4434 | 4417 |
| 4435 #endif // V8_TARGET_ARCH_PPC | 4418 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |