Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 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 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 // Subtract from 0 if source was negative. | 473 // Subtract from 0 if source was negative. |
| 474 __ rsb(source_, source_, Operand(0, RelocInfo::NONE), LeaveCC, ne); | 474 __ rsb(source_, source_, Operand(0, RelocInfo::NONE), LeaveCC, ne); |
| 475 | 475 |
| 476 // We have -1, 0 or 1, which we treat specially. Register source_ contains | 476 // We have -1, 0 or 1, which we treat specially. Register source_ contains |
| 477 // absolute value: it is either equal to 1 (special case of -1 and 1), | 477 // absolute value: it is either equal to 1 (special case of -1 and 1), |
| 478 // greater than 1 (not a special case) or less than 1 (special case of 0). | 478 // greater than 1 (not a special case) or less than 1 (special case of 0). |
| 479 __ cmp(source_, Operand(1)); | 479 __ cmp(source_, Operand(1)); |
| 480 __ b(gt, ¬_special); | 480 __ b(gt, ¬_special); |
| 481 | 481 |
| 482 // For 1 or -1 we need to or in the 0 exponent (biased to 1023). | 482 // For 1 or -1 we need to or in the 0 exponent (biased to 1023). |
| 483 static const uint32_t exponent_word_for_1 = | 483 const uint32_t exponent_word_for_1 = |
| 484 HeapNumber::kExponentBias << HeapNumber::kExponentShift; | 484 HeapNumber::kExponentBias << HeapNumber::kExponentShift; |
| 485 __ orr(exponent, exponent, Operand(exponent_word_for_1), LeaveCC, eq); | 485 __ orr(exponent, exponent, Operand(exponent_word_for_1), LeaveCC, eq); |
| 486 // 1, 0 and -1 all have 0 for the second word. | 486 // 1, 0 and -1 all have 0 for the second word. |
| 487 __ mov(mantissa, Operand(0, RelocInfo::NONE)); | 487 __ mov(mantissa, Operand(0, RelocInfo::NONE)); |
| 488 __ Ret(); | 488 __ Ret(); |
| 489 | 489 |
| 490 __ bind(¬_special); | 490 __ bind(¬_special); |
| 491 // Count leading zeros. Uses mantissa for a scratch register on pre-ARM5. | 491 // Count leading zeros. Uses mantissa for a scratch register on pre-ARM5. |
| 492 // Gets the wrong answer for 0, but we already checked for that case above. | 492 // Gets the wrong answer for 0, but we already checked for that case above. |
| 493 __ CountLeadingZeros(zeros_, source_, mantissa); | 493 __ CountLeadingZeros(zeros_, source_, mantissa); |
| (...skipping 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2724 void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { | 2724 void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { |
| 2725 ASSERT(operands_type_ == BinaryOpIC::INT32); | 2725 ASSERT(operands_type_ == BinaryOpIC::INT32); |
| 2726 | 2726 |
| 2727 Register left = r1; | 2727 Register left = r1; |
| 2728 Register right = r0; | 2728 Register right = r0; |
| 2729 Register scratch1 = r7; | 2729 Register scratch1 = r7; |
| 2730 Register scratch2 = r9; | 2730 Register scratch2 = r9; |
| 2731 DwVfpRegister double_scratch = d0; | 2731 DwVfpRegister double_scratch = d0; |
| 2732 SwVfpRegister single_scratch = s3; | 2732 SwVfpRegister single_scratch = s3; |
| 2733 | 2733 |
| 2734 Register heap_number_result = no_reg; | 2734 Register heap_number_result = Register::from_code(kRegisterNoneCode); |
| 2735 Register heap_number_map = r6; | 2735 Register heap_number_map = r6; |
| 2736 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); | 2736 __ LoadRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
| 2737 | 2737 |
| 2738 Label call_runtime; | 2738 Label call_runtime; |
| 2739 // Labels for type transition, used for wrong input or output types. | 2739 // Labels for type transition, used for wrong input or output types. |
| 2740 // Both label are currently actually bound to the same position. We use two | 2740 // Both label are currently actually bound to the same position. We use two |
| 2741 // different label to differentiate the cause leading to type transition. | 2741 // different label to differentiate the cause leading to type transition. |
| 2742 Label transition; | 2742 Label transition; |
| 2743 | 2743 |
| 2744 // Smi-smi fast case. | 2744 // Smi-smi fast case. |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4125 __ ldr(scratch, MemOperand(scratch)); | 4125 __ ldr(scratch, MemOperand(scratch)); |
| 4126 __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 4126 __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 4127 } | 4127 } |
| 4128 | 4128 |
| 4129 // Register mapping: r3 is object map and r4 is function prototype. | 4129 // Register mapping: r3 is object map and r4 is function prototype. |
| 4130 // Get prototype of object into r2. | 4130 // Get prototype of object into r2. |
| 4131 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); | 4131 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); |
| 4132 | 4132 |
| 4133 // We don't need map any more. Use it as a scratch register. | 4133 // We don't need map any more. Use it as a scratch register. |
| 4134 Register scratch2 = map; | 4134 Register scratch2 = map; |
| 4135 map = no_reg; | 4135 map = Register::from_code(kRegisterNoneCode); |
| 4136 | 4136 |
| 4137 // Loop through the prototype chain looking for the function prototype. | 4137 // Loop through the prototype chain looking for the function prototype. |
| 4138 __ LoadRoot(scratch2, Heap::kNullValueRootIndex); | 4138 __ LoadRoot(scratch2, Heap::kNullValueRootIndex); |
| 4139 __ bind(&loop); | 4139 __ bind(&loop); |
| 4140 __ cmp(scratch, Operand(prototype)); | 4140 __ cmp(scratch, Operand(prototype)); |
| 4141 __ b(eq, &is_instance); | 4141 __ b(eq, &is_instance); |
| 4142 __ cmp(scratch, scratch2); | 4142 __ cmp(scratch, scratch2); |
| 4143 __ b(eq, &is_not_instance); | 4143 __ b(eq, &is_not_instance); |
| 4144 __ ldr(scratch, FieldMemOperand(scratch, HeapObject::kMapOffset)); | 4144 __ ldr(scratch, FieldMemOperand(scratch, HeapObject::kMapOffset)); |
| 4145 __ ldr(scratch, FieldMemOperand(scratch, Map::kPrototypeOffset)); | 4145 __ ldr(scratch, FieldMemOperand(scratch, Map::kPrototypeOffset)); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4230 | 4230 |
| 4231 Register InstanceofStub::left() { return r0; } | 4231 Register InstanceofStub::left() { return r0; } |
| 4232 | 4232 |
| 4233 | 4233 |
| 4234 Register InstanceofStub::right() { return r1; } | 4234 Register InstanceofStub::right() { return r1; } |
| 4235 | 4235 |
| 4236 | 4236 |
| 4237 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 4237 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
| 4238 // The displacement is the offset of the last parameter (if any) | 4238 // The displacement is the offset of the last parameter (if any) |
| 4239 // relative to the frame pointer. | 4239 // relative to the frame pointer. |
| 4240 static const int kDisplacement = | 4240 const int kDisplacement = |
| 4241 StandardFrameConstants::kCallerSPOffset - kPointerSize; | 4241 StandardFrameConstants::kCallerSPOffset - kPointerSize; |
| 4242 | 4242 |
| 4243 // Check that the key is a smi. | 4243 // Check that the key is a smi. |
| 4244 Label slow; | 4244 Label slow; |
| 4245 __ JumpIfNotSmi(r1, &slow); | 4245 __ JumpIfNotSmi(r1, &slow); |
| 4246 | 4246 |
| 4247 // Check if the calling frame is an arguments adaptor frame. | 4247 // Check if the calling frame is an arguments adaptor frame. |
| 4248 Label adaptor; | 4248 Label adaptor; |
| 4249 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 4249 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 4250 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | 4250 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4615 #ifdef V8_INTERPRETED_REGEXP | 4615 #ifdef V8_INTERPRETED_REGEXP |
| 4616 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 4616 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 4617 #else // V8_INTERPRETED_REGEXP | 4617 #else // V8_INTERPRETED_REGEXP |
| 4618 | 4618 |
| 4619 // Stack frame on entry. | 4619 // Stack frame on entry. |
| 4620 // sp[0]: last_match_info (expected JSArray) | 4620 // sp[0]: last_match_info (expected JSArray) |
| 4621 // sp[4]: previous index | 4621 // sp[4]: previous index |
| 4622 // sp[8]: subject string | 4622 // sp[8]: subject string |
| 4623 // sp[12]: JSRegExp object | 4623 // sp[12]: JSRegExp object |
| 4624 | 4624 |
| 4625 static const int kLastMatchInfoOffset = 0 * kPointerSize; | 4625 const int kLastMatchInfoOffset = 0 * kPointerSize; |
| 4626 static const int kPreviousIndexOffset = 1 * kPointerSize; | 4626 const int kPreviousIndexOffset = 1 * kPointerSize; |
| 4627 static const int kSubjectOffset = 2 * kPointerSize; | 4627 const int kSubjectOffset = 2 * kPointerSize; |
| 4628 static const int kJSRegExpOffset = 3 * kPointerSize; | 4628 const int kJSRegExpOffset = 3 * kPointerSize; |
| 4629 | 4629 |
| 4630 Label runtime, invoke_regexp; | 4630 Label runtime, invoke_regexp; |
| 4631 | 4631 |
| 4632 // Allocation of registers for this function. These are in callee save | 4632 // Allocation of registers for this function. These are in callee save |
| 4633 // registers and will be preserved by the call to the native RegExp code, as | 4633 // registers and will be preserved by the call to the native RegExp code, as |
| 4634 // this code is called using the normal C calling convention. When calling | 4634 // this code is called using the normal C calling convention. When calling |
| 4635 // directly from generated code the native RegExp code will not do a GC and | 4635 // directly from generated code the native RegExp code will not do a GC and |
| 4636 // therefore the content of these registers are safe to use after the call. | 4636 // therefore the content of these registers are safe to use after the call. |
| 4637 Register subject = r4; | 4637 Register subject = r4; |
| 4638 Register regexp_data = r5; | 4638 Register regexp_data = r5; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4817 | 4817 |
| 4818 // r1: previous index | 4818 // r1: previous index |
| 4819 // r3: encoding of subject string (1 if ASCII, 0 if two_byte); | 4819 // r3: encoding of subject string (1 if ASCII, 0 if two_byte); |
| 4820 // r7: code | 4820 // r7: code |
| 4821 // subject: Subject string | 4821 // subject: Subject string |
| 4822 // regexp_data: RegExp data (FixedArray) | 4822 // regexp_data: RegExp data (FixedArray) |
| 4823 // All checks done. Now push arguments for native regexp code. | 4823 // All checks done. Now push arguments for native regexp code. |
| 4824 __ IncrementCounter(isolate->counters()->regexp_entry_native(), 1, r0, r2); | 4824 __ IncrementCounter(isolate->counters()->regexp_entry_native(), 1, r0, r2); |
| 4825 | 4825 |
| 4826 // Isolates: note we add an additional parameter here (isolate pointer). | 4826 // Isolates: note we add an additional parameter here (isolate pointer). |
| 4827 static const int kRegExpExecuteArguments = 8; | 4827 const int kRegExpExecuteArguments = 8; |
| 4828 static const int kParameterRegisters = 4; | 4828 const int kParameterRegisters = 4; |
| 4829 __ EnterExitFrame(false, kRegExpExecuteArguments - kParameterRegisters); | 4829 __ EnterExitFrame(false, kRegExpExecuteArguments - kParameterRegisters); |
| 4830 | 4830 |
| 4831 // Stack pointer now points to cell where return address is to be written. | 4831 // Stack pointer now points to cell where return address is to be written. |
| 4832 // Arguments are before that on the stack or in registers. | 4832 // Arguments are before that on the stack or in registers. |
| 4833 | 4833 |
| 4834 // Argument 8 (sp[16]): Pass current isolate address. | 4834 // Argument 8 (sp[16]): Pass current isolate address. |
| 4835 __ mov(r0, Operand(ExternalReference::isolate_address())); | 4835 __ mov(r0, Operand(ExternalReference::isolate_address())); |
| 4836 __ str(r0, MemOperand(sp, 4 * kPointerSize)); | 4836 __ str(r0, MemOperand(sp, 4 * kPointerSize)); |
| 4837 | 4837 |
| 4838 // Argument 7 (sp[12]): Indicate that this is a direct call from JavaScript. | 4838 // Argument 7 (sp[12]): Indicate that this is a direct call from JavaScript. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4876 // Already there | 4876 // Already there |
| 4877 | 4877 |
| 4878 // Argument 1 (r0): Subject string. | 4878 // Argument 1 (r0): Subject string. |
| 4879 __ mov(r0, subject); | 4879 __ mov(r0, subject); |
| 4880 | 4880 |
| 4881 // Locate the code entry and call it. | 4881 // Locate the code entry and call it. |
| 4882 __ add(r7, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4882 __ add(r7, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 4883 DirectCEntryStub stub; | 4883 DirectCEntryStub stub; |
| 4884 stub.GenerateCall(masm, r7); | 4884 stub.GenerateCall(masm, r7); |
| 4885 | 4885 |
| 4886 __ LeaveExitFrame(false, no_reg); | 4886 __ LeaveExitFrame(false, Register::from_code(kRegisterNoneCode)); |
| 4887 | 4887 |
| 4888 // r0: result | 4888 // r0: result |
| 4889 // subject: subject string (callee saved) | 4889 // subject: subject string (callee saved) |
| 4890 // regexp_data: RegExp data (callee saved) | 4890 // regexp_data: RegExp data (callee saved) |
| 4891 // last_match_info_elements: Last match info elements (callee saved) | 4891 // last_match_info_elements: Last match info elements (callee saved) |
| 4892 | 4892 |
| 4893 // Check the result. | 4893 // Check the result. |
| 4894 Label success; | 4894 Label success; |
| 4895 | 4895 |
| 4896 __ cmp(r0, Operand(NativeRegExpMacroAssembler::SUCCESS)); | 4896 __ cmp(r0, Operand(NativeRegExpMacroAssembler::SUCCESS)); |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5707 // Registers | 5707 // Registers |
| 5708 // chars: two character string, char 1 in byte 0 and char 2 in byte 1. | 5708 // chars: two character string, char 1 in byte 0 and char 2 in byte 1. |
| 5709 // hash: hash of two character string | 5709 // hash: hash of two character string |
| 5710 // mask: capacity mask | 5710 // mask: capacity mask |
| 5711 // first_symbol_table_element: address of the first element of | 5711 // first_symbol_table_element: address of the first element of |
| 5712 // the symbol table | 5712 // the symbol table |
| 5713 // undefined: the undefined object | 5713 // undefined: the undefined object |
| 5714 // scratch: - | 5714 // scratch: - |
| 5715 | 5715 |
| 5716 // Perform a number of probes in the symbol table. | 5716 // Perform a number of probes in the symbol table. |
| 5717 static const int kProbes = 4; | 5717 const int kProbes = 4; |
| 5718 Label found_in_symbol_table; | 5718 Label found_in_symbol_table; |
| 5719 Label next_probe[kProbes]; | 5719 Label next_probe[kProbes]; |
| 5720 Register candidate = scratch5; // Scratch register contains candidate. | 5720 Register candidate = scratch5; // Scratch register contains candidate. |
| 5721 for (int i = 0; i < kProbes; i++) { | 5721 for (int i = 0; i < kProbes; i++) { |
| 5722 // Calculate entry in symbol table. | 5722 // Calculate entry in symbol table. |
| 5723 if (i > 0) { | 5723 if (i > 0) { |
| 5724 __ add(candidate, hash, Operand(SymbolTable::GetProbeOffset(i))); | 5724 __ add(candidate, hash, Operand(SymbolTable::GetProbeOffset(i))); |
| 5725 } else { | 5725 } else { |
| 5726 __ mov(candidate, hash); | 5726 __ mov(candidate, hash); |
| 5727 } | 5727 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5832 // sp[4]: from | 5832 // sp[4]: from |
| 5833 // sp[8]: string | 5833 // sp[8]: string |
| 5834 | 5834 |
| 5835 // This stub is called from the native-call %_SubString(...), so | 5835 // This stub is called from the native-call %_SubString(...), so |
| 5836 // nothing can be assumed about the arguments. It is tested that: | 5836 // nothing can be assumed about the arguments. It is tested that: |
| 5837 // "string" is a sequential string, | 5837 // "string" is a sequential string, |
| 5838 // both "from" and "to" are smis, and | 5838 // both "from" and "to" are smis, and |
| 5839 // 0 <= from <= to <= string.length. | 5839 // 0 <= from <= to <= string.length. |
| 5840 // If any of these assumptions fail, we call the runtime system. | 5840 // If any of these assumptions fail, we call the runtime system. |
| 5841 | 5841 |
| 5842 static const int kToOffset = 0 * kPointerSize; | 5842 const int kToOffset = 0 * kPointerSize; |
| 5843 static const int kFromOffset = 1 * kPointerSize; | 5843 const int kFromOffset = 1 * kPointerSize; |
| 5844 static const int kStringOffset = 2 * kPointerSize; | 5844 const int kStringOffset = 2 * kPointerSize; |
| 5845 | 5845 |
| 5846 __ Ldrd(r2, r3, MemOperand(sp, kToOffset)); | 5846 __ Ldrd(r2, r3, MemOperand(sp, kToOffset)); |
| 5847 STATIC_ASSERT(kFromOffset == kToOffset + 4); | 5847 STATIC_ASSERT(kFromOffset == kToOffset + 4); |
| 5848 STATIC_ASSERT(kSmiTag == 0); | 5848 STATIC_ASSERT(kSmiTag == 0); |
| 5849 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); | 5849 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); |
| 5850 | 5850 |
| 5851 // I.e., arithmetic shift right by one un-smi-tags. | 5851 // I.e., arithmetic shift right by one un-smi-tags. |
| 5852 __ mov(r2, Operand(r2, ASR, 1), SetCC); | 5852 __ mov(r2, Operand(r2, ASR, 1), SetCC); |
| 5853 __ mov(r3, Operand(r3, ASR, 1), SetCC, cc); | 5853 __ mov(r3, Operand(r3, ASR, 1), SetCC, cc); |
| 5854 // If either to or from had the smi tag bit set, then carry is set now. | 5854 // If either to or from had the smi tag bit set, then carry is set now. |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7042 __ mov(result, Operand::Zero()); | 7042 __ mov(result, Operand::Zero()); |
| 7043 __ Ret(); | 7043 __ Ret(); |
| 7044 } | 7044 } |
| 7045 | 7045 |
| 7046 | 7046 |
| 7047 struct AheadOfTimeWriteBarrierStubList { | 7047 struct AheadOfTimeWriteBarrierStubList { |
| 7048 Register object, value, address; | 7048 Register object, value, address; |
| 7049 RememberedSetAction action; | 7049 RememberedSetAction action; |
| 7050 }; | 7050 }; |
| 7051 | 7051 |
| 7052 #define REG(Name) { kRegister ## Name ## Code } | |
| 7052 | 7053 |
| 7053 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { | 7054 static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { |
| 7054 // Used in RegExpExecStub. | 7055 // Used in RegExpExecStub. |
| 7055 { r6, r4, r7, EMIT_REMEMBERED_SET }, | 7056 { REG(R6), REG(R4), REG(R7), EMIT_REMEMBERED_SET }, |
|
fschneider
2012/02/28 16:54:48
It would be nice to use the same names here as wel
Philippe
2012/02/29 10:24:45
I agree with your point.
I am probably missing so
| |
| 7056 { r6, r2, r7, EMIT_REMEMBERED_SET }, | 7057 { REG(R6), REG(R2), REG(R7), EMIT_REMEMBERED_SET }, |
| 7057 // Used in CompileArrayPushCall. | 7058 // Used in CompileArrayPushCall. |
| 7058 // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore. | 7059 // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore. |
| 7059 // Also used in KeyedStoreIC::GenerateGeneric. | 7060 // Also used in KeyedStoreIC::GenerateGeneric. |
| 7060 { r3, r4, r5, EMIT_REMEMBERED_SET }, | 7061 { REG(R3), REG(R4), REG(R5), EMIT_REMEMBERED_SET }, |
| 7061 // Used in CompileStoreGlobal. | 7062 // Used in CompileStoreGlobal. |
| 7062 { r4, r1, r2, OMIT_REMEMBERED_SET }, | 7063 { REG(R4), REG(R1), REG(R2), OMIT_REMEMBERED_SET }, |
| 7063 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. | 7064 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. |
| 7064 { r1, r2, r3, EMIT_REMEMBERED_SET }, | 7065 { REG(R1), REG(R2), REG(R3), EMIT_REMEMBERED_SET }, |
| 7065 { r3, r2, r1, EMIT_REMEMBERED_SET }, | 7066 { REG(R3), REG(R2), REG(R1), EMIT_REMEMBERED_SET }, |
| 7066 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. | 7067 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. |
| 7067 { r2, r1, r3, EMIT_REMEMBERED_SET }, | 7068 { REG(R2), REG(R1), REG(R3), EMIT_REMEMBERED_SET }, |
| 7068 { r3, r1, r2, EMIT_REMEMBERED_SET }, | 7069 { REG(R3), REG(R1), REG(R2), EMIT_REMEMBERED_SET }, |
| 7069 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 7070 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
| 7070 { r3, r2, r4, EMIT_REMEMBERED_SET }, | 7071 { REG(R3), REG(R2), REG(R4), EMIT_REMEMBERED_SET }, |
| 7071 { r2, r3, r4, EMIT_REMEMBERED_SET }, | 7072 { REG(R2), REG(R3), REG(R4), EMIT_REMEMBERED_SET }, |
| 7072 // ElementsTransitionGenerator::GenerateSmiOnlyToObject | 7073 // ElementsTransitionGenerator::GenerateSmiOnlyToObject |
| 7073 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble | 7074 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
| 7074 // and ElementsTransitionGenerator::GenerateDoubleToObject | 7075 // and ElementsTransitionGenerator::GenerateDoubleToObject |
| 7075 { r2, r3, r9, EMIT_REMEMBERED_SET }, | 7076 { REG(R2), REG(R3), REG(R9), EMIT_REMEMBERED_SET }, |
| 7076 { r2, r3, r9, OMIT_REMEMBERED_SET }, | 7077 { REG(R2), REG(R3), REG(R9), OMIT_REMEMBERED_SET }, |
| 7077 // ElementsTransitionGenerator::GenerateDoubleToObject | 7078 // ElementsTransitionGenerator::GenerateDoubleToObject |
| 7078 { r6, r2, r0, EMIT_REMEMBERED_SET }, | 7079 { REG(R6), REG(R2), REG(R0), EMIT_REMEMBERED_SET }, |
| 7079 { r2, r6, r9, EMIT_REMEMBERED_SET }, | 7080 { REG(R2), REG(R6), REG(R9), EMIT_REMEMBERED_SET }, |
| 7080 // StoreArrayLiteralElementStub::Generate | 7081 // StoreArrayLiteralElementStub::Generate |
| 7081 { r5, r0, r6, EMIT_REMEMBERED_SET }, | 7082 { REG(R5), REG(R0), REG(R6), EMIT_REMEMBERED_SET }, |
| 7082 // Null termination. | 7083 // Null termination. |
| 7083 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} | 7084 { REG(None), REG(None), REG(None), EMIT_REMEMBERED_SET} |
| 7084 }; | 7085 }; |
| 7085 | 7086 |
| 7087 #undef REG | |
| 7086 | 7088 |
| 7087 bool RecordWriteStub::IsPregenerated() { | 7089 bool RecordWriteStub::IsPregenerated() { |
| 7088 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 7090 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
| 7089 !entry->object.is(no_reg); | 7091 !entry->object.is(no_reg); |
| 7090 entry++) { | 7092 entry++) { |
| 7091 if (object_.is(entry->object) && | 7093 if (object_.is(entry->object) && |
| 7092 value_.is(entry->value) && | 7094 value_.is(entry->value) && |
| 7093 address_.is(entry->address) && | 7095 address_.is(entry->address) && |
| 7094 remembered_set_action_ == entry->action && | 7096 remembered_set_action_ == entry->action && |
| 7095 save_fp_regs_mode_ == kDontSaveFPRegs) { | 7097 save_fp_regs_mode_ == kDontSaveFPRegs) { |
| 7096 return true; | 7098 return true; |
| 7097 } | 7099 } |
| 7098 } | 7100 } |
| 7099 return false; | 7101 return false; |
| 7100 } | 7102 } |
| 7101 | 7103 |
| 7102 | 7104 |
| 7103 bool StoreBufferOverflowStub::IsPregenerated() { | 7105 bool StoreBufferOverflowStub::IsPregenerated() { |
| 7104 return save_doubles_ == kDontSaveFPRegs || ISOLATE->fp_stubs_generated(); | 7106 return save_doubles_ == kDontSaveFPRegs || ISOLATE->fp_stubs_generated(); |
| 7105 } | 7107 } |
| 7106 | 7108 |
| 7107 | 7109 |
| 7108 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime() { | 7110 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime() { |
| 7109 StoreBufferOverflowStub stub1(kDontSaveFPRegs); | 7111 StoreBufferOverflowStub stub1(kDontSaveFPRegs); |
| 7110 stub1.GetCode()->set_is_pregenerated(true); | 7112 stub1.GetCode()->set_is_pregenerated(true); |
| 7111 } | 7113 } |
| 7112 | 7114 |
| 7113 | 7115 |
| 7114 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime() { | 7116 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime() { |
| 7115 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 7117 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
| 7116 !entry->object.is(no_reg); | 7118 !entry->object.is(no_reg); |
| 7117 entry++) { | 7119 entry++) { |
| 7118 RecordWriteStub stub(entry->object, | 7120 RecordWriteStub stub(entry->object, |
| 7119 entry->value, | 7121 entry->value, |
| 7120 entry->address, | 7122 entry->address, |
| 7121 entry->action, | 7123 entry->action, |
| 7122 kDontSaveFPRegs); | 7124 kDontSaveFPRegs); |
| 7123 stub.GetCode()->set_is_pregenerated(true); | 7125 stub.GetCode()->set_is_pregenerated(true); |
| 7124 } | 7126 } |
| 7125 } | 7127 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7371 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, | 7373 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, |
| 7372 &slow_elements); | 7374 &slow_elements); |
| 7373 __ Ret(); | 7375 __ Ret(); |
| 7374 } | 7376 } |
| 7375 | 7377 |
| 7376 #undef __ | 7378 #undef __ |
| 7377 | 7379 |
| 7378 } } // namespace v8::internal | 7380 } } // namespace v8::internal |
| 7379 | 7381 |
| 7380 #endif // V8_TARGET_ARCH_ARM | 7382 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |