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

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

Issue 2439673005: s390x: Implement kS390_RotLeftAndClear64 (Closed)
Patch Set: Created 4 years, 1 month 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/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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 int clearBitRight = i.InputInt32(3); 1240 int clearBitRight = i.InputInt32(3);
1241 __ rll(i.OutputRegister(), i.InputRegister(0), Operand(shiftAmount)); 1241 __ rll(i.OutputRegister(), i.InputRegister(0), Operand(shiftAmount));
1242 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitLeft)); 1242 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitLeft));
1243 __ srlg(i.OutputRegister(), i.OutputRegister(), 1243 __ srlg(i.OutputRegister(), i.OutputRegister(),
1244 Operand((clearBitLeft + clearBitRight))); 1244 Operand((clearBitLeft + clearBitRight)));
1245 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitRight)); 1245 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitRight));
1246 } 1246 }
1247 break; 1247 break;
1248 #if V8_TARGET_ARCH_S390X 1248 #if V8_TARGET_ARCH_S390X
1249 case kS390_RotLeftAndClear64: 1249 case kS390_RotLeftAndClear64:
1250 UNIMPLEMENTED(); // Find correct instruction 1250 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) {
1251 int shiftAmount = i.InputInt32(1);
1252 int endBit = 63 - shiftAmount;
1253 int startBit = 63 - i.InputInt32(2);
1254 __ risbg(i.OutputRegister(), i.InputRegister(0), Operand(startBit),
1255 Operand(endBit), Operand(shiftAmount), true);
1256 } else {
1257 int shiftAmount = i.InputInt32(1);
1258 int clearBit = 63 - i.InputInt32(2);
1259 __ rllg(i.OutputRegister(), i.InputRegister(0), Operand(shiftAmount));
1260 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBit));
1261 __ srlg(i.OutputRegister(), i.OutputRegister(),
1262 Operand(clearBit + shiftAmount));
1263 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(shiftAmount));
1264 }
1251 break; 1265 break;
1252 case kS390_RotLeftAndClearLeft64: 1266 case kS390_RotLeftAndClearLeft64:
1253 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) { 1267 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) {
1254 int shiftAmount = i.InputInt32(1); 1268 int shiftAmount = i.InputInt32(1);
1255 int endBit = 63; 1269 int endBit = 63;
1256 int startBit = 63 - i.InputInt32(2); 1270 int startBit = 63 - i.InputInt32(2);
1257 __ risbg(i.OutputRegister(), i.InputRegister(0), Operand(startBit), 1271 __ risbg(i.OutputRegister(), i.InputRegister(0), Operand(startBit),
1258 Operand(endBit), Operand(shiftAmount), true); 1272 Operand(endBit), Operand(shiftAmount), true);
1259 } else { 1273 } else {
1260 int shiftAmount = i.InputInt32(1); 1274 int shiftAmount = i.InputInt32(1);
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 padding_size -= 2; 2563 padding_size -= 2;
2550 } 2564 }
2551 } 2565 }
2552 } 2566 }
2553 2567
2554 #undef __ 2568 #undef __
2555 2569
2556 } // namespace compiler 2570 } // namespace compiler
2557 } // namespace internal 2571 } // namespace internal
2558 } // namespace v8 2572 } // 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