Index: src/s390/macro-assembler-s390.cc |
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc |
index aede01dade2d1148d0d7587e80b12dde6549b3a4..37db6df1ba46859c5abc311562450d460f38f60e 100644 |
--- a/src/s390/macro-assembler-s390.cc |
+++ b/src/s390/macro-assembler-s390.cc |
@@ -4006,6 +4006,39 @@ void MacroAssembler::AddP(const MemOperand& opnd, const Operand& imm) { |
// Add Logical Instructions |
//---------------------------------------------------------------------------- |
+// Add Logical With Carry 32-bit (Register dst = Register src1 + Register src2) |
+void MacroAssembler::AddLogicalWithCarry32(Register dst, Register src1, |
+ Register src2) { |
+ if (!dst.is(src2) && !dst.is(src1)) { |
+ lr(dst, src1); |
+ alcr(dst, src2); |
+ } else if (!dst.is(src2)) { |
+ // dst == src1 |
+ DCHECK(dst.is(src1)); |
+ alcr(dst, src2); |
+ } else { |
+ // dst == src2 |
+ DCHECK(dst.is(src2)); |
+ alcr(dst, src1); |
+ } |
+} |
+ |
+// Add Logical 32-bit (Register dst = Register src1 + Register src2) |
+void MacroAssembler::AddLogical32(Register dst, Register src1, Register src2) { |
+ if (!dst.is(src2) && !dst.is(src1)) { |
+ lr(dst, src1); |
+ alr(dst, src2); |
+ } else if (!dst.is(src2)) { |
+ // dst == src1 |
+ DCHECK(dst.is(src1)); |
+ alr(dst, src2); |
+ } else { |
+ // dst == src2 |
+ DCHECK(dst.is(src2)); |
+ alr(dst, src1); |
+ } |
+} |
+ |
// Add Logical 32-bit (Register dst = Register dst + Immediate opnd) |
void MacroAssembler::AddLogical(Register dst, const Operand& imm) { |
alfi(dst, imm); |