| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 | 1532 |
| 1533 | 1533 |
| 1534 void MacroAssembler::CompareInstanceType(Register map, | 1534 void MacroAssembler::CompareInstanceType(Register map, |
| 1535 Register type_reg, | 1535 Register type_reg, |
| 1536 InstanceType type) { | 1536 InstanceType type) { |
| 1537 ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 1537 ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 1538 cmp(type_reg, Operand(type)); | 1538 cmp(type_reg, Operand(type)); |
| 1539 } | 1539 } |
| 1540 | 1540 |
| 1541 | 1541 |
| 1542 void MacroAssembler::CompareRoot(Register obj, |
| 1543 Heap::RootListIndex index) { |
| 1544 ASSERT(!obj.is(ip)); |
| 1545 LoadRoot(ip, index); |
| 1546 cmp(obj, ip); |
| 1547 } |
| 1548 |
| 1549 |
| 1542 void MacroAssembler::CheckMap(Register obj, | 1550 void MacroAssembler::CheckMap(Register obj, |
| 1543 Register scratch, | 1551 Register scratch, |
| 1544 Handle<Map> map, | 1552 Handle<Map> map, |
| 1545 Label* fail, | 1553 Label* fail, |
| 1546 bool is_heap_object) { | 1554 bool is_heap_object) { |
| 1547 if (!is_heap_object) { | 1555 if (!is_heap_object) { |
| 1548 JumpIfSmi(obj, fail); | 1556 JumpIfSmi(obj, fail); |
| 1549 } | 1557 } |
| 1550 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 1558 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
| 1551 mov(ip, Operand(map)); | 1559 mov(ip, Operand(map)); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE); | 2346 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE); |
| 2339 pop(object); | 2347 pop(object); |
| 2340 Assert(lo, "Operand is not a string"); | 2348 Assert(lo, "Operand is not a string"); |
| 2341 } | 2349 } |
| 2342 | 2350 |
| 2343 | 2351 |
| 2344 | 2352 |
| 2345 void MacroAssembler::AbortIfNotRootValue(Register src, | 2353 void MacroAssembler::AbortIfNotRootValue(Register src, |
| 2346 Heap::RootListIndex root_value_index, | 2354 Heap::RootListIndex root_value_index, |
| 2347 const char* message) { | 2355 const char* message) { |
| 2348 ASSERT(!src.is(ip)); | 2356 CompareRoot(src, root_value_index); |
| 2349 LoadRoot(ip, root_value_index); | |
| 2350 cmp(src, ip); | |
| 2351 Assert(eq, message); | 2357 Assert(eq, message); |
| 2352 } | 2358 } |
| 2353 | 2359 |
| 2354 | 2360 |
| 2355 void MacroAssembler::JumpIfNotHeapNumber(Register object, | 2361 void MacroAssembler::JumpIfNotHeapNumber(Register object, |
| 2356 Register heap_number_map, | 2362 Register heap_number_map, |
| 2357 Register scratch, | 2363 Register scratch, |
| 2358 Label* on_not_heap_number) { | 2364 Label* on_not_heap_number) { |
| 2359 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2365 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2360 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); | 2366 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2732 void CodePatcher::EmitCondition(Condition cond) { | 2738 void CodePatcher::EmitCondition(Condition cond) { |
| 2733 Instr instr = Assembler::instr_at(masm_.pc_); | 2739 Instr instr = Assembler::instr_at(masm_.pc_); |
| 2734 instr = (instr & ~kCondMask) | cond; | 2740 instr = (instr & ~kCondMask) | cond; |
| 2735 masm_.emit(instr); | 2741 masm_.emit(instr); |
| 2736 } | 2742 } |
| 2737 | 2743 |
| 2738 | 2744 |
| 2739 } } // namespace v8::internal | 2745 } } // namespace v8::internal |
| 2740 | 2746 |
| 2741 #endif // V8_TARGET_ARCH_ARM | 2747 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |