Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ic/ia32/ic-ia32.cc

Issue 2001073002: [build] Fix a clang warning (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/arm64/ic-arm64.cc ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
829 if (*test_instruction_address != Assembler::kTestAlByte) { 829 if (*test_instruction_address != Assembler::kTestAlByte) {
830 DCHECK(*test_instruction_address == Assembler::kNopByte); 830 DCHECK(*test_instruction_address == Assembler::kNopByte);
831 return; 831 return;
832 } 832 }
833 833
834 Address delta_address = test_instruction_address + 1; 834 Address delta_address = test_instruction_address + 1;
835 // The delta to the start of the map check instruction and the 835 // The delta to the start of the map check instruction and the
836 // condition code uses at the patched jump. 836 // condition code uses at the patched jump.
837 uint8_t delta = *reinterpret_cast<uint8_t*>(delta_address); 837 uint8_t delta = *reinterpret_cast<uint8_t*>(delta_address);
838 if (FLAG_trace_ic) { 838 if (FLAG_trace_ic) {
839 PrintF("[ patching ic at %p, test=%p, delta=%d\n", address, 839 PrintF("[ patching ic at %p, test=%p, delta=%d\n",
840 test_instruction_address, delta); 840 static_cast<void*>(address),
841 static_cast<void*>(test_instruction_address), delta);
841 } 842 }
842 843
843 // Patch with a short conditional jump. Enabling means switching from a short 844 // Patch with a short conditional jump. Enabling means switching from a short
844 // jump-if-carry/not-carry to jump-if-zero/not-zero, whereas disabling is the 845 // jump-if-carry/not-carry to jump-if-zero/not-zero, whereas disabling is the
845 // reverse operation of that. 846 // reverse operation of that.
846 Address jmp_address = test_instruction_address - delta; 847 Address jmp_address = test_instruction_address - delta;
847 DCHECK((check == ENABLE_INLINED_SMI_CHECK) 848 DCHECK((check == ENABLE_INLINED_SMI_CHECK)
848 ? (*jmp_address == Assembler::kJncShortOpcode || 849 ? (*jmp_address == Assembler::kJncShortOpcode ||
849 *jmp_address == Assembler::kJcShortOpcode) 850 *jmp_address == Assembler::kJcShortOpcode)
850 : (*jmp_address == Assembler::kJnzShortOpcode || 851 : (*jmp_address == Assembler::kJnzShortOpcode ||
851 *jmp_address == Assembler::kJzShortOpcode)); 852 *jmp_address == Assembler::kJzShortOpcode));
852 Condition cc = 853 Condition cc =
853 (check == ENABLE_INLINED_SMI_CHECK) 854 (check == ENABLE_INLINED_SMI_CHECK)
854 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 855 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
855 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 856 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
856 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 857 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
857 } 858 }
858 } // namespace internal 859 } // namespace internal
859 } // namespace v8 860 } // namespace v8
860 861
861 #endif // V8_TARGET_ARCH_IA32 862 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm64/ic-arm64.cc ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698