[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/+/1849524 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#64192}
This commit is contained in:
parent
9bed3d6f15
commit
db5afff86e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user