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

Side by Side Diff: src/compiler/ppc/code-generator-ppc.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
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-selector-ppc.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/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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 // i.InputRegister(1) ... left high word. 1234 // i.InputRegister(1) ... left high word.
1235 // i.InputRegister(2) ... right low word. 1235 // i.InputRegister(2) ... right low word.
1236 // i.InputRegister(3) ... right high word. 1236 // i.InputRegister(3) ... right high word.
1237 __ mullw(i.TempRegister(0), i.InputRegister(0), i.InputRegister(3)); 1237 __ mullw(i.TempRegister(0), i.InputRegister(0), i.InputRegister(3));
1238 __ mullw(i.TempRegister(1), i.InputRegister(2), i.InputRegister(1)); 1238 __ mullw(i.TempRegister(1), i.InputRegister(2), i.InputRegister(1));
1239 __ add(i.TempRegister(0), i.TempRegister(0), i.TempRegister(1)); 1239 __ add(i.TempRegister(0), i.TempRegister(0), i.TempRegister(1));
1240 __ mullw(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2)); 1240 __ mullw(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2));
1241 __ mulhwu(i.OutputRegister(1), i.InputRegister(0), i.InputRegister(2)); 1241 __ mulhwu(i.OutputRegister(1), i.InputRegister(0), i.InputRegister(2));
1242 __ add(i.OutputRegister(1), i.OutputRegister(1), i.TempRegister(0)); 1242 __ add(i.OutputRegister(1), i.OutputRegister(1), i.TempRegister(0));
1243 break; 1243 break;
1244 case kPPC_ShiftLeftPair: 1244 case kPPC_ShiftLeftPair: {
1245 Register second_output =
1246 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1245 if (instr->InputAt(2)->IsImmediate()) { 1247 if (instr->InputAt(2)->IsImmediate()) {
1246 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), 1248 __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
1247 i.InputRegister(0), i.InputRegister(1), 1249 i.InputRegister(1), i.InputInt32(2));
1248 i.InputInt32(2));
1249 } else { 1250 } else {
1250 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), 1251 __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
1251 i.InputRegister(0), i.InputRegister(1), kScratchReg, 1252 i.InputRegister(1), kScratchReg, i.InputRegister(2));
1252 i.InputRegister(2));
1253 } 1253 }
1254 break; 1254 break;
1255 case kPPC_ShiftRightPair: 1255 }
1256 case kPPC_ShiftRightPair: {
1257 Register second_output =
1258 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1256 if (instr->InputAt(2)->IsImmediate()) { 1259 if (instr->InputAt(2)->IsImmediate()) {
1257 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), 1260 __ ShiftRightPair(i.OutputRegister(0), second_output,
1258 i.InputRegister(0), i.InputRegister(1), 1261 i.InputRegister(0), i.InputRegister(1),
1259 i.InputInt32(2)); 1262 i.InputInt32(2));
1260 } else { 1263 } else {
1261 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), 1264 __ ShiftRightPair(i.OutputRegister(0), second_output,
1262 i.InputRegister(0), i.InputRegister(1), kScratchReg, 1265 i.InputRegister(0), i.InputRegister(1), kScratchReg,
1263 i.InputRegister(2)); 1266 i.InputRegister(2));
1264 } 1267 }
1265 break; 1268 break;
1266 case kPPC_ShiftRightAlgPair: 1269 }
1270 case kPPC_ShiftRightAlgPair: {
1271 Register second_output =
1272 instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
1267 if (instr->InputAt(2)->IsImmediate()) { 1273 if (instr->InputAt(2)->IsImmediate()) {
1268 __ ShiftRightAlgPair(i.OutputRegister(0), i.OutputRegister(1), 1274 __ ShiftRightAlgPair(i.OutputRegister(0), second_output,
1269 i.InputRegister(0), i.InputRegister(1), 1275 i.InputRegister(0), i.InputRegister(1),
1270 i.InputInt32(2)); 1276 i.InputInt32(2));
1271 } else { 1277 } else {
1272 __ ShiftRightAlgPair(i.OutputRegister(0), i.OutputRegister(1), 1278 __ ShiftRightAlgPair(i.OutputRegister(0), second_output,
1273 i.InputRegister(0), i.InputRegister(1), 1279 i.InputRegister(0), i.InputRegister(1),
1274 kScratchReg, i.InputRegister(2)); 1280 kScratchReg, i.InputRegister(2));
1275 } 1281 }
1276 break; 1282 break;
1283 }
1277 #endif 1284 #endif
1278 case kPPC_RotRight32: 1285 case kPPC_RotRight32:
1279 if (HasRegisterInput(instr, 1)) { 1286 if (HasRegisterInput(instr, 1)) {
1280 __ subfic(kScratchReg, i.InputRegister(1), Operand(32)); 1287 __ subfic(kScratchReg, i.InputRegister(1), Operand(32));
1281 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg, 1288 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg,
1282 i.OutputRCBit()); 1289 i.OutputRCBit());
1283 } else { 1290 } else {
1284 int sh = i.InputInt32(1); 1291 int sh = i.InputInt32(1);
1285 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit()); 1292 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit());
1286 } 1293 }
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 padding_size -= v8::internal::Assembler::kInstrSize; 2444 padding_size -= v8::internal::Assembler::kInstrSize;
2438 } 2445 }
2439 } 2446 }
2440 } 2447 }
2441 2448
2442 #undef __ 2449 #undef __
2443 2450
2444 } // namespace compiler 2451 } // namespace compiler
2445 } // namespace internal 2452 } // namespace internal
2446 } // namespace v8 2453 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698