OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 __ B(true_label); | 1919 __ B(true_label); |
1920 __ Bind(¬_string); | 1920 __ Bind(¬_string); |
1921 } | 1921 } |
1922 | 1922 |
1923 if (expected.Contains(ToBooleanStub::SYMBOL)) { | 1923 if (expected.Contains(ToBooleanStub::SYMBOL)) { |
1924 // Symbol value -> true. | 1924 // Symbol value -> true. |
1925 __ CompareInstanceType(map, scratch, SYMBOL_TYPE); | 1925 __ CompareInstanceType(map, scratch, SYMBOL_TYPE); |
1926 __ B(eq, true_label); | 1926 __ B(eq, true_label); |
1927 } | 1927 } |
1928 | 1928 |
| 1929 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { |
| 1930 // SIMD value -> true. |
| 1931 __ CompareInstanceType(map, scratch, FLOAT32X4_TYPE); |
| 1932 __ B(eq, true_label); |
| 1933 } |
| 1934 |
1929 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1935 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
1930 Label not_heap_number; | 1936 Label not_heap_number; |
1931 __ JumpIfNotRoot(map, Heap::kHeapNumberMapRootIndex, ¬_heap_number); | 1937 __ JumpIfNotRoot(map, Heap::kHeapNumberMapRootIndex, ¬_heap_number); |
1932 | 1938 |
1933 __ Ldr(double_scratch(), | 1939 __ Ldr(double_scratch(), |
1934 FieldMemOperand(value, HeapNumber::kValueOffset)); | 1940 FieldMemOperand(value, HeapNumber::kValueOffset)); |
1935 __ Fcmp(double_scratch(), 0.0); | 1941 __ Fcmp(double_scratch(), 0.0); |
1936 // If we got a NaN (overflow bit is set), jump to the false branch. | 1942 // If we got a NaN (overflow bit is set), jump to the false branch. |
1937 __ B(vs, false_label); | 1943 __ B(vs, false_label); |
1938 __ B(eq, false_label); | 1944 __ B(eq, false_label); |
(...skipping 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5953 __ JumpIfSmi(value, false_label); | 5959 __ JumpIfSmi(value, false_label); |
5954 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label); | 5960 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label); |
5955 __ JumpIfObjectType(value, map, scratch, | 5961 __ JumpIfObjectType(value, map, scratch, |
5956 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt); | 5962 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt); |
5957 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 5963 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
5958 __ B(gt, false_label); | 5964 __ B(gt, false_label); |
5959 // Check for undetectable objects => false. | 5965 // Check for undetectable objects => false. |
5960 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5966 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
5961 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); | 5967 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); |
5962 | 5968 |
| 5969 } else if (String::Equals(type_name, factory->float32x4_string())) { |
| 5970 DCHECK((instr->temp1() != NULL) && (instr->temp2() != NULL)); |
| 5971 Register map = ToRegister(instr->temp1()); |
| 5972 Register scratch = ToRegister(instr->temp2()); |
| 5973 |
| 5974 __ JumpIfSmi(value, false_label); |
| 5975 __ CompareObjectType(value, map, scratch, FLOAT32X4_TYPE); |
| 5976 EmitBranch(instr, eq); |
| 5977 |
5963 } else { | 5978 } else { |
5964 __ B(false_label); | 5979 __ B(false_label); |
5965 } | 5980 } |
5966 } | 5981 } |
5967 | 5982 |
5968 | 5983 |
5969 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { | 5984 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
5970 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); | 5985 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); |
5971 } | 5986 } |
5972 | 5987 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6114 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6129 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6115 __ Push(scope_info); | 6130 __ Push(scope_info); |
6116 __ Push(ToRegister(instr->function())); | 6131 __ Push(ToRegister(instr->function())); |
6117 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6132 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6118 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6133 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6119 } | 6134 } |
6120 | 6135 |
6121 | 6136 |
6122 } // namespace internal | 6137 } // namespace internal |
6123 } // namespace v8 | 6138 } // namespace v8 |
OLD | NEW |