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 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 Register scratch, | 1860 Register scratch, |
1861 Label* fail) { | 1861 Label* fail) { |
1862 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); | 1862 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
1863 STATIC_ASSERT(FAST_ELEMENTS == 1); | 1863 STATIC_ASSERT(FAST_ELEMENTS == 1); |
1864 ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset)); | 1864 ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset)); |
1865 cmp(scratch, Operand(Map::kMaximumBitField2FastElementValue)); | 1865 cmp(scratch, Operand(Map::kMaximumBitField2FastElementValue)); |
1866 b(hi, fail); | 1866 b(hi, fail); |
1867 } | 1867 } |
1868 | 1868 |
1869 | 1869 |
| 1870 void MacroAssembler::CheckFastObjectElements(Register map, |
| 1871 Register scratch, |
| 1872 Label* fail) { |
| 1873 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 1874 STATIC_ASSERT(FAST_ELEMENTS == 1); |
| 1875 ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset)); |
| 1876 cmp(scratch, Operand(Map::kMaximumBitField2FastSmiOnlyElementValue)); |
| 1877 b(ls, fail); |
| 1878 cmp(scratch, Operand(Map::kMaximumBitField2FastElementValue)); |
| 1879 b(hi, fail); |
| 1880 } |
| 1881 |
| 1882 |
| 1883 void MacroAssembler::CheckFastSmiOnlyElements(Register map, |
| 1884 Register scratch, |
| 1885 Label* fail) { |
| 1886 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 1887 ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset)); |
| 1888 cmp(scratch, Operand(Map::kMaximumBitField2FastSmiOnlyElementValue)); |
| 1889 b(hi, fail); |
| 1890 } |
| 1891 |
| 1892 |
1870 void MacroAssembler::CheckMap(Register obj, | 1893 void MacroAssembler::CheckMap(Register obj, |
1871 Register scratch, | 1894 Register scratch, |
1872 Handle<Map> map, | 1895 Handle<Map> map, |
1873 Label* fail, | 1896 Label* fail, |
1874 SmiCheckType smi_check_type) { | 1897 SmiCheckType smi_check_type) { |
1875 if (smi_check_type == DO_SMI_CHECK) { | 1898 if (smi_check_type == DO_SMI_CHECK) { |
1876 JumpIfSmi(obj, fail); | 1899 JumpIfSmi(obj, fail); |
1877 } | 1900 } |
1878 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 1901 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
1879 mov(ip, Operand(map)); | 1902 mov(ip, Operand(map)); |
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3553 void CodePatcher::EmitCondition(Condition cond) { | 3576 void CodePatcher::EmitCondition(Condition cond) { |
3554 Instr instr = Assembler::instr_at(masm_.pc_); | 3577 Instr instr = Assembler::instr_at(masm_.pc_); |
3555 instr = (instr & ~kCondMask) | cond; | 3578 instr = (instr & ~kCondMask) | cond; |
3556 masm_.emit(instr); | 3579 masm_.emit(instr); |
3557 } | 3580 } |
3558 | 3581 |
3559 | 3582 |
3560 } } // namespace v8::internal | 3583 } } // namespace v8::internal |
3561 | 3584 |
3562 #endif // V8_TARGET_ARCH_ARM | 3585 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |