| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag), | 257 __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag), |
| 258 Immediate(kTypeAndReadOnlyMask)); | 258 Immediate(kTypeAndReadOnlyMask)); |
| 259 __ j(not_zero, miss_label, not_taken); | 259 __ j(not_zero, miss_label, not_taken); |
| 260 | 260 |
| 261 // Store the value at the masked, scaled index. | 261 // Store the value at the masked, scaled index. |
| 262 const int kValueOffset = kElementsStartOffset + kPointerSize; | 262 const int kValueOffset = kElementsStartOffset + kPointerSize; |
| 263 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag)); | 263 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag)); |
| 264 __ mov(Operand(r0, 0), value); | 264 __ mov(Operand(r0, 0), value); |
| 265 | 265 |
| 266 // Update write barrier. Make sure not to clobber the value. | 266 // Update write barrier. Make sure not to clobber the value. |
| 267 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER | |
| 268 __ mov(r1, value); | 267 __ mov(r1, value); |
| 269 __ RecordWrite(elements, r0, r1); | 268 __ RecordWrite(elements, r0, r1, kDontSaveFPRegs); |
| 270 #endif | |
| 271 } | 269 } |
| 272 | 270 |
| 273 | 271 |
| 274 static void GenerateNumberDictionaryLoad(MacroAssembler* masm, | 272 static void GenerateNumberDictionaryLoad(MacroAssembler* masm, |
| 275 Label* miss, | 273 Label* miss, |
| 276 Register elements, | 274 Register elements, |
| 277 Register key, | 275 Register key, |
| 278 Register r0, | 276 Register r0, |
| 279 Register r1, | 277 Register r1, |
| 280 Register r2, | 278 Register r2, |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 __ j(above_equal, &extra, not_taken); | 1018 __ j(above_equal, &extra, not_taken); |
| 1021 | 1019 |
| 1022 // Fast case: Do the store. | 1020 // Fast case: Do the store. |
| 1023 __ bind(&fast); | 1021 __ bind(&fast); |
| 1024 // eax: value | 1022 // eax: value |
| 1025 // ecx: key (a smi) | 1023 // ecx: key (a smi) |
| 1026 // edx: receiver | 1024 // edx: receiver |
| 1027 // edi: FixedArray receiver->elements | 1025 // edi: FixedArray receiver->elements |
| 1028 __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax); | 1026 __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax); |
| 1029 | 1027 |
| 1030 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER | |
| 1031 // Update write barrier for the elements array address. | 1028 // Update write barrier for the elements array address. |
| 1032 __ mov(edx, Operand(eax)); | 1029 __ mov(edx, Operand(eax)); |
| 1033 __ RecordWrite(edi, 0, edx, ecx); | 1030 __ RecordWrite(edi, 0, edx, ecx, kDontSaveFPRegs); |
| 1034 #endif | |
| 1035 __ ret(0); | 1031 __ ret(0); |
| 1036 } | 1032 } |
| 1037 | 1033 |
| 1038 | 1034 |
| 1039 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, | 1035 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, |
| 1040 ExternalArrayType array_type) { | 1036 ExternalArrayType array_type) { |
| 1041 // ----------- S t a t e ------------- | 1037 // ----------- S t a t e ------------- |
| 1042 // -- eax : value | 1038 // -- eax : value |
| 1043 // -- ecx : key | 1039 // -- ecx : key |
| 1044 // -- edx : receiver | 1040 // -- edx : receiver |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 2112 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 2117 ? not_zero | 2113 ? not_zero |
| 2118 : zero; | 2114 : zero; |
| 2119 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 2115 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 2120 } | 2116 } |
| 2121 | 2117 |
| 2122 | 2118 |
| 2123 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
| 2124 | 2120 |
| 2125 #endif // V8_TARGET_ARCH_IA32 | 2121 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |