Skip to content

Commit

Permalink
fix build break on osx/arm64 Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal Pathak committed May 23, 2024
1 parent 0778285 commit dc5ad92
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
28 changes: 28 additions & 0 deletions src/coreclr/jit/regset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,34 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/

#ifdef SWIFT_SUPPORT
regMaskTP rsAllCalleeSavedMask;
regMaskTP rsIntCalleeSavedMask;
#else // !SWIFT_SUPPORT
static constexpr regMaskTP rsAllCalleeSavedMask = RBM_CALLEE_SAVED;
static constexpr regMaskTP rsIntCalleeSavedMask = RBM_INT_CALLEE_SAVED;
#endif // !SWIFT_SUPPORT

regMaskTP RegSet::rsGetModifiedCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & rsAllCalleeSavedMask);
}

#ifdef TARGET_AMD64
regMaskTP RegSet::rsGetModifiedOsrIntCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & (rsIntCalleeSavedMask | RBM_EBP));
}
#endif // TARGET_AMD64

regMaskTP RegSet::rsGetModifiedIntCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & rsIntCalleeSavedMask);
}

//------------------------------------------------------------------------
// verifyRegUsed: verify that the register is marked as used.
//
Expand Down
27 changes: 3 additions & 24 deletions src/coreclr/jit/regset.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,39 +74,18 @@ class RegSet
bool rsModifiedRegsMaskInitialized; // Has rsModifiedRegsMask been initialized? Guards against illegal use.
#endif // DEBUG

#ifdef SWIFT_SUPPORT
regMaskTP rsAllCalleeSavedMask;
regMaskTP rsIntCalleeSavedMask;
#else // !SWIFT_SUPPORT
static constexpr regMaskTP rsAllCalleeSavedMask = RBM_CALLEE_SAVED;
static constexpr regMaskTP rsIntCalleeSavedMask = RBM_INT_CALLEE_SAVED;
#endif // !SWIFT_SUPPORT

public:
regMaskTP rsGetModifiedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return rsModifiedRegsMask;
}

regMaskTP rsGetModifiedCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & rsAllCalleeSavedMask);
}

regMaskTP rsGetModifiedIntCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & rsIntCalleeSavedMask);
}
regMaskTP rsGetModifiedCalleeSavedRegsMask() const;
regMaskTP rsGetModifiedIntCalleeSavedRegsMask() const;

#ifdef TARGET_AMD64
regMaskTP rsGetModifiedOsrIntCalleeSavedRegsMask() const
{
assert(rsModifiedRegsMaskInitialized);
return (rsModifiedRegsMask & (rsIntCalleeSavedMask | RBM_EBP));
}
regMaskTP rsGetModifiedOsrIntCalleeSavedRegsMask() const;
#endif // TARGET_AMD64

regMaskTP rsGetModifiedFltCalleeSavedRegsMask() const
Expand Down

0 comments on commit dc5ad92

Please sign in to comment.