Skip to content

Commit 3f9b882

Browse files
ticat123Zeno-sole
authored andcommitted
LoongArch: sync from gcc upstream
And fix patch file: riscv64-inline-subword-atomic.diff
1 parent 4cb3578 commit 3f9b882

File tree

319 files changed

+51123
-41240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+51123
-41240
lines changed

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
gcc-12 (12.3.0-17deepin10) unstable; urgency=medium
2+
3+
* LoongArch: sync to lastest commit: 60e99901aef8e7efd4d60adf9f82021fcbd1101f
4+
5+
-- Peng Fan <[email protected]> Mon, 23 Dec 2024 08:35:28 +0000
6+
17
gcc-12 (12.3.0-17deepin9) unstable; urgency=medium
28

39
* move libgcc_s.so.1 to /usr for DEP17

debian/patches/loong64/0001-loongarch-add-alternatives-for-idiv-insns-to-improve.diff

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 2d0b5367d14fd6ceaadefc35c2a803746c489682 Mon Sep 17 00:00:00 2001
1+
From 1e6d1329bfc6d0e93006da98b09b0c52a2582085 Mon Sep 17 00:00:00 2001
22
From: Xi Ruoyao <[email protected]>
33
Date: Wed, 6 Jul 2022 13:45:55 +0800
4-
Subject: [PATCH 001/133] loongarch: add alternatives for idiv insns to improve
4+
Subject: [PATCH 001/301] loongarch: add alternatives for idiv insns to improve
55
code generation
66

77
Currently in the description of LoongArch integer division instructions,
@@ -40,19 +40,19 @@ gcc/testsuite/ChangeLog:
4040
Signed-off-by: Peng Fan <[email protected]>
4141
Signed-off-by: ticat_fp <[email protected]>
4242
---
43-
gcc/config/loongarch/loongarch-protos.h | 1 +
44-
gcc/config/loongarch/loongarch.cc | 2 +-
45-
gcc/config/loongarch/loongarch.md | 28 +++++++++++++++-------
46-
gcc/testsuite/gcc.target/loongarch/div-1.c | 9 +++++++
47-
gcc/testsuite/gcc.target/loongarch/div-2.c | 9 +++++++
48-
gcc/testsuite/gcc.target/loongarch/div-3.c | 9 +++++++
43+
src/gcc/config/loongarch/loongarch-protos.h | 1 +
44+
src/gcc/config/loongarch/loongarch.cc | 2 +-
45+
src/gcc/config/loongarch/loongarch.md | 28 +++++++++++++------
46+
.../testsuite/gcc.target/loongarch/div-1.c | 9 ++++++
47+
.../testsuite/gcc.target/loongarch/div-2.c | 9 ++++++
48+
.../testsuite/gcc.target/loongarch/div-3.c | 9 ++++++
4949
6 files changed, 49 insertions(+), 9 deletions(-)
50-
create mode 100644 gcc/testsuite/gcc.target/loongarch/div-1.c
51-
create mode 100644 gcc/testsuite/gcc.target/loongarch/div-2.c
52-
create mode 100644 gcc/testsuite/gcc.target/loongarch/div-3.c
50+
create mode 100644 src/gcc/testsuite/gcc.target/loongarch/div-1.c
51+
create mode 100644 src/gcc/testsuite/gcc.target/loongarch/div-2.c
52+
create mode 100644 src/gcc/testsuite/gcc.target/loongarch/div-3.c
5353

54-
diff --git a/gcc/config/loongarch/loongarch-protos.h b/gcc/config/loongarch/loongarch-protos.h
55-
index 2144c2421ed..2287fd3763c 100644
54+
diff --git a/src/gcc/config/loongarch/loongarch-protos.h b/src/gcc/config/loongarch/loongarch-protos.h
55+
index 2144c2421..2287fd376 100644
5656
--- a/src/gcc/config/loongarch/loongarch-protos.h
5757
+++ b/src/gcc/config/loongarch/loongarch-protos.h
5858
@@ -130,6 +130,7 @@ extern bool loongarch_symbol_binds_local_p (const_rtx);
@@ -63,8 +63,8 @@ index 2144c2421ed..2287fd3763c 100644
6363

6464
union loongarch_gen_fn_ptrs
6565
{
66-
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
67-
index 33b1919e7a3..8b1b48d57c9 100644
66+
diff --git a/src/gcc/config/loongarch/loongarch.cc b/src/gcc/config/loongarch/loongarch.cc
67+
index 33b1919e7..8b1b48d57 100644
6868
--- a/src/gcc/config/loongarch/loongarch.cc
6969
+++ b/src/gcc/config/loongarch/loongarch.cc
7070
@@ -2112,7 +2112,7 @@ loongarch_load_store_insns (rtx mem, rtx_insn *insn)
@@ -76,8 +76,8 @@ index 33b1919e7a3..8b1b48d57c9 100644
7676
loongarch_check_zero_div_p (void)
7777
{
7878
/* if -m[no-]check-zero-division is given explicitly. */
79-
diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
80-
index b49e058407c..63781518533 100644
79+
diff --git a/src/gcc/config/loongarch/loongarch.md b/src/gcc/config/loongarch/loongarch.md
80+
index b49e05840..637815185 100644
8181
--- a/src/gcc/config/loongarch/loongarch.md
8282
+++ b/src/gcc/config/loongarch/loongarch.md
8383
@@ -111,6 +111,8 @@
@@ -134,9 +134,9 @@ index b49e058407c..63781518533 100644
134134

135135
;; Floating point multiply accumulate instructions.
136136

137-
diff --git a/gcc/testsuite/gcc.target/loongarch/div-1.c b/gcc/testsuite/gcc.target/loongarch/div-1.c
137+
diff --git a/src/gcc/testsuite/gcc.target/loongarch/div-1.c b/src/gcc/testsuite/gcc.target/loongarch/div-1.c
138138
new file mode 100644
139-
index 00000000000..b1683f8535f
139+
index 000000000..b1683f853
140140
--- /dev/null
141141
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-1.c
142142
@@ -0,0 +1,9 @@
@@ -149,9 +149,9 @@ index 00000000000..b1683f8535f
149149
+{
150150
+ return a / b;
151151
+}
152-
diff --git a/gcc/testsuite/gcc.target/loongarch/div-2.c b/gcc/testsuite/gcc.target/loongarch/div-2.c
152+
diff --git a/src/gcc/testsuite/gcc.target/loongarch/div-2.c b/src/gcc/testsuite/gcc.target/loongarch/div-2.c
153153
new file mode 100644
154-
index 00000000000..4c2beb5b930
154+
index 000000000..4c2beb5b9
155155
--- /dev/null
156156
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-2.c
157157
@@ -0,0 +1,9 @@
@@ -164,9 +164,9 @@ index 00000000000..4c2beb5b930
164164
+{
165165
+ return b / a;
166166
+}
167-
diff --git a/gcc/testsuite/gcc.target/loongarch/div-3.c b/gcc/testsuite/gcc.target/loongarch/div-3.c
167+
diff --git a/src/gcc/testsuite/gcc.target/loongarch/div-3.c b/src/gcc/testsuite/gcc.target/loongarch/div-3.c
168168
new file mode 100644
169-
index 00000000000..d25969263f5
169+
index 000000000..d25969263
170170
--- /dev/null
171171
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-3.c
172172
@@ -0,0 +1,9 @@
@@ -180,5 +180,5 @@ index 00000000000..d25969263f5
180180
+ return b / a;
181181
+}
182182
--
183-
2.43.4
183+
2.45.2
184184

debian/patches/loong64/0002-loongarch-avoid-unnecessary-sign-extend-after-32-bit.diff

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 63a8100fd922d01c128831c018e140f04a66306f Mon Sep 17 00:00:00 2001
1+
From a51a1aa9fb384132c872f61b2125bae4b77d66c5 Mon Sep 17 00:00:00 2001
22
From: Xi Ruoyao <[email protected]>
33
Date: Wed, 6 Jul 2022 23:22:29 +0800
4-
Subject: [PATCH 002/133] loongarch: avoid unnecessary sign-extend after 32-bit
4+
Subject: [PATCH 002/301] loongarch: avoid unnecessary sign-extend after 32-bit
55
division
66

77
Like add.w/sub.w/mul.w, div.w/mod.w/div.wu/mod.wu also sign-extend the
@@ -40,13 +40,13 @@ gcc/testsuite/ChangeLog:
4040
Signed-off-by: Peng Fan <[email protected]>
4141
Signed-off-by: ticat_fp <[email protected]>
4242
---
43-
gcc/config/loongarch/loongarch.md | 12 ++++++++----
44-
gcc/testsuite/gcc.target/loongarch/div-4.c | 9 +++++++++
43+
src/gcc/config/loongarch/loongarch.md | 12 ++++++++----
44+
src/gcc/testsuite/gcc.target/loongarch/div-4.c | 9 +++++++++
4545
2 files changed, 17 insertions(+), 4 deletions(-)
46-
create mode 100644 gcc/testsuite/gcc.target/loongarch/div-4.c
46+
create mode 100644 src/gcc/testsuite/gcc.target/loongarch/div-4.c
4747

48-
diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
49-
index 63781518533..37cc3e0e669 100644
48+
diff --git a/src/gcc/config/loongarch/loongarch.md b/src/gcc/config/loongarch/loongarch.md
49+
index 637815185..37cc3e0e6 100644
5050
--- a/src/gcc/config/loongarch/loongarch.md
5151
+++ b/src/gcc/config/loongarch/loongarch.md
5252
@@ -753,6 +753,7 @@
@@ -82,9 +82,9 @@ index 63781518533..37cc3e0e669 100644
8282
""
8383
{
8484
return loongarch_output_division ("<insn>.w<u>\t%0,%1,%2", operands);
85-
diff --git a/gcc/testsuite/gcc.target/loongarch/div-4.c b/gcc/testsuite/gcc.target/loongarch/div-4.c
85+
diff --git a/src/gcc/testsuite/gcc.target/loongarch/div-4.c b/src/gcc/testsuite/gcc.target/loongarch/div-4.c
8686
new file mode 100644
87-
index 00000000000..a52f87d6caf
87+
index 000000000..a52f87d6c
8888
--- /dev/null
8989
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-4.c
9090
@@ -0,0 +1,9 @@
@@ -98,5 +98,5 @@ index 00000000000..a52f87d6caf
9898
+ return a / b;
9999
+}
100100
--
101-
2.43.4
101+
2.45.2
102102

0 commit comments

Comments
 (0)