for (i = 0; i < ARRAY_SIZE (loongarch_r_normal_name); i++)
str_hash_insert (r_htab, loongarch_r_normal_name[i], (void *) (i + 1), 0);
+ /* Init ilp32/lp64 registers alias. */
+ r_abi_names = loongarch_r_alias;
+ for (i = 0; i < ARRAY_SIZE (loongarch_r_alias); i++)
+ str_hash_insert (r_htab, loongarch_r_alias[i], (void *) (i + 1),
+ 0);
+ for (i = 0; i < ARRAY_SIZE (loongarch_r_alias_deprecated); i++)
+ str_hash_insert (r_deprecated_htab, loongarch_r_alias_deprecated[i],
+ (void *) (i + 1), 0);
+
if (!cr_htab)
cr_htab = str_htab_create (), str_hash_insert (cr_htab, "", 0, 0);
str_hash_insert (f_htab, loongarch_f_normal_name[i], (void *) (i + 1),
0);
+ /* Init float-ilp32/lp64 registers alias. */
+ f_abi_names = loongarch_f_alias;
+ for (i = 0; i < ARRAY_SIZE (loongarch_f_alias); i++)
+ str_hash_insert (f_htab, loongarch_f_alias[i],
+ (void *) (i + 1), 0);
+ for (i = 0; i < ARRAY_SIZE (loongarch_f_alias_deprecated); i++)
+ str_hash_insert (f_deprecated_htab, loongarch_f_alias_deprecated[i],
+ (void *) (i + 1), 0);
+
if (!fc_htab)
fc_htab = str_htab_create (), str_hash_insert (fc_htab, "", 0, 0);
0);
}
- /* Init lp64 registers alias. */
- if (LARCH_opts.ase_lp64)
- {
- r_abi_names = loongarch_r_lp64_name;
- for (i = 0; i < ARRAY_SIZE (loongarch_r_lp64_name); i++)
- str_hash_insert (r_htab, loongarch_r_lp64_name[i], (void *) (i + 1),
- 0);
- for (i = 0; i < ARRAY_SIZE (loongarch_r_lp64_name_deprecated); i++)
- str_hash_insert (r_deprecated_htab, loongarch_r_lp64_name_deprecated[i],
- (void *) (i + 1), 0);
- }
-
- /* Init float-lp64 registers alias */
- if ((LARCH_opts.ase_sf || LARCH_opts.ase_df) && LARCH_opts.ase_lp64)
- {
- f_abi_names = loongarch_f_lp64_name;
- for (i = 0; i < ARRAY_SIZE (loongarch_f_lp64_name); i++)
- str_hash_insert (f_htab, loongarch_f_lp64_name[i],
- (void *) (i + 1), 0);
- for (i = 0; i < ARRAY_SIZE (loongarch_f_lp64_name_deprecated); i++)
- str_hash_insert (f_deprecated_htab, loongarch_f_lp64_name_deprecated[i],
- (void *) (i + 1), 0);
- }
}
const char *
info.target_desc = tdesc;
info.tdesc_data = tdesc_data.get ();
- for (int i = 0; i < ARRAY_SIZE (loongarch_r_lp64_name); ++i)
- if (loongarch_r_lp64_name[i][0] != '\0')
- user_reg_add (gdbarch, loongarch_r_lp64_name[i] + 1,
+ for (int i = 0; i < ARRAY_SIZE (loongarch_r_alias); ++i)
+ if (loongarch_r_alias[i][0] != '\0')
+ user_reg_add (gdbarch, loongarch_r_alias[i] + 1,
value_of_loongarch_user_reg, (void *) (size_t) i);
- for (int i = 0; i < ARRAY_SIZE (loongarch_f_lp64_name); ++i)
+ for (int i = 0; i < ARRAY_SIZE (loongarch_f_alias); ++i)
{
- if (loongarch_f_lp64_name[i][0] != '\0')
- user_reg_add (gdbarch, loongarch_f_lp64_name[i] + 1,
+ if (loongarch_f_alias[i][0] != '\0')
+ user_reg_add (gdbarch, loongarch_f_alias[i] + 1,
value_of_loongarch_user_reg,
(void *) (size_t) (LOONGARCH_FIRST_FP_REGNUM + i));
}
extern void loongarch_eliminate_adjacent_repeat_char (char *dest, char c);
extern const char *const loongarch_r_normal_name[32];
- extern const char *const loongarch_r_lp64_name[32];
- extern const char *const loongarch_r_lp64_name_deprecated[32];
+ extern const char *const loongarch_r_alias[32];
+ extern const char *const loongarch_r_alias_deprecated[32];
extern const char *const loongarch_f_normal_name[32];
- extern const char *const loongarch_f_lp64_name[32];
- extern const char *const loongarch_f_lp64_name_deprecated[32];
+ extern const char *const loongarch_f_alias[32];
+ extern const char *const loongarch_f_alias_deprecated[32];
extern const char *const loongarch_fc_normal_name[4];
extern const char *const loongarch_fc_numeric_name[4];
extern const char *const loongarch_c_normal_name[8];
LARCH_opts.ase_lvz = 1;
LARCH_opts.ase_lbt = 1;
- loongarch_r_disname = loongarch_r_lp64_name;
- loongarch_f_disname = loongarch_f_lp64_name;
+ loongarch_r_disname = loongarch_r_alias;
+ loongarch_f_disname = loongarch_f_alias;
loongarch_fc_disname = loongarch_fc_normal_name;
loongarch_c_disname = loongarch_c_normal_name;
loongarch_cr_disname = loongarch_cr_normal_name;
"$r24", "$r25", "$r26", "$r27", "$r28", "$r29", "$r30", "$r31",
};
-const char *const loongarch_r_lp64_name[32] =
+const char *const loongarch_r_alias[32] =
{
"$zero", "$ra", "$tp", "$sp", "$a0", "$a1", "$a2", "$a3",
"$a4", "$a5", "$a6", "$a7", "$t0", "$t1", "$t2", "$t3",
"$s1", "$s2", "$s3", "$s4", "$s5", "$s6", "$s7", "$s8",
};
-const char *const loongarch_r_lp64_name_deprecated[32] =
+const char *const loongarch_r_alias_deprecated[32] =
{
"", "", "", "", "$v0", "$v1", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "$x", "", "", "", "", "", "", "", "", "", "",
"$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31",
};
-const char *const loongarch_f_lp64_name[32] =
+const char *const loongarch_f_alias[32] =
{
"$fa0", "$fa1", "$fa2", "$fa3", "$fa4", "$fa5", "$fa6", "$fa7",
"$ft0", "$ft1", "$ft2", "$ft3", "$ft4", "$ft5", "$ft6", "$ft7",
"$fs0", "$fs1", "$fs2", "$fs3", "$fs4", "$fs5", "$fs6", "$fs7",
};
-const char *const loongarch_f_lp64_name_deprecated[32] =
+const char *const loongarch_f_alias_deprecated[32] =
{
"$fv0", "$fv1", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",