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

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1975283002: Subzero, MIPS32: Implement logical instructions ashr, lshr, shl (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index 79f02fbaefac2a5b395a0f1f37f3cd834e881a2b..a2e82b266535a2149254aac634e52fbb1d6ef343 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -692,9 +692,6 @@ void TargetMIPS32::lowerArithmetic(const InstArithmetic *Instr) {
switch (Instr->getOp()) {
default:
break;
- case InstArithmetic::Shl:
- case InstArithmetic::Lshr:
- case InstArithmetic::Ashr:
case InstArithmetic::Udiv:
case InstArithmetic::Sdiv:
case InstArithmetic::Urem:
@@ -742,12 +739,21 @@ void TargetMIPS32::lowerArithmetic(const InstArithmetic *Instr) {
_mov(Dest, T);
return;
}
- case InstArithmetic::Shl:
- break;
- case InstArithmetic::Lshr:
- break;
- case InstArithmetic::Ashr:
- break;
+ case InstArithmetic::Shl: {
+ _sllv(T, Src0R, Src1R);
+ _mov(Dest, T);
+ return;
+ }
+ case InstArithmetic::Lshr: {
+ _srlv(T, Src0R, Src1R);
+ _mov(Dest, T);
+ return;
+ }
+ case InstArithmetic::Ashr: {
+ _srav(T, Src0R, Src1R);
+ _mov(Dest, T);
+ return;
+ }
case InstArithmetic::Udiv:
break;
case InstArithmetic::Sdiv:

Powered by Google App Engine
This is Rietveld 408576698