OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 __ push(ecx); // name | 1018 __ push(ecx); // name |
1019 __ push(ebx); // return address | 1019 __ push(ebx); // return address |
1020 | 1020 |
1021 // Perform tail call to the entry. | 1021 // Perform tail call to the entry. |
1022 ExternalReference ref = | 1022 ExternalReference ref = |
1023 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate()); | 1023 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate()); |
1024 __ TailCallExternalReference(ref, 2, 1); | 1024 __ TailCallExternalReference(ref, 2, 1); |
1025 } | 1025 } |
1026 | 1026 |
1027 | 1027 |
| 1028 // IC register specifications |
| 1029 const Register LoadIC::ReceiverRegister() { return edx; } |
| 1030 const Register LoadIC::NameRegister() { return ecx; } |
| 1031 |
| 1032 |
| 1033 const Register KeyedLoadIC::ReceiverRegister() { |
| 1034 return LoadIC::ReceiverRegister(); |
| 1035 } |
| 1036 |
| 1037 |
| 1038 const Register KeyedLoadIC::NameRegister() { return LoadIC::NameRegister(); } |
| 1039 |
| 1040 |
| 1041 const Register* KeyedLoadIC::AllocateRegisterArray() { |
| 1042 Register* registers = new Register[kRegisterArgumentCount]; |
| 1043 registers[0] = ReceiverRegister(); |
| 1044 registers[1] = NameRegister(); |
| 1045 return registers; |
| 1046 } |
| 1047 |
| 1048 |
1028 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 1049 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
1029 // ----------- S t a t e ------------- | 1050 // ----------- S t a t e ------------- |
1030 // -- ecx : key | 1051 // -- ecx : key |
1031 // -- edx : receiver | 1052 // -- edx : receiver |
1032 // -- esp[0] : return address | 1053 // -- esp[0] : return address |
1033 // ----------------------------------- | 1054 // ----------------------------------- |
1034 | 1055 |
1035 __ pop(ebx); | 1056 __ pop(ebx); |
1036 __ push(edx); // receiver | 1057 __ push(edx); // receiver |
1037 __ push(ecx); // name | 1058 __ push(ecx); // name |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1302 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1282 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1303 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1283 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1304 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1284 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1305 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1285 } | 1306 } |
1286 | 1307 |
1287 | 1308 |
1288 } } // namespace v8::internal | 1309 } } // namespace v8::internal |
1289 | 1310 |
1290 #endif // V8_TARGET_ARCH_X87 | 1311 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |