Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 2313803003: [turbofan] ARM: Implement vswp and use in gap resolver (Closed)
Patch Set: Fix git's broken rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 __ Move(temp, src); 1918 __ vswp(src, dst);
1919 __ Move(src, dst); 1919 } else {
1920 __ Move(dst, temp); 1920 DCHECK(destination->IsFPStackSlot());
1921 } else { 1921 MemOperand dst = g.ToMemOperand(destination);
1922 DCHECK(destination->IsFPStackSlot()); 1922 __ Move(temp, src);
1923 MemOperand dst = g.ToMemOperand(destination); 1923 __ vldr(src, dst);
1924 __ Move(temp, src); 1924 __ vstr(temp, dst);
1925 __ vldr(src, dst); 1925 }
1926 __ vstr(temp, dst);
1927 }
1928 } else if (source->IsFPStackSlot()) { 1926 } else if (source->IsFPStackSlot()) {
1929 DCHECK(destination->IsFPStackSlot()); 1927 DCHECK(destination->IsFPStackSlot());
1930 Register temp_0 = kScratchReg; 1928 Register temp_0 = kScratchReg;
1931 LowDwVfpRegister temp_1 = kScratchDoubleReg; 1929 LowDwVfpRegister temp_1 = kScratchDoubleReg;
1932 MemOperand src0 = g.ToMemOperand(source); 1930 MemOperand src0 = g.ToMemOperand(source);
1933 MemOperand dst0 = g.ToMemOperand(destination); 1931 MemOperand dst0 = g.ToMemOperand(destination);
1934 MemOperand src1(src0.rn(), src0.offset() + kPointerSize); 1932 MemOperand src1(src0.rn(), src0.offset() + kPointerSize);
1935 MemOperand dst1(dst0.rn(), dst0.offset() + kPointerSize); 1933 MemOperand dst1(dst0.rn(), dst0.offset() + kPointerSize);
1936 __ vldr(temp_1, dst0); // Save destination in temp_1. 1934 __ vldr(temp_1, dst0); // Save destination in temp_1.
1937 __ ldr(temp_0, src0); // Then use temp_0 to copy source to destination. 1935 __ ldr(temp_0, src0); // Then use temp_0 to copy source to destination.
1938 __ str(temp_0, dst0); 1936 __ str(temp_0, dst0);
1939 __ ldr(temp_0, src1); 1937 __ ldr(temp_0, src1);
1940 __ str(temp_0, dst1); 1938 __ str(temp_0, dst1);
1941 __ vstr(temp_1, src0); 1939 __ vstr(temp_1, src0);
1942 } else { 1940 } else {
1943 // No other combinations are possible. 1941 // No other combinations are possible.
1944 UNREACHABLE(); 1942 UNREACHABLE();
1945 } 1943 }
1946 } 1944 }
1947 1945
1948 1946
1949 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { 1947 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) {
1950 // On 32-bit ARM we emit the jump tables inline. 1948 // On 32-bit ARM we emit the jump tables inline.
1951 UNREACHABLE(); 1949 UNREACHABLE();
(...skipping 19 matching lines...) Expand all
1971 padding_size -= v8::internal::Assembler::kInstrSize; 1969 padding_size -= v8::internal::Assembler::kInstrSize;
1972 } 1970 }
1973 } 1971 }
1974 } 1972 }
1975 1973
1976 #undef __ 1974 #undef __
1977 1975
1978 } // namespace compiler 1976 } // namespace compiler
1979 } // namespace internal 1977 } // namespace internal
1980 } // namespace v8 1978 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698