Commit cb0afa5b authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64]Fix test-atomic-load-store-codegen failed

Change-Id: I5b3001cebcf97a239c259af7fc4ddc889c9a84a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3108947
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: 's avatarJi Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76402}
parent 1ebc36ee
......@@ -2465,6 +2465,32 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
case MachineRepresentation::kWord64:
opcode = kRiscvWord64AtomicLoadUint64;
break;
#ifdef V8_COMPRESS_POINTERS
case MachineRepresentation::kTaggedSigned:
opcode = kRiscv64LdDecompressTaggedSigned;
break;
case MachineRepresentation::kTaggedPointer:
opcode = kRiscv64LdDecompressTaggedPointer;
break;
case MachineRepresentation::kTagged:
opcode = kRiscv64LdDecompressAnyTagged;
break;
#else
case MachineRepresentation::kTaggedSigned: // Fall through.
case MachineRepresentation::kTaggedPointer: // Fall through.
case MachineRepresentation::kTagged:
if (kTaggedSize == 8) {
opcode = kRiscvWord64AtomicLoadUint64;
} else {
opcode = kAtomicLoadWord32;
}
break;
#endif
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
DCHECK(COMPRESS_POINTERS_BOOL);
opcode = kAtomicLoadWord32;
break;
default:
UNREACHABLE();
}
......@@ -2488,6 +2514,16 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
case MachineRepresentation::kWord64:
opcode = kRiscvWord64AtomicStoreWord64;
break;
case MachineRepresentation::kTaggedSigned: // Fall through.
case MachineRepresentation::kTaggedPointer: // Fall through.
case MachineRepresentation::kTagged:
opcode = kRiscvWord64AtomicStoreWord64;
break;
case MachineRepresentation::kCompressedPointer: // Fall through.
case MachineRepresentation::kCompressed:
CHECK(COMPRESS_POINTERS_BOOL);
opcode = kAtomicStoreWord32;
break;
default:
UNREACHABLE();
}
......
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