Skip to content

Commit

Permalink
Add MCRegisterClass_getRegister
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Aug 27, 2024
1 parent e5eda51 commit 509ae13
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 98 deletions.
4 changes: 4 additions & 0 deletions MCRegisterInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,7 @@ bool MCRegisterClass_contains(const MCRegisterClass *c, unsigned Reg)

return (c->RegSet[Byte] & (1 << InByte)) != 0;
}

unsigned MCRegisterClass_getRegister(const MCRegisterClass *c, unsigned RegNo) {
return c->RegsBegin[RegNo];
}
2 changes: 2 additions & 0 deletions MCRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,6 @@ const MCRegisterClass* MCRegisterInfo_getRegClass(const MCRegisterInfo *RI, unsi

bool MCRegisterClass_contains(const MCRegisterClass *c, unsigned Reg);

unsigned MCRegisterClass_getRegister(const MCRegisterClass *c, unsigned i);

#endif
Loading

0 comments on commit 509ae13

Please sign in to comment.