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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 840 } |
841 } | 841 } |
842 } else if (destination->IsRegister()) { | 842 } else if (destination->IsRegister()) { |
843 Register dst = g.ToRegister(destination); | 843 Register dst = g.ToRegister(destination); |
844 __ mov(dst, g.ToImmediate(source)); | 844 __ mov(dst, g.ToImmediate(source)); |
845 } else if (destination->IsStackSlot()) { | 845 } else if (destination->IsStackSlot()) { |
846 Operand dst = g.ToOperand(destination); | 846 Operand dst = g.ToOperand(destination); |
847 __ mov(dst, g.ToImmediate(source)); | 847 __ mov(dst, g.ToImmediate(source)); |
848 } else { | 848 } else { |
849 double v = g.ToDouble(source); | 849 double v = g.ToDouble(source); |
850 uint64_t int_val = BitCast<uint64_t, double>(v); | 850 uint64_t int_val = bit_cast<uint64_t, double>(v); |
851 int32_t lower = static_cast<int32_t>(int_val); | 851 int32_t lower = static_cast<int32_t>(int_val); |
852 int32_t upper = static_cast<int32_t>(int_val >> kBitsPerInt); | 852 int32_t upper = static_cast<int32_t>(int_val >> kBitsPerInt); |
853 if (destination->IsDoubleRegister()) { | 853 if (destination->IsDoubleRegister()) { |
854 XMMRegister dst = g.ToDoubleRegister(destination); | 854 XMMRegister dst = g.ToDoubleRegister(destination); |
855 __ Move(dst, v); | 855 __ Move(dst, v); |
856 } else { | 856 } else { |
857 DCHECK(destination->IsDoubleStackSlot()); | 857 DCHECK(destination->IsDoubleStackSlot()); |
858 Operand dst0 = g.ToOperand(destination); | 858 Operand dst0 = g.ToOperand(destination); |
859 Operand dst1 = g.HighOperand(destination); | 859 Operand dst1 = g.HighOperand(destination); |
860 __ mov(dst0, Immediate(lower)); | 860 __ mov(dst0, Immediate(lower)); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 } | 945 } |
946 | 946 |
947 | 947 |
948 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 948 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
949 | 949 |
950 #undef __ | 950 #undef __ |
951 | 951 |
952 } // namespace compiler | 952 } // namespace compiler |
953 } // namespace internal | 953 } // namespace internal |
954 } // namespace v8 | 954 } // namespace v8 |
OLD | NEW |