Commit 8cf49c2d authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: Introduce CagedPointer

Port afd15549

Original Commit Message:

    A CagedPointer is guaranteed to point into the Virtual Memory Cage and
    will for example be used for ArrayBuffer backing stores when the heap
    sandbox is enabled. In the current implementation, CagedPointers are
    stored as offsets from the cage base, shifted to the left. Because the
    cage base address is usually available in a register, accessing a
    CagedPointer is very efficient, requiring only an additional shift and
    add operation.

R=saelo@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I6d5b9da23f35b60dffecb5fc5acb9c7fa362df14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3250935Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77624}
parent c019bbbf
......@@ -193,6 +193,7 @@ static void VisitLoadCommon(InstructionSelector* selector, Node* node,
break;
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
case MachineRepresentation::kCagedPointer: // Fall through.
#ifdef V8_COMPRESS_POINTERS
opcode = kPPC_LoadWordS32;
mode = kInt16Imm_4ByteAligned;
......@@ -338,6 +339,7 @@ void VisitStoreCommon(InstructionSelector* selector, Node* node,
break;
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
case MachineRepresentation::kCagedPointer: // Fall through.
#ifdef V8_COMPRESS_POINTERS
opcode = kPPC_StoreCompressTagged;
break;
......
......@@ -292,6 +292,7 @@ ArchOpcode SelectLoadOpcode(LoadRepresentation load_rep) {
break;
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
case MachineRepresentation::kCagedPointer: // Fall through.
#ifdef V8_COMPRESS_POINTERS
opcode = kS390_LoadWordS32;
break;
......@@ -774,6 +775,7 @@ static void VisitGeneralStore(
break;
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
case MachineRepresentation::kCagedPointer: // Fall through.
#ifdef V8_COMPRESS_POINTERS
opcode = kS390_StoreCompressTagged;
break;
......
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