Chromium Code Reviews| 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 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1669 | 1669 |
| 1670 | 1670 |
| 1671 void MacroAssembler::CompareRoot(Register obj, | 1671 void MacroAssembler::CompareRoot(Register obj, |
| 1672 Heap::RootListIndex index) { | 1672 Heap::RootListIndex index) { |
| 1673 ASSERT(!obj.is(ip)); | 1673 ASSERT(!obj.is(ip)); |
| 1674 LoadRoot(ip, index); | 1674 LoadRoot(ip, index); |
| 1675 cmp(obj, ip); | 1675 cmp(obj, ip); |
| 1676 } | 1676 } |
| 1677 | 1677 |
| 1678 | 1678 |
| 1679 void MacroAssembler::CheckFastElements(Register map, | |
| 1680 Register scratch, | |
| 1681 Label* fail) { | |
| 1682 ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | |
| 1683 cmp(scratch, Operand(Map::kMaximumBitField2FastElementValue)); | |
|
Mads Ager (chromium)
2011/05/30 11:14:24
Can we add some sort of STATIC_ASSERT here that wi
danno
2011/06/01 22:29:54
Done.
| |
| 1684 b(hi, fail); | |
| 1685 } | |
| 1686 | |
| 1687 | |
| 1679 void MacroAssembler::CheckMap(Register obj, | 1688 void MacroAssembler::CheckMap(Register obj, |
| 1680 Register scratch, | 1689 Register scratch, |
| 1681 Handle<Map> map, | 1690 Handle<Map> map, |
| 1682 Label* fail, | 1691 Label* fail, |
| 1683 SmiCheckType smi_check_type) { | 1692 SmiCheckType smi_check_type) { |
| 1684 if (smi_check_type == DO_SMI_CHECK) { | 1693 if (smi_check_type == DO_SMI_CHECK) { |
| 1685 JumpIfSmi(obj, fail); | 1694 JumpIfSmi(obj, fail); |
| 1686 } | 1695 } |
| 1687 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 1696 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
| 1688 mov(ip, Operand(map)); | 1697 mov(ip, Operand(map)); |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3154 void CodePatcher::EmitCondition(Condition cond) { | 3163 void CodePatcher::EmitCondition(Condition cond) { |
| 3155 Instr instr = Assembler::instr_at(masm_.pc_); | 3164 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3156 instr = (instr & ~kCondMask) | cond; | 3165 instr = (instr & ~kCondMask) | cond; |
| 3157 masm_.emit(instr); | 3166 masm_.emit(instr); |
| 3158 } | 3167 } |
| 3159 | 3168 |
| 3160 | 3169 |
| 3161 } } // namespace v8::internal | 3170 } } // namespace v8::internal |
| 3162 | 3171 |
| 3163 #endif // V8_TARGET_ARCH_ARM | 3172 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |