All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gcc: fix miscompilation for mips64 which caused systemd's strange behaviour
@ 2017-10-27  9:43 Chen Qi
  2017-10-27  9:43 ` [PATCH 1/2] systemd: remove useless options for mips4 Chen Qi
  2017-10-27  9:43 ` [PATCH 2/2] gcc: fix miscompilation on mips64 Chen Qi
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Qi @ 2017-10-27  9:43 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 65d23bd7986615fdfb0f1717b615534a2a14ab80:

  README.qemu: qemuppc64 is not supported (2017-10-16 23:54:31 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/bug12266
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bug12266

Chen Qi (2):
  systemd: remove useless options for mips4
  gcc: fix miscompilation on mips64

 meta/recipes-core/systemd/systemd_234.bb           |  3 --
 meta/recipes-devtools/gcc/gcc-7.2.inc              |  1 +
 .../fix-miscompilation-for-O1-on-mips64el.patch    | 35 ++++++++++++++++++++++
 3 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] systemd: remove useless options for mips4
  2017-10-27  9:43 [PATCH 0/2] gcc: fix miscompilation for mips64 which caused systemd's strange behaviour Chen Qi
@ 2017-10-27  9:43 ` Chen Qi
  2017-10-27  9:43 ` [PATCH 2/2] gcc: fix miscompilation on mips64 Chen Qi
  1 sibling, 0 replies; 8+ messages in thread
From: Chen Qi @ 2017-10-27  9:43 UTC (permalink / raw)
  To: openembedded-core

Looking back the history, we had problem with systemd on qemumips64
which is also related to compilation flags. We solved that by using
tweaking FULL_OPTIMIZATION for mips64 to have "-fno-tree-switch-conversion
-fno-tree-tail-merge".

Now systemd has been upgraded to 234, and we don't have the above problem
any more, thus removing these flags.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_234.bb | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 36fd3f8..971226f 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -158,9 +158,6 @@ CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', ''
 # disable problematic GCC 5.2 optimizations [YOCTO #8291]
 FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
 
-# Avoid login failure on qemumips64 when pam is enabled
-FULL_OPTIMIZATION_append_mips64 = " -fno-tree-switch-conversion -fno-tree-tail-merge"
-
 COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
 COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
 COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-27  9:43 [PATCH 0/2] gcc: fix miscompilation for mips64 which caused systemd's strange behaviour Chen Qi
  2017-10-27  9:43 ` [PATCH 1/2] systemd: remove useless options for mips4 Chen Qi
@ 2017-10-27  9:43 ` Chen Qi
  2017-10-27 12:41   ` Alexander Kanavin
  2017-10-27 17:40   ` Khem Raj
  1 sibling, 2 replies; 8+ messages in thread
From: Chen Qi @ 2017-10-27  9:43 UTC (permalink / raw)
  To: openembedded-core

We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
The output of the command is like `systemctl show <xxx>', which is incorrect.

This patch is from gcc bugzilla's attachment.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

The patch hasn't been merged into gcc. But it does solve the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/gcc/gcc-7.2.inc              |  1 +
 .../fix-miscompilation-for-O1-on-mips64el.patch    | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch

diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.2.inc
index 5883bc6..04edad7 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
@@ -75,6 +75,7 @@ SRC_URI = "\
            file://0048-gcc-Enable-static-PIE.patch \
            file://fix-segmentation-fault-precompiled-hdr.patch \
            file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
+           file://fix-miscompilation-for-O1-on-mips64el.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
new file mode 100644
index 0000000..28020b0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
@@ -0,0 +1,35 @@
+This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
+
+Author: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
+
+This patch hasn't been merged into gcc. But it does solve the problem of
+strange behaviour of `systemd status <xxx>' on qemumips64.
+
+Upstream-Status: Pending [Taken from gcc bugzilla's attachment]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ gcc/lra-constraints.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
+index c8bc9b9a66f..6d319662b09 100644
+--- a/gcc/lra-constraints.c
++++ b/gcc/lra-constraints.c
+@@ -4235,7 +4235,12 @@ curr_insn_transform (bool check_only_p)
+ 			  && (goal_alt[i] == NO_REGS
+ 			      || (simplify_subreg_regno
+ 				  (ira_class_hard_regs[goal_alt[i]][0],
+-				   GET_MODE (reg), byte, mode) >= 0)))))
++				   GET_MODE (reg), byte, mode) >= 0))))
++		      || (type != OP_IN
++			  && GET_MODE_PRECISION (mode)
++			  < GET_MODE_PRECISION (GET_MODE (reg))
++			  && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
++			  && WORD_REGISTER_OPERATIONS))
+ 		{
+ 		  /* An OP_INOUT is required when reloading a subreg of a
+ 		     mode wider than a word to ensure that data beyond the
+-- 
+2.13.0
+
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-27  9:43 ` [PATCH 2/2] gcc: fix miscompilation on mips64 Chen Qi
@ 2017-10-27 12:41   ` Alexander Kanavin
  2017-10-27 17:40     ` Khem Raj
  2017-10-27 17:40   ` Khem Raj
  1 sibling, 1 reply; 8+ messages in thread
From: Alexander Kanavin @ 2017-10-27 12:41 UTC (permalink / raw)
  To: Chen Qi, openembedded-core

On 10/27/2017 12:43 PM, Chen Qi wrote:

> +This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
> +Upstream-Status: Pending [Taken from gcc bugzilla's attachment]

Then it should be 'Submitted', right?

Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-27  9:43 ` [PATCH 2/2] gcc: fix miscompilation on mips64 Chen Qi
  2017-10-27 12:41   ` Alexander Kanavin
@ 2017-10-27 17:40   ` Khem Raj
  2017-10-30  9:45     ` ChenQi
  1 sibling, 1 reply; 8+ messages in thread
From: Khem Raj @ 2017-10-27 17:40 UTC (permalink / raw)
  To: Chen Qi; +Cc: Patches and discussions about the oe-core layer

On Fri, Oct 27, 2017 at 2:43 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
> We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
> The output of the command is like `systemctl show <xxx>', which is incorrect.
>
> This patch is from gcc bugzilla's attachment.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
>
> The patch hasn't been merged into gcc. But it does solve the above problem.
>

This looks ok. Can you help by providing your testing results to gcc bugzilla
so the patch can then be submitted to gcc ml.

> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-devtools/gcc/gcc-7.2.inc              |  1 +
>  .../fix-miscompilation-for-O1-on-mips64el.patch    | 35 ++++++++++++++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.2.inc
> index 5883bc6..04edad7 100644
> --- a/meta/recipes-devtools/gcc/gcc-7.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
> @@ -75,6 +75,7 @@ SRC_URI = "\
>             file://0048-gcc-Enable-static-PIE.patch \
>             file://fix-segmentation-fault-precompiled-hdr.patch \
>             file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
> +           file://fix-miscompilation-for-O1-on-mips64el.patch \
>             ${BACKPORTS} \
>  "
>  BACKPORTS = "\
> diff --git a/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
> new file mode 100644
> index 0000000..28020b0
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
> @@ -0,0 +1,35 @@
> +This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
> +
> +Author: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
> +
> +This patch hasn't been merged into gcc. But it does solve the problem of
> +strange behaviour of `systemd status <xxx>' on qemumips64.
> +
> +Upstream-Status: Pending [Taken from gcc bugzilla's attachment]
> +
> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> +---
> + gcc/lra-constraints.c | 7 ++++++-
> + 1 file changed, 6 insertions(+), 1 deletion(-)
> +
> +diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
> +index c8bc9b9a66f..6d319662b09 100644
> +--- a/gcc/lra-constraints.c
> ++++ b/gcc/lra-constraints.c
> +@@ -4235,7 +4235,12 @@ curr_insn_transform (bool check_only_p)
> +                         && (goal_alt[i] == NO_REGS
> +                             || (simplify_subreg_regno
> +                                 (ira_class_hard_regs[goal_alt[i]][0],
> +-                                 GET_MODE (reg), byte, mode) >= 0)))))
> ++                                 GET_MODE (reg), byte, mode) >= 0))))
> ++                    || (type != OP_IN
> ++                        && GET_MODE_PRECISION (mode)
> ++                        < GET_MODE_PRECISION (GET_MODE (reg))
> ++                        && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
> ++                        && WORD_REGISTER_OPERATIONS))
> +               {
> +                 /* An OP_INOUT is required when reloading a subreg of a
> +                    mode wider than a word to ensure that data beyond the
> +--
> +2.13.0
> +
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-27 12:41   ` Alexander Kanavin
@ 2017-10-27 17:40     ` Khem Raj
  0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2017-10-27 17:40 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

On Fri, Oct 27, 2017 at 5:41 AM, Alexander Kanavin
<alexander.kanavin@linux.intel.com> wrote:
> On 10/27/2017 12:43 PM, Chen Qi wrote:
>
>> +This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
>> +Upstream-Status: Pending [Taken from gcc bugzilla's attachment]
>
>
> Then it should be 'Submitted', right?
>

It has to be on gcc-patches ml for it to considered submitted

> Alex
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-27 17:40   ` Khem Raj
@ 2017-10-30  9:45     ` ChenQi
  2017-10-30 15:19       ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: ChenQi @ 2017-10-30  9:45 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4320 bytes --]

On 10/28/2017 01:40 AM, Khem Raj wrote:
> On Fri, Oct 27, 2017 at 2:43 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
>> We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
>> The output of the command is like `systemctl show <xxx>', which is incorrect.
>>
>> This patch is from gcc bugzilla's attachment.
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
>>
>> The patch hasn't been merged into gcc. But it does solve the above problem.
>>
> This looks ok. Can you help by providing your testing results to gcc bugzilla
> so the patch can then be submitted to gcc ml.

Some updates in this issue.

1) I've provided information in gcc bugzilla. The author says that he's 
going to submit the patch to gcc mailing list.

2) I've update remote branch to fix a typo ('mips4' --> 'mips64').

   git://git.pokylinux.org/poky-contrib ChenQi/bug12266
   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bug12266


3) 'core-image-sato + testimage' has been tested on other qemu machines 
including qemux86-64, qemux86, qemumips, qemuppc, qemuarm64.

Best Regards,
Chen Qi

>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   meta/recipes-devtools/gcc/gcc-7.2.inc              |  1 +
>>   .../fix-miscompilation-for-O1-on-mips64el.patch    | 35 ++++++++++++++++++++++
>>   2 files changed, 36 insertions(+)
>>   create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.2.inc
>> index 5883bc6..04edad7 100644
>> --- a/meta/recipes-devtools/gcc/gcc-7.2.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
>> @@ -75,6 +75,7 @@ SRC_URI = "\
>>              file://0048-gcc-Enable-static-PIE.patch \
>>              file://fix-segmentation-fault-precompiled-hdr.patch \
>>              file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
>> +           file://fix-miscompilation-for-O1-on-mips64el.patch \
>>              ${BACKPORTS} \
>>   "
>>   BACKPORTS = "\
>> diff --git a/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
>> new file mode 100644
>> index 0000000..28020b0
>> --- /dev/null
>> +++ b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
>> @@ -0,0 +1,35 @@
>> +This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
>> +
>> +Author: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
>> +
>> +This patch hasn't been merged into gcc. But it does solve the problem of
>> +strange behaviour of `systemd status <xxx>' on qemumips64.
>> +
>> +Upstream-Status: Pending [Taken from gcc bugzilla's attachment]
>> +
>> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> +---
>> + gcc/lra-constraints.c | 7 ++++++-
>> + 1 file changed, 6 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
>> +index c8bc9b9a66f..6d319662b09 100644
>> +--- a/gcc/lra-constraints.c
>> ++++ b/gcc/lra-constraints.c
>> +@@ -4235,7 +4235,12 @@ curr_insn_transform (bool check_only_p)
>> +                         && (goal_alt[i] == NO_REGS
>> +                             || (simplify_subreg_regno
>> +                                 (ira_class_hard_regs[goal_alt[i]][0],
>> +-                                 GET_MODE (reg), byte, mode) >= 0)))))
>> ++                                 GET_MODE (reg), byte, mode) >= 0))))
>> ++                    || (type != OP_IN
>> ++                        && GET_MODE_PRECISION (mode)
>> ++                        < GET_MODE_PRECISION (GET_MODE (reg))
>> ++                        && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
>> ++                        && WORD_REGISTER_OPERATIONS))
>> +               {
>> +                 /* An OP_INOUT is required when reloading a subreg of a
>> +                    mode wider than a word to ensure that data beyond the
>> +--
>> +2.13.0
>> +
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



[-- Attachment #2: Type: text/html, Size: 6830 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gcc: fix miscompilation on mips64
  2017-10-30  9:45     ` ChenQi
@ 2017-10-30 15:19       ` Khem Raj
  0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2017-10-30 15:19 UTC (permalink / raw)
  To: ChenQi; +Cc: Patches and discussions about the oe-core layer

On Mon, Oct 30, 2017 at 2:45 AM, ChenQi <Qi.Chen@windriver.com> wrote:
> On 10/28/2017 01:40 AM, Khem Raj wrote:
>
> On Fri, Oct 27, 2017 at 2:43 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
>
> We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
> The output of the command is like `systemctl show <xxx>', which is
> incorrect.
>
> This patch is from gcc bugzilla's attachment.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
>
> The patch hasn't been merged into gcc. But it does solve the above problem.
>
> This looks ok. Can you help by providing your testing results to gcc
> bugzilla
> so the patch can then be submitted to gcc ml.
>
>
> Some updates in this issue.
>
> 1) I've provided information in gcc bugzilla. The author says that he's
> going to submit the patch to gcc mailing list.
>
> 2) I've update remote branch to fix a typo ('mips4' --> 'mips64').
>
>   git://git.pokylinux.org/poky-contrib ChenQi/bug12266
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bug12266
>
>
> 3) 'core-image-sato + testimage' has been tested on other qemu machines
> including qemux86-64, qemux86, qemumips, qemuppc, qemuarm64.
>

thanks I have tested this fix locally. its good to apply

> Best Regards,
> Chen Qi
>
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-devtools/gcc/gcc-7.2.inc              |  1 +
>  .../fix-miscompilation-for-O1-on-mips64el.patch    | 35
> ++++++++++++++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644
> meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc
> b/meta/recipes-devtools/gcc/gcc-7.2.inc
> index 5883bc6..04edad7 100644
> --- a/meta/recipes-devtools/gcc/gcc-7.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
> @@ -75,6 +75,7 @@ SRC_URI = "\
>             file://0048-gcc-Enable-static-PIE.patch \
>             file://fix-segmentation-fault-precompiled-hdr.patch \
>
> file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
> +           file://fix-miscompilation-for-O1-on-mips64el.patch \
>             ${BACKPORTS} \
>  "
>  BACKPORTS = "\
> diff --git
> a/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
> b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
> new file mode 100644
> index 0000000..28020b0
> --- /dev/null
> +++
> b/meta/recipes-devtools/gcc/gcc-7.2/fix-miscompilation-for-O1-on-mips64el.patch
> @@ -0,0 +1,35 @@
> +This patch comes from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
> +
> +Author: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
> +
> +This patch hasn't been merged into gcc. But it does solve the problem of
> +strange behaviour of `systemd status <xxx>' on qemumips64.
> +
> +Upstream-Status: Pending [Taken from gcc bugzilla's attachment]
> +
> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> +---
> + gcc/lra-constraints.c | 7 ++++++-
> + 1 file changed, 6 insertions(+), 1 deletion(-)
> +
> +diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
> +index c8bc9b9a66f..6d319662b09 100644
> +--- a/gcc/lra-constraints.c
> ++++ b/gcc/lra-constraints.c
> +@@ -4235,7 +4235,12 @@ curr_insn_transform (bool check_only_p)
> +                         && (goal_alt[i] == NO_REGS
> +                             || (simplify_subreg_regno
> +                                 (ira_class_hard_regs[goal_alt[i]][0],
> +-                                 GET_MODE (reg), byte, mode) >= 0)))))
> ++                                 GET_MODE (reg), byte, mode) >= 0))))
> ++                    || (type != OP_IN
> ++                        && GET_MODE_PRECISION (mode)
> ++                        < GET_MODE_PRECISION (GET_MODE (reg))
> ++                        && GET_MODE_SIZE (GET_MODE (reg)) <=
> UNITS_PER_WORD
> ++                        && WORD_REGISTER_OPERATIONS))
> +               {
> +                 /* An OP_INOUT is required when reloading a subreg of a
> +                    mode wider than a word to ensure that data beyond the
> +--
> +2.13.0
> +
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-30 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27  9:43 [PATCH 0/2] gcc: fix miscompilation for mips64 which caused systemd's strange behaviour Chen Qi
2017-10-27  9:43 ` [PATCH 1/2] systemd: remove useless options for mips4 Chen Qi
2017-10-27  9:43 ` [PATCH 2/2] gcc: fix miscompilation on mips64 Chen Qi
2017-10-27 12:41   ` Alexander Kanavin
2017-10-27 17:40     ` Khem Raj
2017-10-27 17:40   ` Khem Raj
2017-10-30  9:45     ` ChenQi
2017-10-30 15:19       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.