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

Unified Diff: src/s390/macro-assembler-s390.cc

Issue 2591643005: S390 [Crankshaft]: Use LoadPositive for MathAbs (Closed)
Patch Set: Fix for John's comment Created 4 years 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/s390/macro-assembler-s390.cc
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc
index ed1daf1feabdc6ee406e3c100fcc8aed3cb98984..a49d678b06934cce02860e140935070d90842b0d 100644
--- a/src/s390/macro-assembler-s390.cc
+++ b/src/s390/macro-assembler-s390.cc
@@ -4132,6 +4132,19 @@ void MacroAssembler::Load(Register dst, const MemOperand& opnd) {
#endif
}
+void MacroAssembler::LoadPositiveP(Register result, Register input) {
+#if V8_TARGET_ARCH_S390X
+ lpgr(result, input);
+#else
+ lpr(result, input);
+#endif
+}
+
+void MacroAssembler::LoadPositive32(Register result, Register input) {
+ lpr(result, input);
+ lgfr(result, result);
+}
+
//-----------------------------------------------------------------------------
// Compare Helpers
//-----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698