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

Side by Side Diff: src/x87/lithium-codegen-x87.cc

Issue 1315533002: Version 4.6.85.2 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.6
Patch Set: Created 5 years, 3 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/x87/code-stubs-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 value, 936 value,
937 environment->HasTaggedValueAt(env_offset + i), 937 environment->HasTaggedValueAt(env_offset + i),
938 environment->HasUint32ValueAt(env_offset + i), 938 environment->HasUint32ValueAt(env_offset + i),
939 object_index_pointer, 939 object_index_pointer,
940 dematerialized_index_pointer); 940 dematerialized_index_pointer);
941 } 941 }
942 return; 942 return;
943 } 943 }
944 944
945 if (op->IsStackSlot()) { 945 if (op->IsStackSlot()) {
946 int index = op->index();
947 if (index >= 0) {
948 index += StandardFrameConstants::kFixedFrameSize / kPointerSize;
949 }
946 if (is_tagged) { 950 if (is_tagged) {
947 translation->StoreStackSlot(op->index()); 951 translation->StoreStackSlot(index);
948 } else if (is_uint32) { 952 } else if (is_uint32) {
949 translation->StoreUint32StackSlot(op->index()); 953 translation->StoreUint32StackSlot(index);
950 } else { 954 } else {
951 translation->StoreInt32StackSlot(op->index()); 955 translation->StoreInt32StackSlot(index);
952 } 956 }
953 } else if (op->IsDoubleStackSlot()) { 957 } else if (op->IsDoubleStackSlot()) {
954 translation->StoreDoubleStackSlot(op->index()); 958 int index = op->index();
959 if (index >= 0) {
960 index += StandardFrameConstants::kFixedFrameSize / kPointerSize;
961 }
962 translation->StoreDoubleStackSlot(index);
955 } else if (op->IsRegister()) { 963 } else if (op->IsRegister()) {
956 Register reg = ToRegister(op); 964 Register reg = ToRegister(op);
957 if (is_tagged) { 965 if (is_tagged) {
958 translation->StoreRegister(reg); 966 translation->StoreRegister(reg);
959 } else if (is_uint32) { 967 } else if (is_uint32) {
960 translation->StoreUint32Register(reg); 968 translation->StoreUint32Register(reg);
961 } else { 969 } else {
962 translation->StoreInt32Register(reg); 970 translation->StoreInt32Register(reg);
963 } 971 }
964 } else if (op->IsDoubleRegister()) { 972 } else if (op->IsDoubleRegister()) {
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 } 2440 }
2433 2441
2434 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2442 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2435 // Symbol value -> true. 2443 // Symbol value -> true.
2436 __ CmpInstanceType(map, SYMBOL_TYPE); 2444 __ CmpInstanceType(map, SYMBOL_TYPE);
2437 __ j(equal, instr->TrueLabel(chunk_)); 2445 __ j(equal, instr->TrueLabel(chunk_));
2438 } 2446 }
2439 2447
2440 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { 2448 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2441 // SIMD value -> true. 2449 // SIMD value -> true.
2442 Label not_simd; 2450 __ CmpInstanceType(map, SIMD128_VALUE_TYPE);
2443 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE); 2451 __ j(equal, instr->TrueLabel(chunk_));
2444 __ j(less, &not_simd, Label::kNear);
2445 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
2446 __ j(less_equal, instr->TrueLabel(chunk_));
2447 __ bind(&not_simd);
2448 } 2452 }
2449 2453
2450 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2454 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2451 // heap number -> false iff +0, -0, or NaN. 2455 // heap number -> false iff +0, -0, or NaN.
2452 Label not_heap_number; 2456 Label not_heap_number;
2453 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2457 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2454 factory()->heap_number_map()); 2458 factory()->heap_number_map());
2455 __ j(not_equal, &not_heap_number, Label::kNear); 2459 __ j(not_equal, &not_heap_number, Label::kNear);
2456 __ fldz(); 2460 __ fldz();
2457 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset)); 2461 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset));
(...skipping 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after
6143 __ j(equal, true_label, true_distance); 6147 __ j(equal, true_label, true_distance);
6144 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); 6148 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input);
6145 __ j(below, false_label, false_distance); 6149 __ j(below, false_label, false_distance);
6146 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 6150 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
6147 __ j(above, false_label, false_distance); 6151 __ j(above, false_label, false_distance);
6148 // Check for undetectable objects => false. 6152 // Check for undetectable objects => false.
6149 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 6153 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
6150 1 << Map::kIsUndetectable); 6154 1 << Map::kIsUndetectable);
6151 final_branch_condition = zero; 6155 final_branch_condition = zero;
6152 6156
6153 } else if (String::Equals(type_name, factory()->float32x4_string())) { 6157 // clang-format off
6154 __ JumpIfSmi(input, false_label, false_distance); 6158 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
6155 __ CmpObjectType(input, FLOAT32X4_TYPE, input); 6159 } else if (String::Equals(type_name, factory()->type##_string())) { \
6160 __ JumpIfSmi(input, false_label, false_distance); \
6161 __ cmp(FieldOperand(input, HeapObject::kMapOffset), \
6162 factory()->type##_map()); \
6156 final_branch_condition = equal; 6163 final_branch_condition = equal;
6157 6164 SIMD128_TYPES(SIMD128_TYPE)
6158 } else if (String::Equals(type_name, factory()->int32x4_string())) { 6165 #undef SIMD128_TYPE
6159 __ JumpIfSmi(input, false_label, false_distance); 6166 // clang-format on
6160 __ CmpObjectType(input, INT32X4_TYPE, input);
6161 final_branch_condition = equal;
6162
6163 } else if (String::Equals(type_name, factory()->bool32x4_string())) {
6164 __ JumpIfSmi(input, false_label, false_distance);
6165 __ CmpObjectType(input, BOOL32X4_TYPE, input);
6166 final_branch_condition = equal;
6167
6168 } else if (String::Equals(type_name, factory()->int16x8_string())) {
6169 __ JumpIfSmi(input, false_label, false_distance);
6170 __ CmpObjectType(input, INT16X8_TYPE, input);
6171 final_branch_condition = equal;
6172
6173 } else if (String::Equals(type_name, factory()->bool16x8_string())) {
6174 __ JumpIfSmi(input, false_label, false_distance);
6175 __ CmpObjectType(input, BOOL16X8_TYPE, input);
6176 final_branch_condition = equal;
6177
6178 } else if (String::Equals(type_name, factory()->int8x16_string())) {
6179 __ JumpIfSmi(input, false_label, false_distance);
6180 __ CmpObjectType(input, INT8X16_TYPE, input);
6181 final_branch_condition = equal;
6182
6183 } else if (String::Equals(type_name, factory()->bool8x16_string())) {
6184 __ JumpIfSmi(input, false_label, false_distance);
6185 __ CmpObjectType(input, BOOL8X16_TYPE, input);
6186 final_branch_condition = equal;
6187 6167
6188 } else { 6168 } else {
6189 __ jmp(false_label, false_distance); 6169 __ jmp(false_label, false_distance);
6190 } 6170 }
6191 return final_branch_condition; 6171 return final_branch_condition;
6192 } 6172 }
6193 6173
6194 6174
6195 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 6175 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
6196 Register temp = ToRegister(instr->temp()); 6176 Register temp = ToRegister(instr->temp());
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
6486 RecordSafepoint(Safepoint::kNoLazyDeopt); 6466 RecordSafepoint(Safepoint::kNoLazyDeopt);
6487 } 6467 }
6488 6468
6489 6469
6490 #undef __ 6470 #undef __
6491 6471
6492 } // namespace internal 6472 } // namespace internal
6493 } // namespace v8 6473 } // namespace v8
6494 6474
6495 #endif // V8_TARGET_ARCH_X87 6475 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698