@@ -83,7 +83,7 @@ class ARMTargetAsmStreamer : public ARMTargetStreamer {
8383 void emitSetFP (unsigned FpReg, unsigned SpReg, int64_t Offset = 0 ) override ;
8484 void emitMovSP (unsigned Reg, int64_t Offset = 0 ) override ;
8585 void emitPad (int64_t Offset) override ;
86- void emitRegSave (const SmallVectorImpl<unsigned > &RegList,
86+ void emitRegSave (const SmallVectorImpl<MCRegister > &RegList,
8787 bool isVector) override ;
8888 void emitUnwindRaw (int64_t Offset,
8989 const SmallVectorImpl<uint8_t > &Opcodes) override ;
@@ -165,8 +165,8 @@ void ARMTargetAsmStreamer::emitPad(int64_t Offset) {
165165 OS << " \t .pad\t #" << Offset << ' \n ' ;
166166}
167167
168- void ARMTargetAsmStreamer::emitRegSave (const SmallVectorImpl< unsigned > &RegList,
169- bool isVector) {
168+ void ARMTargetAsmStreamer::emitRegSave (
169+ const SmallVectorImpl<MCRegister> &RegList, bool isVector) {
170170 assert (RegList.size () && " RegList should not be empty" );
171171 if (isVector)
172172 OS << " \t .vsave\t {" ;
@@ -404,7 +404,7 @@ class ARMTargetELFStreamer : public ARMTargetStreamer {
404404 void emitSetFP (unsigned FpReg, unsigned SpReg, int64_t Offset = 0 ) override ;
405405 void emitMovSP (unsigned Reg, int64_t Offset = 0 ) override ;
406406 void emitPad (int64_t Offset) override ;
407- void emitRegSave (const SmallVectorImpl<unsigned > &RegList,
407+ void emitRegSave (const SmallVectorImpl<MCRegister > &RegList,
408408 bool isVector) override ;
409409 void emitUnwindRaw (int64_t Offset,
410410 const SmallVectorImpl<uint8_t > &Opcodes) override ;
@@ -472,7 +472,7 @@ class ARMELFStreamer : public MCELFStreamer {
472472 void emitSetFP (unsigned NewFpReg, unsigned NewSpReg, int64_t Offset = 0 );
473473 void emitMovSP (unsigned Reg, int64_t Offset = 0 );
474474 void emitPad (int64_t Offset);
475- void emitRegSave (const SmallVectorImpl<unsigned > &RegList, bool isVector);
475+ void emitRegSave (const SmallVectorImpl<MCRegister > &RegList, bool isVector);
476476 void emitUnwindRaw (int64_t Offset, const SmallVectorImpl<uint8_t > &Opcodes);
477477 void emitFill (const MCExpr &NumBytes, uint64_t FillValue,
478478 SMLoc Loc) override {
@@ -766,8 +766,8 @@ void ARMTargetELFStreamer::emitPad(int64_t Offset) {
766766 getStreamer ().emitPad (Offset);
767767}
768768
769- void ARMTargetELFStreamer::emitRegSave (const SmallVectorImpl< unsigned > &RegList,
770- bool isVector) {
769+ void ARMTargetELFStreamer::emitRegSave (
770+ const SmallVectorImpl<MCRegister> &RegList, bool isVector) {
771771 getStreamer ().emitRegSave (RegList, isVector);
772772}
773773
@@ -1412,17 +1412,17 @@ void ARMELFStreamer::emitPad(int64_t Offset) {
14121412
14131413static std::pair<unsigned , unsigned >
14141414collectHWRegs (const MCRegisterInfo &MRI, unsigned Idx,
1415- const SmallVectorImpl<unsigned > &RegList, bool IsVector,
1415+ const SmallVectorImpl<MCRegister > &RegList, bool IsVector,
14161416 uint32_t &Mask_) {
14171417 uint32_t Mask = 0 ;
14181418 unsigned Count = 0 ;
14191419 while (Idx > 0 ) {
1420- unsigned Reg = RegList[Idx - 1 ];
1420+ MCRegister Reg = RegList[Idx - 1 ];
14211421 if (Reg == ARM::RA_AUTH_CODE)
14221422 break ;
1423- Reg = MRI.getEncodingValue (Reg);
1424- assert (Reg < (IsVector ? 32U : 16U ) && " Register out of range" );
1425- unsigned Bit = (1u << Reg );
1423+ unsigned RegEnc = MRI.getEncodingValue (Reg);
1424+ assert (RegEnc < (IsVector ? 32U : 16U ) && " Register out of range" );
1425+ unsigned Bit = (1u << RegEnc );
14261426 if ((Mask & Bit) == 0 ) {
14271427 Mask |= Bit;
14281428 ++Count;
@@ -1434,7 +1434,7 @@ collectHWRegs(const MCRegisterInfo &MRI, unsigned Idx,
14341434 return {Idx, Count};
14351435}
14361436
1437- void ARMELFStreamer::emitRegSave (const SmallVectorImpl<unsigned > &RegList,
1437+ void ARMELFStreamer::emitRegSave (const SmallVectorImpl<MCRegister > &RegList,
14381438 bool IsVector) {
14391439 uint32_t Mask;
14401440 unsigned Idx, Count;
0 commit comments