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