1 |
commit: 2189e27f491ed8774f46a47b3ceca258c911137a |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 26 12:14:57 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 26 12:14:57 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2189e27f |
7 |
|
8 |
7.3.0: fix partial int in msp430, bug #664014 |
9 |
|
10 |
Reported-by: Alex Orange |
11 |
Bug: https://bugs.gentoo.org/664014 |
12 |
Bug: https://gcc.gnu.org/PR79242 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
7.3.0/gentoo/98_all_msp430-partial-int.patch | 72 ++++++++++++++++++++++++++++ |
16 |
7.3.0/gentoo/README.history | 2 + |
17 |
2 files changed, 74 insertions(+) |
18 |
|
19 |
diff --git a/7.3.0/gentoo/98_all_msp430-partial-int.patch b/7.3.0/gentoo/98_all_msp430-partial-int.patch |
20 |
new file mode 100644 |
21 |
index 0000000..404f6c3 |
22 |
--- /dev/null |
23 |
+++ b/7.3.0/gentoo/98_all_msp430-partial-int.patch |
24 |
@@ -0,0 +1,72 @@ |
25 |
+https://bugs.gentoo.org/664014 |
26 |
+https://gcc.gnu.org/PR79242 |
27 |
+ |
28 |
+From 59f5415b4462a60d9f2dd6dc5229247da183b9fc Mon Sep 17 00:00:00 2001 |
29 |
+From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4> |
30 |
+Date: Sat, 17 Feb 2018 00:25:15 +0000 |
31 |
+Subject: [PATCH] 2018-02-16 Jozef Lawrynowicz <jozefl.gcc@×××××.com> |
32 |
+ |
33 |
+ PR target/79242 |
34 |
+ * machmode.def: Define a complex mode for PARTIAL_INT. |
35 |
+ * genmodes.c (complex_class): Return MODE_COMPLEX_INT for |
36 |
+ MODE_PARTIAL_INT. |
37 |
+ * doc/rtl.texi: Document CSPImode. |
38 |
+ * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode |
39 |
+ handling. |
40 |
+ (msp430_hard_regno_nregs_with_padding): Likewise. |
41 |
+ |
42 |
+ PR target/79242 |
43 |
+ gcc.target/msp430/pr79242.c: New test. |
44 |
+ |
45 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257779 138bc75d-0d04-0410-961f-82ee72b054a4 |
46 |
+--- |
47 |
+ gcc/ChangeLog | 11 +++++++++++ |
48 |
+ gcc/config/msp430/msp430.c | 4 ++++ |
49 |
+ gcc/doc/rtl.texi | 5 +++-- |
50 |
+ gcc/genmodes.c | 1 + |
51 |
+ gcc/machmode.def | 1 + |
52 |
+ gcc/testsuite/ChangeLog | 5 +++++ |
53 |
+ gcc/testsuite/gcc.target/msp430/pr79242.c | 11 +++++++++++ |
54 |
+ 7 files changed, 36 insertions(+), 2 deletions(-) |
55 |
+ create mode 100644 gcc/testsuite/gcc.target/msp430/pr79242.c |
56 |
+ |
57 |
+--- a/gcc/config/msp430/msp430.c |
58 |
++++ b/gcc/config/msp430/msp430.c |
59 |
+@@ -905,6 +905,8 @@ msp430_hard_regno_nregs (int regno ATTRIBUTE_UNUSED, |
60 |
+ { |
61 |
+ if (mode == PSImode && msp430x) |
62 |
+ return 1; |
63 |
++ if (mode == CPSImode && msp430x) |
64 |
++ return 2; |
65 |
+ return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) |
66 |
+ / UNITS_PER_WORD); |
67 |
+ } |
68 |
+@@ -927,6 +929,8 @@ msp430_hard_regno_nregs_with_padding (int regno ATTRIBUTE_UNUSED, |
69 |
+ { |
70 |
+ if (mode == PSImode) |
71 |
+ return 2; |
72 |
++ if (mode == CPSImode) |
73 |
++ return 4; |
74 |
+ return msp430_hard_regno_nregs (regno, mode); |
75 |
+ } |
76 |
+ |
77 |
+--- a/gcc/genmodes.c |
78 |
++++ b/gcc/genmodes.c |
79 |
+@@ -116,6 +116,7 @@ complex_class (enum mode_class c) |
80 |
+ switch (c) |
81 |
+ { |
82 |
+ case MODE_INT: return MODE_COMPLEX_INT; |
83 |
++ case MODE_PARTIAL_INT: return MODE_COMPLEX_INT; |
84 |
+ case MODE_FLOAT: return MODE_COMPLEX_FLOAT; |
85 |
+ default: |
86 |
+ error ("no complex class for class %s", mode_class_names[c]); |
87 |
+--- a/gcc/machmode.def |
88 |
++++ b/gcc/machmode.def |
89 |
+@@ -243,6 +243,7 @@ UACCUM_MODE (UTA, 16, 64, 64); /* 64.64 */ |
90 |
+ |
91 |
+ /* Complex modes. */ |
92 |
+ COMPLEX_MODES (INT); |
93 |
++COMPLEX_MODES (PARTIAL_INT); |
94 |
+ COMPLEX_MODES (FLOAT); |
95 |
+ |
96 |
+ /* Decimal floating point modes. */ |
97 |
|
98 |
diff --git a/7.3.0/gentoo/README.history b/7.3.0/gentoo/README.history |
99 |
index 6a8069b..9eb4c76 100644 |
100 |
--- a/7.3.0/gentoo/README.history |
101 |
+++ b/7.3.0/gentoo/README.history |
102 |
@@ -1,3 +1,5 @@ |
103 |
+1.6 TODO |
104 |
+ + 98_all_msp430-partial-int.patch |
105 |
1.6 18 Aug 2018 |
106 |
+ 97_all_isl-include.patch |
107 |
1.5 17 Aug 2018 |