Commit 51a55a3b authored by Richard Townsend's avatar Richard Townsend Committed by Commit Bot

[arm64][msvc] Temporarily deinline LinkageLocation::IsRegister

MSVC versions 19.24 and onward generate invalid code for this
function. The workaround is to deinline it. This probably costs
some performance, but is not intended to be permanent.

Bug: v8:10352
Change-Id: I8a9b8f70c77f26c8af86c679aae8c9fb8ec28cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118530Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66880}
parent efb1b5e4
......@@ -18,6 +18,13 @@
#include "src/runtime/runtime.h"
#include "src/zone/zone.h"
#if !defined(__clang__) && defined(_M_ARM64)
// _M_ARM64 is an MSVC-specific macro that clang-cl emulates.
#define NO_INLINE_FOR_ARM64_MSVC __declspec(noinline)
#else
#define NO_INLINE_FOR_ARM64_MSVC
#endif
namespace v8 {
class CFunctionInfo;
......@@ -136,7 +143,9 @@ class LinkageLocation {
LocationField::kShift;
}
bool IsRegister() const { return TypeField::decode(bit_field_) == REGISTER; }
NO_INLINE_FOR_ARM64_MSVC bool IsRegister() const {
return TypeField::decode(bit_field_) == REGISTER;
}
bool IsAnyRegister() const {
return IsRegister() && GetLocation() == ANY_REGISTER;
}
......@@ -515,5 +524,6 @@ class V8_EXPORT_PRIVATE Linkage : public NON_EXPORTED_BASE(ZoneObject) {
} // namespace compiler
} // namespace internal
} // namespace v8
#undef NO_INLINE_FOR_ARM64_MSVC
#endif // V8_COMPILER_LINKAGE_H_
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