aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2024-01-26 10:50:57 +0000
committerNick Clifton <nickc@redhat.com>2024-01-26 10:50:57 +0000
commit3988bf614f9f8761f51a5c7922977a60cb8402ff (patch)
tree18961c4432b3c0d7f1c58c902a3b4eed5b1fddfd /gas
parent75558017d5ee7c6f99fb3e68ea709744f0c3501e (diff)
downloadgdb-3988bf614f9f8761f51a5c7922977a60cb8402ff.zip
gdb-3988bf614f9f8761f51a5c7922977a60cb8402ff.tar.gz
gdb-3988bf614f9f8761f51a5c7922977a60cb8402ff.tar.bz2
Backport commits 969f5c0e1 (LoongArch: gas: Add support for s9 register) and a0aa6f4ab (LoongArch: ld: Add support for TLS LE symbol with addend) to 2.42 branch.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-loongarch.c7
-rw-r--r--gas/testsuite/gas/loongarch/loongarch.exp1
-rw-r--r--gas/testsuite/gas/loongarch/reg-s9.l1
-rw-r--r--gas/testsuite/gas/loongarch/reg-s9.s2
4 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index e6a9901..e0aff36 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -316,8 +316,11 @@ loongarch_after_parse_args ()
/* 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);
+ str_hash_insert (r_htab, loongarch_r_alias[i], (void *) (i + 1), 0);
+
+ for (i = 0; i < ARRAY_SIZE (loongarch_r_alias_1); i++)
+ str_hash_insert (r_htab, loongarch_r_alias_1[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);
diff --git a/gas/testsuite/gas/loongarch/loongarch.exp b/gas/testsuite/gas/loongarch/loongarch.exp
index 9ece4e8..422b858 100644
--- a/gas/testsuite/gas/loongarch/loongarch.exp
+++ b/gas/testsuite/gas/loongarch/loongarch.exp
@@ -31,4 +31,5 @@ if [istarget loongarch*-*-*] {
}
run_list_test "align"
+ run_list_test "reg-s9"
}
diff --git a/gas/testsuite/gas/loongarch/reg-s9.l b/gas/testsuite/gas/loongarch/reg-s9.l
new file mode 100644
index 0000000..8ea739b
--- /dev/null
+++ b/gas/testsuite/gas/loongarch/reg-s9.l
@@ -0,0 +1 @@
+# No warning or error expected.
diff --git a/gas/testsuite/gas/loongarch/reg-s9.s b/gas/testsuite/gas/loongarch/reg-s9.s
new file mode 100644
index 0000000..74f4048
--- /dev/null
+++ b/gas/testsuite/gas/loongarch/reg-s9.s
@@ -0,0 +1,2 @@
+# Add support for $s9 register
+addi.d $t0, $s9, 0