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

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

Issue 1884573003: S390: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 __ LoadP(temp, src, r0); 1899 __ LoadP(temp, src, r0);
1900 __ StoreP(temp, g.ToMemOperand(destination)); 1900 __ StoreP(temp, g.ToMemOperand(destination));
1901 } 1901 }
1902 } else if (source->IsConstant()) { 1902 } else if (source->IsConstant()) {
1903 Constant src = g.ToConstant(source); 1903 Constant src = g.ToConstant(source);
1904 if (destination->IsRegister() || destination->IsStackSlot()) { 1904 if (destination->IsRegister() || destination->IsStackSlot()) {
1905 Register dst = 1905 Register dst =
1906 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 1906 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
1907 switch (src.type()) { 1907 switch (src.type()) {
1908 case Constant::kInt32: 1908 case Constant::kInt32:
1909 #if !V8_TARGET_ARCH_S390X
1910 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
1911 __ mov(dst, Operand(src.ToInt32(), src.rmode()));
1912 } else {
1913 __ mov(dst, Operand(src.ToInt32()));
1914 }
1915 #else
1909 __ mov(dst, Operand(src.ToInt32())); 1916 __ mov(dst, Operand(src.ToInt32()));
1917 #endif // V8_TARGET_ARCH_S390X
1910 break; 1918 break;
1911 case Constant::kInt64: 1919 case Constant::kInt64:
1920 #if V8_TARGET_ARCH_S390X
1921 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
1922 __ mov(dst, Operand(src.ToInt64(), src.rmode()));
1923 } else {
1924 __ mov(dst, Operand(src.ToInt64()));
1925 }
1926 #else
1912 __ mov(dst, Operand(src.ToInt64())); 1927 __ mov(dst, Operand(src.ToInt64()));
1928 #endif // V8_TARGET_ARCH_S390X
1913 break; 1929 break;
1914 case Constant::kFloat32: 1930 case Constant::kFloat32:
1915 __ Move(dst, 1931 __ Move(dst,
1916 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 1932 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
1917 break; 1933 break;
1918 case Constant::kFloat64: 1934 case Constant::kFloat64:
1919 __ Move(dst, 1935 __ Move(dst,
1920 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 1936 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
1921 break; 1937 break;
1922 case Constant::kExternalReference: 1938 case Constant::kExternalReference:
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 padding_size -= 2; 2094 padding_size -= 2;
2079 } 2095 }
2080 } 2096 }
2081 } 2097 }
2082 2098
2083 #undef __ 2099 #undef __
2084 2100
2085 } // namespace compiler 2101 } // namespace compiler
2086 } // namespace internal 2102 } // namespace internal
2087 } // namespace v8 2103 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698