Skip to content

Commit c4befe9

Browse files
committed
Revert "Revert "[RISC-V] Added designated output instruction emitters (dotnet#96741)""
This reverts commit ecc044d.
1 parent ecc044d commit c4befe9

4 files changed

Lines changed: 1032 additions & 643 deletions

File tree

src/coreclr/jit/emit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ void emitLclVarAddr::initLclVarAddr(int varNum, unsigned offset)
707707
}
708708

709709
// Returns the variable to access. Note that it returns a negative number for compiler spill temps.
710-
int emitLclVarAddr::lvaVarNum()
710+
int emitLclVarAddr::lvaVarNum() const
711711
{
712712
switch (_lvaTag)
713713
{
@@ -721,7 +721,7 @@ int emitLclVarAddr::lvaVarNum()
721721
}
722722
}
723723

724-
unsigned emitLclVarAddr::lvaOffset() // returns the offset into the variable to access
724+
unsigned emitLclVarAddr::lvaOffset() const // returns the offset into the variable to access
725725
{
726726
switch (_lvaTag)
727727
{
@@ -9777,7 +9777,7 @@ void emitter::emitRemoveLastInstruction()
97779777
* emitGetInsSC: Get the instruction's constant value.
97789778
*/
97799779

9780-
cnsval_ssize_t emitter::emitGetInsSC(instrDesc* id)
9780+
cnsval_ssize_t emitter::emitGetInsSC(const instrDesc* id) const
97819781
{
97829782
#ifdef TARGET_ARM // should it be TARGET_ARMARCH? Why do we need this? Note that on ARM64 we store scaled immediates
97839783
// for some formats

src/coreclr/jit/emit.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,9 @@ struct emitLclVarAddr
418418
// Constructor
419419
void initLclVarAddr(int varNum, unsigned offset);
420420

421-
int lvaVarNum(); // Returns the variable to access. Note that it returns a negative number for compiler spill temps.
422-
unsigned lvaOffset(); // returns the offset into the variable to access
421+
int lvaVarNum() const; // Returns the variable to access. Note that it returns a negative number for compiler spill
422+
// temps.
423+
unsigned lvaOffset() const; // returns the offset into the variable to access
423424

424425
// This struct should be 32 bits in size for the release build.
425426
// We have this constraint because this type is used in a union
@@ -2225,7 +2226,7 @@ class emitter
22252226
static const IS_INFO emitGetSchedInfo(insFormat f);
22262227
#endif // TARGET_XARCH
22272228

2228-
cnsval_ssize_t emitGetInsSC(instrDesc* id);
2229+
cnsval_ssize_t emitGetInsSC(const instrDesc* id) const;
22292230
unsigned emitInsCount;
22302231

22312232
/************************************************************************/

0 commit comments

Comments
 (0)