LoongArch: Assign DWARF register numbers to register aliases

.cfi directives only support the use of register numbers and not
register names or aliases.

This commit adds support for 4 formats, for example:
  .cfi_offset r1, 8
  .cfi_offset ra, 8
  .cfi_offset $r1,8
  .cfi_offset $ra,8

The above .cfi directives are equivalent and all represent dwarf
register number 1.

Display register aliases as specified in the psABI during disassembly.
This commit is contained in:
Lulu Cai
2024-12-09 11:21:40 +08:00
committed by liuzhensong
parent 01d8e0d24a
commit 3d75969bd0
7 changed files with 845 additions and 17 deletions

View File

@@ -267,6 +267,10 @@ dec2 : [1-9][0-9]?
extern const char *const loongarch_cr_normal_name[4];
extern const char *const loongarch_v_normal_name[32];
extern const char *const loongarch_x_normal_name[32];
extern const char *const loongarch_r_cfi_name[32];
extern const char *const loongarch_r_cfi_name_alias[32];
extern const char *const loongarch_f_cfi_name[32];
extern const char *const loongarch_f_cfi_name_alias[32];
extern struct loongarch_ase loongarch_ASEs[];