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 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 __ ldm(ia_w, sp, fp.bit() | lr.bit()); | 2200 __ ldm(ia_w, sp, fp.bit() | lr.bit()); |
2201 __ add(sp, sp, Operand(sp_delta)); | 2201 __ add(sp, sp, Operand(sp_delta)); |
2202 __ Jump(lr); | 2202 __ Jump(lr); |
2203 } | 2203 } |
2204 | 2204 |
2205 | 2205 |
2206 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2206 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
2207 Register result = ToRegister(instr->result()); | 2207 Register result = ToRegister(instr->result()); |
2208 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2208 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
2209 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); | 2209 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); |
2210 if (instr->hydrogen()->check_hole_value()) { | 2210 if (instr->hydrogen()->RequiresHoleCheck()) { |
2211 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2211 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
2212 __ cmp(result, ip); | 2212 __ cmp(result, ip); |
2213 DeoptimizeIf(eq, instr->environment()); | 2213 DeoptimizeIf(eq, instr->environment()); |
2214 } | 2214 } |
2215 } | 2215 } |
2216 | 2216 |
2217 | 2217 |
2218 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2218 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2219 ASSERT(ToRegister(instr->global_object()).is(r0)); | 2219 ASSERT(ToRegister(instr->global_object()).is(r0)); |
2220 ASSERT(ToRegister(instr->result()).is(r0)); | 2220 ASSERT(ToRegister(instr->result()).is(r0)); |
(...skipping 11 matching lines...) Expand all Loading... |
2232 Register scratch = scratch0(); | 2232 Register scratch = scratch0(); |
2233 Register scratch2 = ToRegister(instr->TempAt(0)); | 2233 Register scratch2 = ToRegister(instr->TempAt(0)); |
2234 | 2234 |
2235 // Load the cell. | 2235 // Load the cell. |
2236 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2236 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
2237 | 2237 |
2238 // If the cell we are storing to contains the hole it could have | 2238 // If the cell we are storing to contains the hole it could have |
2239 // been deleted from the property dictionary. In that case, we need | 2239 // been deleted from the property dictionary. In that case, we need |
2240 // to update the property details in the property dictionary to mark | 2240 // to update the property details in the property dictionary to mark |
2241 // it as no longer deleted. | 2241 // it as no longer deleted. |
2242 if (instr->hydrogen()->check_hole_value()) { | 2242 if (instr->hydrogen()->RequiresHoleCheck()) { |
2243 __ ldr(scratch2, | 2243 __ ldr(scratch2, |
2244 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2244 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
2245 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2245 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
2246 __ cmp(scratch2, ip); | 2246 __ cmp(scratch2, ip); |
2247 DeoptimizeIf(eq, instr->environment()); | 2247 DeoptimizeIf(eq, instr->environment()); |
2248 } | 2248 } |
2249 | 2249 |
2250 // Store the value. | 2250 // Store the value. |
2251 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2251 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
2252 | 2252 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2534 Operand operand = key_is_constant | 2534 Operand operand = key_is_constant |
2535 ? Operand(constant_key * (1 << shift_size) + | 2535 ? Operand(constant_key * (1 << shift_size) + |
2536 FixedDoubleArray::kHeaderSize - kHeapObjectTag) | 2536 FixedDoubleArray::kHeaderSize - kHeapObjectTag) |
2537 : Operand(key, LSL, shift_size); | 2537 : Operand(key, LSL, shift_size); |
2538 __ add(elements, elements, operand); | 2538 __ add(elements, elements, operand); |
2539 if (!key_is_constant) { | 2539 if (!key_is_constant) { |
2540 __ add(elements, elements, | 2540 __ add(elements, elements, |
2541 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); | 2541 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); |
2542 } | 2542 } |
2543 | 2543 |
2544 if (instr->hydrogen()->RequiresHoleCheck()) { | 2544 __ ldr(scratch, MemOperand(elements, sizeof(kHoleNanLower32))); |
2545 // TODO(danno): If no hole check is required, there is no need to allocate | 2545 __ cmp(scratch, Operand(kHoleNanUpper32)); |
2546 // elements into a temporary register, instead scratch can be used. | 2546 DeoptimizeIf(eq, instr->environment()); |
2547 __ ldr(scratch, MemOperand(elements, sizeof(kHoleNanLower32))); | |
2548 __ cmp(scratch, Operand(kHoleNanUpper32)); | |
2549 DeoptimizeIf(eq, instr->environment()); | |
2550 } | |
2551 | 2547 |
2552 __ vldr(result, elements, 0); | 2548 __ vldr(result, elements, 0); |
2553 } | 2549 } |
2554 | 2550 |
2555 | 2551 |
2556 void LCodeGen::DoLoadKeyedSpecializedArrayElement( | 2552 void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
2557 LLoadKeyedSpecializedArrayElement* instr) { | 2553 LLoadKeyedSpecializedArrayElement* instr) { |
2558 Register external_pointer = ToRegister(instr->external_pointer()); | 2554 Register external_pointer = ToRegister(instr->external_pointer()); |
2559 Register key = no_reg; | 2555 Register key = no_reg; |
2560 ElementsKind elements_kind = instr->elements_kind(); | 2556 ElementsKind elements_kind = instr->elements_kind(); |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4570 ASSERT(osr_pc_offset_ == -1); | 4566 ASSERT(osr_pc_offset_ == -1); |
4571 osr_pc_offset_ = masm()->pc_offset(); | 4567 osr_pc_offset_ = masm()->pc_offset(); |
4572 } | 4568 } |
4573 | 4569 |
4574 | 4570 |
4575 | 4571 |
4576 | 4572 |
4577 #undef __ | 4573 #undef __ |
4578 | 4574 |
4579 } } // namespace v8::internal | 4575 } } // namespace v8::internal |
OLD | NEW |