Commit db5afff8 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[ptr-compr] Fix build issues on win64 and mac64

Bug: v8:7703
Change-Id: If8605f4dc4ab50fb5a95b43994262c8f3edd92a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1849524Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64192}
parent 9bed3d6f
......@@ -359,7 +359,7 @@
# define V8_ASSUME_ALIGNED(ptr, alignment) \
__builtin_assume_aligned((ptr), (alignment))
#else
# define V8_ASSUME_ALIGNED(ptr) (ptr)
# define V8_ASSUME_ALIGNED(ptr, alignment) (ptr)
#endif
......
......@@ -411,13 +411,15 @@ TEST(CompressDecompressTaggedAnyPointer) {
}
TEST(CompressDecompressTaggedAnySigned) {
RawMachineAssemblerTester<Address> m;
RawMachineAssemblerTester<void*> m;
Smi smi = Smi::FromInt(123);
Node* node = m.Int64Constant(static_cast<int64_t>(smi.ptr()));
m.Return(m.ChangeCompressedToTagged(m.ChangeTaggedToCompressed(node)));
Object result = Object(reinterpret_cast<Address>(m.Call()));
Address smiPointer =
DecompressTaggedAny(m.isolate(), CompressTagged(smi.ptr()));
CHECK_EQ(smiPointer, m.Call());
CHECK_EQ(smiPointer, result.ptr());
}
TEST(CompressDecompressTaggedPointer) {
......@@ -434,13 +436,15 @@ TEST(CompressDecompressTaggedPointer) {
}
TEST(CompressDecompressTaggedSigned) {
RawMachineAssemblerTester<int64_t> m;
RawMachineAssemblerTester<void*> m;
Smi smi = Smi::FromInt(123);
int64_t smiPointer = static_cast<int64_t>(smi.ptr());
Node* node = m.Int64Constant(smiPointer);
Address smiPointer = smi.ptr();
Node* node = m.Int64Constant(static_cast<int64_t>(smiPointer));
m.Return(m.ChangeCompressedSignedToTaggedSigned(
m.ChangeTaggedSignedToCompressedSigned(node)));
CHECK_EQ(smiPointer, m.Call());
Object result = Object(reinterpret_cast<Address>(m.Call()));
CHECK_EQ(smiPointer, result.ptr());
}
#endif // V8_COMPRESS_POINTERS
......
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