diff options
| author | Javed Absar <javed.absar@arm.com> | 2017-08-03 01:24:12 +0000 |
|---|---|---|
| committer | Javed Absar <javed.absar@arm.com> | 2017-08-03 01:24:12 +0000 |
| commit | 054d1aef4349f58d8d74bea658f95a839168bcce (patch) | |
| tree | c090f132d722696a349ddf26bdbd49f8472350f8 /llvm/lib/Target/ARM/Utils | |
| parent | 449fdf816e0b18ff75c2b4a9b3f9ce83063c57b6 (diff) | |
| download | bcm5719-llvm-054d1aef4349f58d8d74bea658f95a839168bcce.tar.gz bcm5719-llvm-054d1aef4349f58d8d74bea658f95a839168bcce.zip | |
[ARM] Tidy up banked registers encoding
Moves encoding (SYSm) information of banked registers to ARMSystemRegister.td,
where it rightly belongs and forms a single point of reference in the code.
Reviewed by: @fhahn, @rovka, @olista01
Differential Revision: https://reviews.llvm.org/D36219
llvm-svn: 309910
Diffstat (limited to 'llvm/lib/Target/ARM/Utils')
| -rw-r--r-- | llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp | 11 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/Utils/ARMBaseInfo.h | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp index 08c2afc4fc3..3da1b0520cd 100644 --- a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp +++ b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp @@ -18,7 +18,7 @@ using namespace llvm; namespace llvm { - namespace ARMSysReg { +namespace ARMSysReg { // lookup system register using 12-bit SYSm value. // Note: the search is uniqued using M1 mask @@ -40,5 +40,10 @@ const MClassSysReg *lookupMClassSysRegBy8bitSYSmValue(unsigned SYSm) { #define GET_MCLASSSYSREG_IMPL #include "ARMGenSystemRegister.inc" - } -} +} // end namespace ARMSysReg + +namespace ARMBankedReg { +#define GET_BANKEDREG_IMPL +#include "ARMGenSystemRegister.inc" +} // end namespce ARMSysReg +} // end namespace llvm diff --git a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h index dc8c83c1cbf..56abd8ba86b 100644 --- a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h +++ b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h @@ -24,6 +24,7 @@ namespace llvm { +// System Registers namespace ARMSysReg { struct MClassSysReg { const char *Name; @@ -59,6 +60,16 @@ namespace ARMSysReg { } // end namespace ARMSysReg +// Banked Registers +namespace ARMBankedReg { + struct BankedReg { + const char *Name; + uint16_t Encoding; + }; + #define GET_BANKEDREG_DECL + #include "ARMGenSystemRegister.inc" +} // end namespace ARMBankedReg + } // end namespace llvm #endif // LLVM_LIB_TARGET_ARM_UTILS_ARMBASEINFO_H |

