Skip to content
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

Remove FOREACH_REGISTER_FILE macro #57613

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/coreclr/jit/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
#include "regset.h"
#include "jitgcinfo.h"

#if defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_ARM)
#define FOREACH_REGISTER_FILE(file) \
for ((file) = &(this->intRegState); (file) != NULL; \
(file) = ((file) == &(this->intRegState)) ? &(this->floatRegState) : NULL)
#else
#define FOREACH_REGISTER_FILE(file) (file) = &(this->intRegState);
#endif

class CodeGen final : public CodeGenInterface
{
friend class emitter;
Expand Down
14 changes: 9 additions & 5 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7562,8 +7562,6 @@ void CodeGen::genFnProlog()
* Take care of register arguments first
*/

RegState* regState;

// Update the arg initial register locations.
compiler->lvaUpdateArgsWithInitialReg();

Expand All @@ -7572,8 +7570,7 @@ void CodeGen::genFnProlog()
//
if (!compiler->opts.IsOSR())
{
FOREACH_REGISTER_FILE(regState)
{
auto assignIncomingRegisterArgs = [this, initReg, &initRegZeroed](RegState* regState) {
if (regState->rsCalleeRegArgMaskLiveIn)
{
// If we need an extra register to shuffle around the incoming registers
Expand All @@ -7600,7 +7597,14 @@ void CodeGen::genFnProlog()
initRegZeroed = false;
}
}
}
};

#if defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_ARM)
assignIncomingRegisterArgs(&intRegState);
assignIncomingRegisterArgs(&floatRegState);
#else
assignIncomingRegisterArgs(&intRegState);
#endif
}

// Home the incoming arguments.
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/jit/cpp.hint
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// See the article on hints in MSDN for more information on their necessity and use:
// http://msdn.microsoft.com/en-us/library/dd997977.aspx

#define FOREACH_REGISTER_FILE(file) for (;;)

// From jit.h

#define INDEBUG(x) x
Expand Down