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

ppc: [liftoff] implement LoadFromInstance

Change-Id: I1ada6628e8d17d313f6ee73fda40bb867e3e0ee4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906013
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74680}
parent 84fb5242
......@@ -45,6 +45,12 @@ inline MemOperand GetHalfStackSlot(int offset, RegPairHalf half) {
return MemOperand(fp, -kInstanceOffset - offset + half_offset);
}
inline MemOperand GetStackSlot(uint32_t offset) {
return MemOperand(fp, -offset);
}
inline MemOperand GetInstanceOperand() { return GetStackSlot(kInstanceOffset); }
inline constexpr Condition ToCondition(LiftoffCondition liftoff_cond) {
switch (liftoff_cond) {
case kEqual:
......@@ -155,12 +161,25 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
}
void LiftoffAssembler::LoadInstanceFromFrame(Register dst) {
bailout(kUnsupportedArchitecture, "LoadInstanceFromFrame");
LoadU64(dst, liftoff::GetInstanceOperand(), r0);
}
void LiftoffAssembler::LoadFromInstance(Register dst, Register instance,
int offset, int size) {
bailout(kUnsupportedArchitecture, "LoadFromInstance");
DCHECK_LE(0, offset);
switch (size) {
case 1:
LoadU8(dst, MemOperand(instance, offset), r0);
break;
case 4:
LoadU32(dst, MemOperand(instance, offset), r0);
break;
case 8:
LoadU64(dst, MemOperand(instance, offset), r0);
break;
default:
UNIMPLEMENTED();
}
}
void LiftoffAssembler::LoadTaggedPointerFromInstance(Register dst,
......
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