-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix field types in InlineeCallInfo. OS #15566165 #5490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix field types in InlineeCallInfo. OS #15566165 #5490
Conversation
78b1840 to
8fa0e00
Compare
lib/Backend/InlineeFrameInfo.cpp
Outdated
| { | ||
| this->PopulateParent(inlinee); | ||
| #if TARGET_32 | ||
| const size_t offsetMask = (~(size_t)0) >> 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Why not use uint32 here? Why hardcode 4 instead of (32 - ksizeofInlineeStartOffset) or (sizeof(uint) * CHAR_BIT - ksizeofInlineeStartOffset)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I should use uint32. Regarding the shift, I only want to make sure we are within the 28-bit limit on x86. currentOffset is uint32, so there's no point checking for 32 bit limit
In reply to: 204944353 [](ancestors = 204944353)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, regardless of which platform I want to do this check on, hardcoding 4 is probably not the best idea. I'll change that. Thanks.
lib/Backend/Encoder.cpp
Outdated
| uint32 Encoder::GetCurrentOffset() const | ||
| { | ||
| Assert(m_pc - m_encodeBuffer <= UINT_MAX); // encode buffer size is uint32 | ||
| AssertOrFailFast(m_pc - m_encodeBuffer <= UINT_MAX); // encode buffer size is uint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AssertOrFailFast [](start = 4, length = 16)
m_encodeBufferSize is a UINT32, so this failfast is redundant. Given that it can get called multiple times per instr, let's leave it as an assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
8fa0e00 to
a1fc0ae
Compare
…o. OS #15566165 Merge pull request #5490 from rajatd:inlineeCallInfo-type
No description provided.