OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 CpuFeatures::Scope scope(VFP3); | 1986 CpuFeatures::Scope scope(VFP3); |
1987 vstr(d0, scratch1, 0); | 1987 vstr(d0, scratch1, 0); |
1988 } else { | 1988 } else { |
1989 str(mantissa_reg, MemOperand(scratch1, 0)); | 1989 str(mantissa_reg, MemOperand(scratch1, 0)); |
1990 str(exponent_reg, MemOperand(scratch1, Register::kSizeInBytes)); | 1990 str(exponent_reg, MemOperand(scratch1, Register::kSizeInBytes)); |
1991 } | 1991 } |
1992 bind(&done); | 1992 bind(&done); |
1993 } | 1993 } |
1994 | 1994 |
1995 | 1995 |
| 1996 void MacroAssembler::CompareMap(Register obj, |
| 1997 Register scratch, |
| 1998 Handle<Map> map, |
| 1999 Label* early_success, |
| 2000 CompareMapMode mode) { |
| 2001 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
| 2002 cmp(scratch, Operand(map)); |
| 2003 if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) { |
| 2004 Map* transitioned_fast_element_map( |
| 2005 map->LookupElementsTransitionMap(FAST_ELEMENTS, NULL)); |
| 2006 ASSERT(transitioned_fast_element_map == NULL || |
| 2007 map->elements_kind() != FAST_ELEMENTS); |
| 2008 if (transitioned_fast_element_map != NULL) { |
| 2009 b(eq, early_success); |
| 2010 cmp(scratch, Operand(Handle<Map>(transitioned_fast_element_map))); |
| 2011 } |
| 2012 |
| 2013 Map* transitioned_double_map( |
| 2014 map->LookupElementsTransitionMap(FAST_DOUBLE_ELEMENTS, NULL)); |
| 2015 ASSERT(transitioned_double_map == NULL || |
| 2016 map->elements_kind() == FAST_SMI_ONLY_ELEMENTS); |
| 2017 if (transitioned_double_map != NULL) { |
| 2018 b(eq, early_success); |
| 2019 cmp(scratch, Operand(Handle<Map>(transitioned_double_map))); |
| 2020 } |
| 2021 } |
| 2022 } |
| 2023 |
| 2024 |
1996 void MacroAssembler::CheckMap(Register obj, | 2025 void MacroAssembler::CheckMap(Register obj, |
1997 Register scratch, | 2026 Register scratch, |
1998 Handle<Map> map, | 2027 Handle<Map> map, |
1999 Label* fail, | 2028 Label* fail, |
2000 SmiCheckType smi_check_type) { | 2029 SmiCheckType smi_check_type, |
| 2030 CompareMapMode mode) { |
2001 if (smi_check_type == DO_SMI_CHECK) { | 2031 if (smi_check_type == DO_SMI_CHECK) { |
2002 JumpIfSmi(obj, fail); | 2032 JumpIfSmi(obj, fail); |
2003 } | 2033 } |
2004 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2034 |
2005 mov(ip, Operand(map)); | 2035 Label success; |
2006 cmp(scratch, ip); | 2036 CompareMap(obj, scratch, map, &success, mode); |
2007 b(ne, fail); | 2037 b(ne, fail); |
| 2038 bind(&success); |
2008 } | 2039 } |
2009 | 2040 |
2010 | 2041 |
2011 void MacroAssembler::CheckMap(Register obj, | 2042 void MacroAssembler::CheckMap(Register obj, |
2012 Register scratch, | 2043 Register scratch, |
2013 Heap::RootListIndex index, | 2044 Heap::RootListIndex index, |
2014 Label* fail, | 2045 Label* fail, |
2015 SmiCheckType smi_check_type) { | 2046 SmiCheckType smi_check_type) { |
2016 if (smi_check_type == DO_SMI_CHECK) { | 2047 if (smi_check_type == DO_SMI_CHECK) { |
2017 JumpIfSmi(obj, fail); | 2048 JumpIfSmi(obj, fail); |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3626 void CodePatcher::EmitCondition(Condition cond) { | 3657 void CodePatcher::EmitCondition(Condition cond) { |
3627 Instr instr = Assembler::instr_at(masm_.pc_); | 3658 Instr instr = Assembler::instr_at(masm_.pc_); |
3628 instr = (instr & ~kCondMask) | cond; | 3659 instr = (instr & ~kCondMask) | cond; |
3629 masm_.emit(instr); | 3660 masm_.emit(instr); |
3630 } | 3661 } |
3631 | 3662 |
3632 | 3663 |
3633 } } // namespace v8::internal | 3664 } } // namespace v8::internal |
3634 | 3665 |
3635 #endif // V8_TARGET_ARCH_ARM | 3666 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |