Commit 7b8f8e0d authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

s390x: implement ALGR in sim

Change-Id: I89ddf2895619b27e87ee9c808e6f9104a153ebb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429291Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78895}
parent 57556df9
...@@ -8310,9 +8310,16 @@ EVALUATE(SGR) { ...@@ -8310,9 +8310,16 @@ EVALUATE(SGR) {
} }
EVALUATE(ALGR) { EVALUATE(ALGR) {
UNIMPLEMENTED(); DCHECK_OPCODE(ALGR);
USE(instr); DECODE_RRE_INSTRUCTION(r1, r2);
return 0; // 64-bit Non-clobbering unsigned arithmetics
uint64_t r1_val = get_register(r1);
uint64_t r2_val = get_register(r2);
bool isOF = CheckOverflowForUIntAdd(r1_val, r2_val);
SetS390ConditionCode<uint64_t>(r1_val + r2_val, 0);
SetS390OverflowCode(isOF);
set_register(r1, r1_val + r2_val);
return length;
} }
EVALUATE(SLGR) { EVALUATE(SLGR) {
......
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