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

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

Issue 2431093004: PPC/s390: [wasm] Trim graph before scheduling. (Closed)
Patch Set: Created 4 years, 2 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
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/compilation-info.h" 7 #include "src/compilation-info.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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 // i.InputRegister(2) ... right low word. 1152 // i.InputRegister(2) ... right low word.
1153 // i.InputRegister(3) ... right high word. 1153 // i.InputRegister(3) ... right high word.
1154 __ sllg(r0, i.InputRegister(1), Operand(32)); 1154 __ sllg(r0, i.InputRegister(1), Operand(32));
1155 __ sllg(r1, i.InputRegister(3), Operand(32)); 1155 __ sllg(r1, i.InputRegister(3), Operand(32));
1156 __ lr(r0, i.InputRegister(0)); 1156 __ lr(r0, i.InputRegister(0));
1157 __ lr(r1, i.InputRegister(2)); 1157 __ lr(r1, i.InputRegister(2));
1158 __ msgr(r1, r0); 1158 __ msgr(r1, r0);
1159 __ lr(i.OutputRegister(0), r1); 1159 __ lr(i.OutputRegister(0), r1);
1160 __ srag(i.OutputRegister(1), r1, Operand(32)); 1160 __ srag(i.OutputRegister(1), r1, Operand(32));
1161 break; 1161 break;
1162 case kS390_ShiftLeftPair: 1162 case kS390_ShiftLeftPair: {
1163 Register second_output =
1164 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1163 if (instr->InputAt(2)->IsImmediate()) { 1165 if (instr->InputAt(2)->IsImmediate()) {
1164 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), 1166 __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
1165 i.InputRegister(0), i.InputRegister(1), 1167 i.InputRegister(1), i.InputInt32(2));
1166 i.InputInt32(2));
1167 } else { 1168 } else {
1168 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), 1169 __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
1169 i.InputRegister(0), i.InputRegister(1), kScratchReg, 1170 i.InputRegister(1), kScratchReg, i.InputRegister(2));
1170 i.InputRegister(2));
1171 } 1171 }
1172 break; 1172 break;
1173 case kS390_ShiftRightPair: 1173 }
1174 case kS390_ShiftRightPair: {
1175 Register second_output =
1176 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1174 if (instr->InputAt(2)->IsImmediate()) { 1177 if (instr->InputAt(2)->IsImmediate()) {
1175 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), 1178 __ ShiftRightPair(i.OutputRegister(0), second_output,
1176 i.InputRegister(0), i.InputRegister(1), 1179 i.InputRegister(0), i.InputRegister(1),
1177 i.InputInt32(2)); 1180 i.InputInt32(2));
1178 } else { 1181 } else {
1179 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), 1182 __ ShiftRightPair(i.OutputRegister(0), second_output,
1180 i.InputRegister(0), i.InputRegister(1), kScratchReg, 1183 i.InputRegister(0), i.InputRegister(1), kScratchReg,
1181 i.InputRegister(2)); 1184 i.InputRegister(2));
1182 } 1185 }
1183 break; 1186 break;
1184 case kS390_ShiftRightArithPair: 1187 }
1188 case kS390_ShiftRightArithPair: {
1189 Register second_output =
1190 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1185 if (instr->InputAt(2)->IsImmediate()) { 1191 if (instr->InputAt(2)->IsImmediate()) {
1186 __ ShiftRightArithPair(i.OutputRegister(0), i.OutputRegister(1), 1192 __ ShiftRightArithPair(i.OutputRegister(0), second_output,
1187 i.InputRegister(0), i.InputRegister(1), 1193 i.InputRegister(0), i.InputRegister(1),
1188 i.InputInt32(2)); 1194 i.InputInt32(2));
1189 } else { 1195 } else {
1190 __ ShiftRightArithPair(i.OutputRegister(0), i.OutputRegister(1), 1196 __ ShiftRightArithPair(i.OutputRegister(0), second_output,
1191 i.InputRegister(0), i.InputRegister(1), 1197 i.InputRegister(0), i.InputRegister(1),
1192 kScratchReg, i.InputRegister(2)); 1198 kScratchReg, i.InputRegister(2));
1193 } 1199 }
1194 break; 1200 break;
1201 }
1195 #endif 1202 #endif
1196 case kS390_RotRight32: 1203 case kS390_RotRight32:
1197 if (HasRegisterInput(instr, 1)) { 1204 if (HasRegisterInput(instr, 1)) {
1198 __ LoadComplementRR(kScratchReg, i.InputRegister(1)); 1205 __ LoadComplementRR(kScratchReg, i.InputRegister(1));
1199 __ rll(i.OutputRegister(), i.InputRegister(0), kScratchReg); 1206 __ rll(i.OutputRegister(), i.InputRegister(0), kScratchReg);
1200 } else { 1207 } else {
1201 __ rll(i.OutputRegister(), i.InputRegister(0), 1208 __ rll(i.OutputRegister(), i.InputRegister(0),
1202 Operand(32 - i.InputInt32(1))); 1209 Operand(32 - i.InputInt32(1)));
1203 } 1210 }
1204 break; 1211 break;
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 padding_size -= 2; 2549 padding_size -= 2;
2543 } 2550 }
2544 } 2551 }
2545 } 2552 }
2546 2553
2547 #undef __ 2554 #undef __
2548 2555
2549 } // namespace compiler 2556 } // namespace compiler
2550 } // namespace internal 2557 } // namespace internal
2551 } // namespace v8 2558 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-selector-ppc.cc ('k') | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698