Commit 15bdd378 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

s390x: add AddU64 in macroassembler

Change-Id: I9ccd6181437017aea627373b9f323efa6b4a183d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3437825Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78931}
parent c98a5101
......@@ -2929,6 +2929,25 @@ void TurboAssembler::AddU64(Register dst, const Operand& imm) {
algfi(dst, imm);
}
void TurboAssembler::AddU64(Register dst, Register src1, Register src2) {
if (dst != src2 && dst != src1) {
if (CpuFeatures::IsSupported(DISTINCT_OPS)) {
algrk(dst, src1, src2);
} else {
lgr(dst, src1);
algr(dst, src2);
}
} else if (dst != src2) {
// dst == src1
DCHECK(dst == src1);
algr(dst, src2);
} else {
// dst == src2
DCHECK(dst == src2);
algr(dst, src1);
}
}
// Add Logical 32-bit (Register-Memory)
void TurboAssembler::AddU32(Register dst, const MemOperand& opnd) {
DCHECK(is_int20(opnd.offset()));
......
......@@ -240,6 +240,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Add Logical (Register - Immediate)
void AddU32(Register dst, const Operand& imm);
void AddU64(Register dst, const Operand& imm);
void AddU64(Register dst, Register src1, Register src2);
// Add Logical (Register - Mem)
void AddU32(Register dst, const MemOperand& opnd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment