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

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

Issue 1807243002: S390: [wasm] Int64Lowering of Int64Sub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/macro-assembler-s390.cc
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc
index 37db6df1ba46859c5abc311562450d460f38f60e..789fa5d575d09efb569e6af647c1b94446e6f37c 100644
--- a/src/s390/macro-assembler-s390.cc
+++ b/src/s390/macro-assembler-s390.cc
@@ -4076,6 +4076,42 @@ void MacroAssembler::AddLogicalP(Register dst, const MemOperand& opnd) {
// Subtract Instructions
//----------------------------------------------------------------------------
+// Subtract Logical With Carry 32-bit (Register dst = Register src1 - Register
+// src2)
+void MacroAssembler::SubLogicalWithBorrow32(Register dst, Register src1,
+ Register src2) {
+ if (!dst.is(src2) && !dst.is(src1)) {
+ lr(dst, src1);
+ slbr(dst, src2);
+ } else if (!dst.is(src2)) {
+ // dst == src1
+ DCHECK(dst.is(src1));
+ slbr(dst, src2);
+ } else {
+ // dst == src2
+ DCHECK(dst.is(src2));
+ lr(r0, dst);
+ SubLogicalWithBorrow32(dst, src1, r0);
+ }
+}
+
+// Subtract Logical 32-bit (Register dst = Register src1 - Register src2)
+void MacroAssembler::SubLogical32(Register dst, Register src1, Register src2) {
+ if (!dst.is(src2) && !dst.is(src1)) {
+ lr(dst, src1);
+ slr(dst, src2);
+ } else if (!dst.is(src2)) {
+ // dst == src1
+ DCHECK(dst.is(src1));
+ slr(dst, src2);
+ } else {
+ // dst == src2
+ DCHECK(dst.is(src2));
+ lr(r0, dst);
+ SubLogical32(dst, src1, r0);
+ }
+}
+
// Subtract 32-bit (Register dst = Register dst - Immediate opnd)
void MacroAssembler::Sub32(Register dst, const Operand& imm) {
Add32(dst, Operand(-(imm.imm_)));
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698