Skip to content

Commit 0f5b5f4

Browse files
committed
Store sysreg names in-line with their descriptors.
This wastes some disk space, because we have to size the arrays for the maximum possible length. However, it eliminates dynamic relocations from the SysRegsList arrays.
1 parent d31fb26 commit 0f5b5f4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ AArch64StringToVectorLayout(StringRef LayoutStr) {
700700

701701
namespace AArch64SysReg {
702702
struct SysReg {
703-
const char *Name;
704-
const char *AltName;
703+
const char Name[32];
704+
const char AltName[32];
705705
unsigned Encoding;
706706
bool Readable;
707707
bool Writeable;

llvm/lib/Target/ARM/Utils/ARMBaseInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ inline static unsigned ARMCondCodeFromString(StringRef CC) {
189189
// System Registers
190190
namespace ARMSysReg {
191191
struct MClassSysReg {
192-
const char *Name;
192+
const char Name[32];
193193
uint16_t M1Encoding12;
194194
uint16_t M2M3Encoding8;
195195
uint16_t Encoding;

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ int getLoadFPImm(APFloat FPImm);
449449

450450
namespace RISCVSysReg {
451451
struct SysReg {
452-
const char *Name;
453-
const char *AltName;
454-
const char *DeprecatedName;
452+
const char Name[32];
453+
const char AltName[32];
454+
const char DeprecatedName[32];
455455
unsigned Encoding;
456456
// FIXME: add these additional fields when needed.
457457
// Privilege Access: Read, Write, Read-Only.

0 commit comments

Comments
 (0)