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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 // The address of the instruction following the call. | 829 // The address of the instruction following the call. |
830 Address test_instruction_address = | 830 Address test_instruction_address = |
831 address + Assembler::kCallTargetAddressOffset; | 831 address + Assembler::kCallTargetAddressOffset; |
832 | 832 |
833 // If the instruction following the call is not a test al, nothing | 833 // If the instruction following the call is not a test al, nothing |
834 // was inlined. | 834 // was inlined. |
835 return *test_instruction_address == Assembler::kTestAlByte; | 835 return *test_instruction_address == Assembler::kTestAlByte; |
836 } | 836 } |
837 | 837 |
838 | 838 |
839 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check) { | 839 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
| 840 InlinedSmiCheck check) { |
840 // The address of the instruction following the call. | 841 // The address of the instruction following the call. |
841 Address test_instruction_address = | 842 Address test_instruction_address = |
842 address + Assembler::kCallTargetAddressOffset; | 843 address + Assembler::kCallTargetAddressOffset; |
843 | 844 |
844 // If the instruction following the call is not a test al, nothing | 845 // If the instruction following the call is not a test al, nothing |
845 // was inlined. | 846 // was inlined. |
846 if (*test_instruction_address != Assembler::kTestAlByte) { | 847 if (*test_instruction_address != Assembler::kTestAlByte) { |
847 DCHECK(*test_instruction_address == Assembler::kNopByte); | 848 DCHECK(*test_instruction_address == Assembler::kNopByte); |
848 return; | 849 return; |
849 } | 850 } |
(...skipping 19 matching lines...) Expand all Loading... |
869 Condition cc = | 870 Condition cc = |
870 (check == ENABLE_INLINED_SMI_CHECK) | 871 (check == ENABLE_INLINED_SMI_CHECK) |
871 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 872 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
872 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 873 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
873 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 874 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
874 } | 875 } |
875 } // namespace internal | 876 } // namespace internal |
876 } // namespace v8 | 877 } // namespace v8 |
877 | 878 |
878 #endif // V8_TARGET_ARCH_IA32 | 879 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |