ppc: [liftoff] implement LoadCallerFrameSlot

Change-Id: Iffe01cd3b49aa8b590b4930b3ea94fb52419b83c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985502
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75389}
This commit is contained in:
Junliang Yan 2021-06-24 13:11:56 -04:00 committed by V8 LUCI CQ
parent 11e1a6eb3b
commit c8ec56598a

View File

@ -446,7 +446,40 @@ void LiftoffAssembler::AtomicFence() { sync(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueKind kind) {
bailout(kUnsupportedArchitecture, "LoadCallerFrameSlot");
int32_t offset = (caller_slot_idx + 1) * kSystemPointerSize;
switch (kind) {
case kI32: {
#if defined(V8_TARGET_BIG_ENDIAN)
LoadS32(dst.gp(), MemOperand(fp, offset + 4), r0);
break;
#else
LoadS32(dst.gp(), MemOperand(fp, offset), r0);
break;
#endif
}
case kRef:
case kRtt:
case kOptRef:
case kRttWithDepth:
case kI64: {
LoadU64(dst.gp(), MemOperand(fp, offset), r0);
break;
}
case kF32: {
LoadF32(dst.fp(), MemOperand(fp, offset), r0);
break;
}
case kF64: {
LoadF64(dst.fp(), MemOperand(fp, offset), r0);
break;
}
case kS128: {
bailout(kSimd, "simd load");
break;
}
default:
UNREACHABLE();
}
}
void LiftoffAssembler::StoreCallerFrameSlot(LiftoffRegister src,