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 4016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5955 __ JumpIfSmi(value, false_label); | 5961 __ JumpIfSmi(value, false_label); |
5956 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label); | 5962 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label); |
5957 __ JumpIfObjectType(value, map, scratch, | 5963 __ JumpIfObjectType(value, map, scratch, |
5958 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt); | 5964 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt); |
5959 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 5965 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
5960 __ B(gt, false_label); | 5966 __ B(gt, false_label); |
5961 // Check for undetectable objects => false. | 5967 // Check for undetectable objects => false. |
5962 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5968 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
5963 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); | 5969 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); |
5964 | 5970 |
| 5971 } else if (String::Equals(type_name, factory->float32x4_string())) { |
| 5972 DCHECK((instr->temp1() != NULL) && (instr->temp2() != NULL)); |
| 5973 Register map = ToRegister(instr->temp1()); |
| 5974 Register scratch = ToRegister(instr->temp2()); |
| 5975 |
| 5976 __ JumpIfSmi(value, false_label); |
| 5977 __ CompareObjectType(value, map, scratch, FLOAT32X4_TYPE); |
| 5978 EmitBranch(instr, eq); |
| 5979 |
5965 } else { | 5980 } else { |
5966 __ B(false_label); | 5981 __ B(false_label); |
5967 } | 5982 } |
5968 } | 5983 } |
5969 | 5984 |
5970 | 5985 |
5971 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { | 5986 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
5972 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); | 5987 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); |
5973 } | 5988 } |
5974 | 5989 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6116 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6131 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6117 __ Push(scope_info); | 6132 __ Push(scope_info); |
6118 __ Push(ToRegister(instr->function())); | 6133 __ Push(ToRegister(instr->function())); |
6119 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6134 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6120 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6135 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6121 } | 6136 } |
6122 | 6137 |
6123 | 6138 |
6124 } // namespace internal | 6139 } // namespace internal |
6125 } // namespace v8 | 6140 } // namespace v8 |
OLD | NEW |