OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 Register temp_0 = kScratchReg; | 1905 Register temp_0 = kScratchReg; |
1906 SwVfpRegister temp_1 = kScratchDoubleReg.low(); | 1906 SwVfpRegister temp_1 = kScratchDoubleReg.low(); |
1907 MemOperand src = g.ToMemOperand(source); | 1907 MemOperand src = g.ToMemOperand(source); |
1908 MemOperand dst = g.ToMemOperand(destination); | 1908 MemOperand dst = g.ToMemOperand(destination); |
1909 __ ldr(temp_0, src); | 1909 __ ldr(temp_0, src); |
1910 __ vldr(temp_1, dst); | 1910 __ vldr(temp_1, dst); |
1911 __ str(temp_0, dst); | 1911 __ str(temp_0, dst); |
1912 __ vstr(temp_1, src); | 1912 __ vstr(temp_1, src); |
1913 } else if (source->IsFPRegister()) { | 1913 } else if (source->IsFPRegister()) { |
1914 LowDwVfpRegister temp = kScratchDoubleReg; | 1914 LowDwVfpRegister temp = kScratchDoubleReg; |
1915 DwVfpRegister src = g.ToDoubleRegister(source); | 1915 DwVfpRegister src = g.ToDoubleRegister(source); |
1916 if (destination->IsFPRegister()) { | 1916 if (destination->IsFPRegister()) { |
1917 DwVfpRegister dst = g.ToDoubleRegister(destination); | 1917 DwVfpRegister dst = g.ToDoubleRegister(destination); |
1918 __ vswp(src, dst); | 1918 __ Move(temp, src); |
1919 } else { | 1919 __ Move(src, dst); |
1920 DCHECK(destination->IsFPStackSlot()); | 1920 __ Move(dst, temp); |
1921 MemOperand dst = g.ToMemOperand(destination); | 1921 } else { |
1922 __ Move(temp, src); | 1922 DCHECK(destination->IsFPStackSlot()); |
1923 __ vldr(src, dst); | 1923 MemOperand dst = g.ToMemOperand(destination); |
1924 __ vstr(temp, dst); | 1924 __ Move(temp, src); |
1925 } | 1925 __ vldr(src, dst); |
| 1926 __ vstr(temp, dst); |
| 1927 } |
1926 } else if (source->IsFPStackSlot()) { | 1928 } else if (source->IsFPStackSlot()) { |
1927 DCHECK(destination->IsFPStackSlot()); | 1929 DCHECK(destination->IsFPStackSlot()); |
1928 Register temp_0 = kScratchReg; | 1930 Register temp_0 = kScratchReg; |
1929 LowDwVfpRegister temp_1 = kScratchDoubleReg; | 1931 LowDwVfpRegister temp_1 = kScratchDoubleReg; |
1930 MemOperand src0 = g.ToMemOperand(source); | 1932 MemOperand src0 = g.ToMemOperand(source); |
1931 MemOperand dst0 = g.ToMemOperand(destination); | 1933 MemOperand dst0 = g.ToMemOperand(destination); |
1932 MemOperand src1(src0.rn(), src0.offset() + kPointerSize); | 1934 MemOperand src1(src0.rn(), src0.offset() + kPointerSize); |
1933 MemOperand dst1(dst0.rn(), dst0.offset() + kPointerSize); | 1935 MemOperand dst1(dst0.rn(), dst0.offset() + kPointerSize); |
1934 __ vldr(temp_1, dst0); // Save destination in temp_1. | 1936 __ vldr(temp_1, dst0); // Save destination in temp_1. |
1935 __ ldr(temp_0, src0); // Then use temp_0 to copy source to destination. | 1937 __ ldr(temp_0, src0); // Then use temp_0 to copy source to destination. |
1936 __ str(temp_0, dst0); | 1938 __ str(temp_0, dst0); |
1937 __ ldr(temp_0, src1); | 1939 __ ldr(temp_0, src1); |
1938 __ str(temp_0, dst1); | 1940 __ str(temp_0, dst1); |
1939 __ vstr(temp_1, src0); | 1941 __ vstr(temp_1, src0); |
1940 } else { | 1942 } else { |
1941 // No other combinations are possible. | 1943 // No other combinations are possible. |
1942 UNREACHABLE(); | 1944 UNREACHABLE(); |
1943 } | 1945 } |
1944 } | 1946 } |
1945 | 1947 |
1946 | 1948 |
1947 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 1949 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
1948 // On 32-bit ARM we emit the jump tables inline. | 1950 // On 32-bit ARM we emit the jump tables inline. |
1949 UNREACHABLE(); | 1951 UNREACHABLE(); |
(...skipping 19 matching lines...) Expand all Loading... |
1969 padding_size -= v8::internal::Assembler::kInstrSize; | 1971 padding_size -= v8::internal::Assembler::kInstrSize; |
1970 } | 1972 } |
1971 } | 1973 } |
1972 } | 1974 } |
1973 | 1975 |
1974 #undef __ | 1976 #undef __ |
1975 | 1977 |
1976 } // namespace compiler | 1978 } // namespace compiler |
1977 } // namespace internal | 1979 } // namespace internal |
1978 } // namespace v8 | 1980 } // namespace v8 |
OLD | NEW |