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

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

Issue 1815213002: Extends testb and cmpb/cmpw instruction support in the ia32 assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a copy/pasted erroneous DCHECK. Created 4 years, 9 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/ia32/code-stubs-ia32.cc ('k') | src/ia32/disasm-ia32.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 #include "src/ia32/codegen-ia32.h" 5 #include "src/ia32/codegen-ia32.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 // Handle external strings. 879 // Handle external strings.
880 Label one_byte_external, done; 880 Label one_byte_external, done;
881 if (FLAG_debug_code) { 881 if (FLAG_debug_code) {
882 // Assert that we do not have a cons or slice (indirect strings) here. 882 // Assert that we do not have a cons or slice (indirect strings) here.
883 // Sequential strings have already been ruled out. 883 // Sequential strings have already been ruled out.
884 __ test(result, Immediate(kIsIndirectStringMask)); 884 __ test(result, Immediate(kIsIndirectStringMask));
885 __ Assert(zero, kExternalStringExpectedButNotFound); 885 __ Assert(zero, kExternalStringExpectedButNotFound);
886 } 886 }
887 // Rule out short external strings. 887 // Rule out short external strings.
888 STATIC_ASSERT(kShortExternalStringTag != 0); 888 STATIC_ASSERT(kShortExternalStringTag != 0);
889 __ test_b(result, kShortExternalStringMask); 889 __ test_b(result, Immediate(kShortExternalStringMask));
890 __ j(not_zero, call_runtime); 890 __ j(not_zero, call_runtime);
891 // Check encoding. 891 // Check encoding.
892 STATIC_ASSERT(kTwoByteStringTag == 0); 892 STATIC_ASSERT(kTwoByteStringTag == 0);
893 __ test_b(result, kStringEncodingMask); 893 __ test_b(result, Immediate(kStringEncodingMask));
894 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); 894 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset));
895 __ j(not_equal, &one_byte_external, Label::kNear); 895 __ j(not_equal, &one_byte_external, Label::kNear);
896 // Two-byte string. 896 // Two-byte string.
897 __ movzx_w(result, Operand(result, index, times_2, 0)); 897 __ movzx_w(result, Operand(result, index, times_2, 0));
898 __ jmp(&done, Label::kNear); 898 __ jmp(&done, Label::kNear);
899 __ bind(&one_byte_external); 899 __ bind(&one_byte_external);
900 // One-byte string. 900 // One-byte string.
901 __ movzx_b(result, Operand(result, index, times_1, 0)); 901 __ movzx_b(result, Operand(result, index, times_1, 0));
902 __ jmp(&done, Label::kNear); 902 __ jmp(&done, Label::kNear);
903 903
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 CodePatcher patcher(isolate, sequence, young_length); 1042 CodePatcher patcher(isolate, sequence, young_length);
1043 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1043 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1044 } 1044 }
1045 } 1045 }
1046 1046
1047 1047
1048 } // namespace internal 1048 } // namespace internal
1049 } // namespace v8 1049 } // namespace v8
1050 1050
1051 #endif // V8_TARGET_ARCH_IA32 1051 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698