Skip to content

Commit

Permalink
Do not use const regMaskTP& as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed May 24, 2024
1 parent 95abd7c commit d53b620
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/coreclr/jit/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,31 +310,31 @@ struct regMaskTP
bool IsRegNumInMask(regNumber reg);
};

static regMaskTP operator^(const regMaskTP& first, const regMaskTP& second)
static regMaskTP operator^(regMaskTP first, regMaskTP second)
{
regMaskTP result(first.getLow() ^ second.getLow());
return result;
}

static regMaskTP operator&(const regMaskTP& first, const regMaskTP& second)
static regMaskTP operator&(regMaskTP first, regMaskTP second)
{
regMaskTP result(first.getLow() & second.getLow());
return result;
}

static regMaskTP operator|(const regMaskTP& first, const regMaskTP& second)
static regMaskTP operator|(regMaskTP first, regMaskTP second)
{
regMaskTP result(first.getLow() | second.getLow());
return result;
}

static regMaskTP& operator|=(regMaskTP& first, const regMaskTP& second)
static regMaskTP& operator|=(regMaskTP& first, regMaskTP second)
{
first = first | second;
return first;
}

static regMaskTP& operator^=(regMaskTP& first, const regMaskTP& second)
static regMaskTP& operator^=(regMaskTP& first, regMaskTP second)
{
first = first ^ second;
return first;
Expand All @@ -346,18 +346,18 @@ static regMaskTP& operator^=(regMaskTP& first, const regNumber reg)
return first;
}

static regMaskTP& operator&=(regMaskTP& first, const regMaskTP& second)
static regMaskTP& operator&=(regMaskTP& first, regMaskTP second)
{
first = first & second;
return first;
}

static bool operator==(const regMaskTP& first, const regMaskTP& second)
static bool operator==(regMaskTP first, regMaskTP second)
{
return (first.getLow() == second.getLow());
}

static bool operator!=(const regMaskTP& first, const regMaskTP& second)
static bool operator!=(regMaskTP first, regMaskTP second)
{
return !(first == second);
}
Expand Down Expand Up @@ -393,18 +393,18 @@ static regMaskTP& operator<<=(regMaskTP& first, const int b)
}
#endif

static regMaskTP operator~(const regMaskTP& first)
static regMaskTP operator~(regMaskTP first)
{
regMaskTP result(~first.getLow());
return result;
}

static uint32_t PopCount(const regMaskTP& value)
static uint32_t PopCount(regMaskTP value)
{
return BitOperations::PopCount(value.getLow());
}

static uint32_t BitScanForward(const regMaskTP& mask)
static uint32_t BitScanForward(regMaskTP mask)
{
return BitOperations::BitScanForward(mask.getLow());
}
Expand Down

0 comments on commit d53b620

Please sign in to comment.