OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.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 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 | 1897 |
1898 | 1898 |
1899 void LCodeGen::DoConstantS(LConstantS* instr) { | 1899 void LCodeGen::DoConstantS(LConstantS* instr) { |
1900 __ mov(ToRegister(instr->result()), Operand(instr->value())); | 1900 __ mov(ToRegister(instr->result()), Operand(instr->value())); |
1901 } | 1901 } |
1902 | 1902 |
1903 | 1903 |
1904 void LCodeGen::DoConstantD(LConstantD* instr) { | 1904 void LCodeGen::DoConstantD(LConstantD* instr) { |
1905 DCHECK(instr->result()->IsDoubleRegister()); | 1905 DCHECK(instr->result()->IsDoubleRegister()); |
1906 DwVfpRegister result = ToDoubleRegister(instr->result()); | 1906 DwVfpRegister result = ToDoubleRegister(instr->result()); |
| 1907 #if V8_HOST_ARCH_IA32 |
| 1908 // Need some crappy work-around for x87 sNaN -> qNaN breakage in simulator |
| 1909 // builds. |
| 1910 uint64_t bits = instr->bits(); |
| 1911 if ((bits & V8_UINT64_C(0x7FF8000000000000)) == |
| 1912 V8_UINT64_C(0x7FF0000000000000)) { |
| 1913 uint32_t lo = static_cast<uint32_t>(bits); |
| 1914 uint32_t hi = static_cast<uint32_t>(bits >> 32); |
| 1915 __ mov(ip, Operand(lo)); |
| 1916 __ mov(scratch0(), Operand(hi)); |
| 1917 __ vmov(result, ip, scratch0()); |
| 1918 return; |
| 1919 } |
| 1920 #endif |
1907 double v = instr->value(); | 1921 double v = instr->value(); |
1908 __ Vmov(result, v, scratch0()); | 1922 __ Vmov(result, v, scratch0()); |
1909 } | 1923 } |
1910 | 1924 |
1911 | 1925 |
1912 void LCodeGen::DoConstantE(LConstantE* instr) { | 1926 void LCodeGen::DoConstantE(LConstantE* instr) { |
1913 __ mov(ToRegister(instr->result()), Operand(instr->value())); | 1927 __ mov(ToRegister(instr->result()), Operand(instr->value())); |
1914 } | 1928 } |
1915 | 1929 |
1916 | 1930 |
(...skipping 4025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5942 __ Push(scope_info); | 5956 __ Push(scope_info); |
5943 __ push(ToRegister(instr->function())); | 5957 __ push(ToRegister(instr->function())); |
5944 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5958 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5945 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5959 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5946 } | 5960 } |
5947 | 5961 |
5948 | 5962 |
5949 #undef __ | 5963 #undef __ |
5950 | 5964 |
5951 } } // namespace v8::internal | 5965 } } // namespace v8::internal |
OLD | NEW |