| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5173 | 5173 |
| 5174 void StringAddStub::GenerateRegisterArgsPush(MacroAssembler* masm) { | 5174 void StringAddStub::GenerateRegisterArgsPush(MacroAssembler* masm) { |
| 5175 __ Push(x0, x1); | 5175 __ Push(x0, x1); |
| 5176 } | 5176 } |
| 5177 | 5177 |
| 5178 | 5178 |
| 5179 void StringAddStub::GenerateRegisterArgsPop(MacroAssembler* masm) { | 5179 void StringAddStub::GenerateRegisterArgsPop(MacroAssembler* masm) { |
| 5180 __ Pop(x1, x0); | 5180 __ Pop(x1, x0); |
| 5181 } | 5181 } |
| 5182 | 5182 |
| 5183 #define MINOR_KEY_FOR(obj, value, addr, action, fp_mode) \ |
| 5184 ((obj) | ((value) << 5) | ((addr) << 10) | ((action) << 15) | \ |
| 5185 ((fp_mode) << 16)) |
| 5183 | 5186 |
| 5184 const int RecordWriteStub::kAheadOfTime[] = { | 5187 const int RecordWriteStub::kAheadOfTime[] = { |
| 5185 // Arguments to MinorKeyFor() are object, value and address registers. | 5188 // Arguments to MinorKeyFor() are object, value and address registers. |
| 5186 | 5189 |
| 5187 // Used in StoreArrayLiteralElementStub::Generate. | 5190 // Used in StoreArrayLiteralElementStub::Generate. |
| 5188 MinorKeyFor(x10, x0, x11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5191 MINOR_KEY_FOR(10, 0, 11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5189 | 5192 |
| 5190 // Used in FastNewClosure::Generate. | 5193 // Used in FastNewClosure::Generate. |
| 5191 MinorKeyFor(x5, x4, x1, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5194 MINOR_KEY_FOR(5, 4, 1, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5192 | 5195 |
| 5193 // Used in KeyedStoreStubCompiler::GenerateStoreFastElement. | 5196 // Used in KeyedStoreStubCompiler::GenerateStoreFastElement. |
| 5194 MinorKeyFor(x3, x2, x10, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5197 MINOR_KEY_FOR(3, 2, 10, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5195 | 5198 |
| 5196 // Used in KeyedStoreStubCompiler::GenerateStoreFastDoubleElement. | 5199 // Used in KeyedStoreStubCompiler::GenerateStoreFastDoubleElement. |
| 5197 MinorKeyFor(x2, x3, x10, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5200 MINOR_KEY_FOR(2, 3, 10, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5198 | 5201 |
| 5199 // Used in ElementsTransitionGenerator::GenerateSmiToDouble. | 5202 // Used in ElementsTransitionGenerator::GenerateSmiToDouble. |
| 5200 MinorKeyFor(x2, x3, x6, OMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5203 MINOR_KEY_FOR(2, 3, 6, OMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5201 MinorKeyFor(x2, x10, x6, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5204 MINOR_KEY_FOR(2, 10, 6, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5202 | 5205 |
| 5203 // Used in ElementsTransitionGenerator::GenerateDoubleToObject. | 5206 // Used in ElementsTransitionGenerator::GenerateDoubleToObject. |
| 5204 MinorKeyFor(x7, x5, x13, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5207 MINOR_KEY_FOR(7, 5, 13, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5205 MinorKeyFor(x2, x7, x13, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5208 MINOR_KEY_FOR(2, 7, 13, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5206 MinorKeyFor(x2, x3, x13, OMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5209 MINOR_KEY_FOR(2, 3, 13, OMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5207 | 5210 |
| 5208 // Used in KeyedStoreIC::GenerateGeneric helper function. | 5211 // Used in KeyedStoreIC::GenerateGeneric helper function. |
| 5209 MinorKeyFor(x4, x10, x11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5212 MINOR_KEY_FOR(4, 10, 11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5210 | 5213 |
| 5211 // Used in RegExpExecStub::Generate. | 5214 // Used in RegExpExecStub::Generate. |
| 5212 MinorKeyFor(x21, x10, x11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5215 MINOR_KEY_FOR(21, 10, 11, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5213 | 5216 |
| 5214 // Used in StringAddStub::Generate. | 5217 // Used in StringAddStub::Generate. |
| 5215 MinorKeyFor(x0, x10, x3, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5218 MINOR_KEY_FOR(0, 10, 3, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5216 MinorKeyFor(x0, x11, x3, EMIT_REMEMBERED_SET, kDontSaveFPRegs), | 5219 MINOR_KEY_FOR(0, 11, 3, EMIT_REMEMBERED_SET, kDontSaveFPRegs), |
| 5217 | 5220 |
| 5218 // TODO(jbramley): There are many more sites that want a pregenerated | 5221 // TODO(jbramley): There are many more sites that want a pregenerated |
| 5219 // instance of this stub, but they are currently unimplemented. Once they are | 5222 // instance of this stub, but they are currently unimplemented. Once they are |
| 5220 // implemented, they should be added to this list. | 5223 // implemented, they should be added to this list. |
| 5221 | 5224 |
| 5222 // Null termination. | 5225 // Null termination. |
| 5223 // It is safe to encode this as 0 because the three registers used for | 5226 // It is safe to encode this as 0 because the three registers used for |
| 5224 // RecordWriteStub must not be aliased, and 0 represents (x0, x0, x0). | 5227 // RecordWriteStub must not be aliased, and 0 represents (x0, x0, x0). |
| 5225 0 | 5228 0 |
| 5226 }; | 5229 }; |
| 5227 | 5230 |
| 5228 | 5231 |
| 5232 #undef MINOR_KEY_FOR |
| 5233 |
| 5234 |
| 5229 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) { | 5235 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) { |
| 5230 // Pregenerate all of the stub variants in the kAheadOfTime list. | 5236 // Pregenerate all of the stub variants in the kAheadOfTime list. |
| 5231 for (const int* entry = kAheadOfTime; *entry != 0; entry++) { | 5237 for (const int* entry = kAheadOfTime; *entry != 0; entry++) { |
| 5232 // kAheadOfTime is a list of minor keys, so extract the relevant fields | 5238 // kAheadOfTime is a list of minor keys, so extract the relevant fields |
| 5233 // from the minor key. | 5239 // from the minor key. |
| 5234 Register object = Register::XRegFromCode(ObjectBits::decode(*entry)); | 5240 Register object = Register::XRegFromCode(ObjectBits::decode(*entry)); |
| 5235 Register value = Register::XRegFromCode(ValueBits::decode(*entry)); | 5241 Register value = Register::XRegFromCode(ValueBits::decode(*entry)); |
| 5236 Register address = Register::XRegFromCode(AddressBits::decode(*entry)); | 5242 Register address = Register::XRegFromCode(AddressBits::decode(*entry)); |
| 5237 RememberedSetAction action = RememberedSetActionBits::decode(*entry); | 5243 RememberedSetAction action = RememberedSetActionBits::decode(*entry); |
| 5238 SaveFPRegsMode fp_mode = SaveFPRegsModeBits::decode(*entry); | 5244 SaveFPRegsMode fp_mode = SaveFPRegsModeBits::decode(*entry); |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6226 __ Bind(&fast_elements_case); | 6232 __ Bind(&fast_elements_case); |
| 6227 GenerateCase(masm, FAST_ELEMENTS); | 6233 GenerateCase(masm, FAST_ELEMENTS); |
| 6228 } | 6234 } |
| 6229 | 6235 |
| 6230 | 6236 |
| 6231 #undef __ | 6237 #undef __ |
| 6232 | 6238 |
| 6233 } } // namespace v8::internal | 6239 } } // namespace v8::internal |
| 6234 | 6240 |
| 6235 #endif // V8_TARGET_ARCH_A64 | 6241 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |