* [Bug bootstrap/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
@ 2021-10-25 8:52 ` rguenth at gcc dot gnu.org
2021-10-25 9:08 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-25 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |powerpc64-linux
Target Milestone|--- |12.0
Version|10.2.1 |12.0
Priority|P3 |P1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug bootstrap/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
2021-10-25 8:52 ` [Bug bootstrap/102923] " rguenth at gcc dot gnu.org
@ 2021-10-25 9:08 ` jakub at gcc dot gnu.org
2021-10-25 9:11 ` iains at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-25 9:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |meissner at gcc dot gnu.org,
| |segher at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The stvx stuff is guarded by #ifdef __VEC__, so perhaps the lvx stuff should be
too, or there should be .machine push; .machine power7; ... .machine pop; or
something similar around it?
At least in linux64_closure.S, perhaps guarding it with #ifdef __VEC__ might be
ok, because the C code will not use that code if __VEC__ isn't defined:
#elif !defined(__VEC__)
/* If compiled without vector register support (used by assembly)... */
if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
return FFI_BAD_ABI;
But not sure about linux64.S if it doesn't suffer from the same problem.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug bootstrap/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
2021-10-25 8:52 ` [Bug bootstrap/102923] " rguenth at gcc dot gnu.org
2021-10-25 9:08 ` jakub at gcc dot gnu.org
@ 2021-10-25 9:11 ` iains at gcc dot gnu.org
2021-10-25 13:07 ` [Bug libffi/102923] " hjl.tools at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2021-10-25 9:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> But not sure about linux64.S if it doesn't suffer from the same problem.
my bad .. incomplete report:
../../../src-patched/libffi/src/powerpc/linux64.S:173: Error: unrecognized
opcode: `lvx'
../../../src-patched/libffi/src/powerpc/linux64.S:210: Error: unrecognized
opcode: `stvx'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-25 9:11 ` iains at gcc dot gnu.org
@ 2021-10-25 13:07 ` hjl.tools at gmail dot com
2021-10-25 15:50 ` segher at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-25 13:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
powerpc64-unknown-linux-gnu works with libffi upstream on
gcc110.fsffrance.org.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-25 13:07 ` [Bug libffi/102923] " hjl.tools at gmail dot com
@ 2021-10-25 15:50 ` segher at gcc dot gnu.org
2021-10-25 15:59 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2021-10-25 15:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> The stvx stuff is guarded by #ifdef __VEC__, so perhaps the lvx stuff should
> be too, or there should be .machine push; .machine power7; ... .machine pop;
> or something similar around it?
Just
.machine altivec
is enough, no push/pop shenanigans needed.
This can be either inside or outside an #ifdef __VEC__ block, just
personal style preference really :-)
I would put it at the start of the file.
> At least in linux64_closure.S, perhaps guarding it with #ifdef __VEC__ might
> be ok, because the C code will not use that code if __VEC__ isn't defined:
> #elif !defined(__VEC__)
> /* If compiled without vector register support (used by assembly)... */
> if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
> return FFI_BAD_ABI;
> But not sure about linux64.S if it doesn't suffer from the same problem.
Note that __VEC__ does not mean the current CPU can execute those insns,
of course, so these #ifdefs are only good if you compile this file twice,
or similar?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (4 preceding siblings ...)
2021-10-25 15:50 ` segher at gcc dot gnu.org
@ 2021-10-25 15:59 ` jakub at gcc dot gnu.org
2021-10-25 17:07 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-25 15:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #4)
> > At least in linux64_closure.S, perhaps guarding it with #ifdef __VEC__ might
> > be ok, because the C code will not use that code if __VEC__ isn't defined:
> > #elif !defined(__VEC__)
> > /* If compiled without vector register support (used by assembly)... */
> > if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
> > return FFI_BAD_ABI;
> > But not sure about linux64.S if it doesn't suffer from the same problem.
>
> Note that __VEC__ does not mean the current CPU can execute those insns,
> of course, so these #ifdefs are only good if you compile this file twice,
> or similar?
Sure. I think the expectation is that one gets the ieee128 long double support
in libffi only if libffi is built with -mcpu=power8 (or -mcpu=power7 or -mvsx).
And the assumption is that the *.S files are compiled with the same
-mcpu=/-mvsx flags as the C files.
So the only question is if all the lvx/stvx instructions are in code path that
will not be reached when __VEC__ support isn't seen on the C side.
The whole inital patch is:
https://github.com/libffi/libffi/commit/73dd43afc8a447ba98ea02e9aad4c6898dc77fb0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (5 preceding siblings ...)
2021-10-25 15:59 ` jakub at gcc dot gnu.org
@ 2021-10-25 17:07 ` hjl.tools at gmail dot com
2021-10-25 17:11 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-25 17:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://github.com/libffi/l
| |ibffi/issues/668
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
I opened:
https://github.com/libffi/libffi/issues/668
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (6 preceding siblings ...)
2021-10-25 17:07 ` hjl.tools at gmail dot com
@ 2021-10-25 17:11 ` hjl.tools at gmail dot com
2021-10-25 21:28 ` segher at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2021-10-25 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amodra at gmail dot com
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
It is likely caused by
commit e154242724b084380e3221df7c08fcdbd8460674
Author: Alan Modra <amodra@gmail.com>
Date: Wed May 22 14:04:26 2019 +0930
[RS6000] Don't pass -many to the assembler
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (7 preceding siblings ...)
2021-10-25 17:11 ` hjl.tools at gmail dot com
@ 2021-10-25 21:28 ` segher at gcc dot gnu.org
2021-12-29 15:36 ` jakub at gcc dot gnu.org
2021-12-29 19:46 ` segher at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2021-10-25 21:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Created attachment 51664
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51664&action=edit
proposed patch
This is the patcgh I am currently testing.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (8 preceding siblings ...)
2021-10-25 21:28 ` segher at gcc dot gnu.org
@ 2021-12-29 15:36 ` jakub at gcc dot gnu.org
2021-12-29 19:46 ` segher at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-29 15:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Isn't this fixed by r12-4693-g90205f67e465ae7dfcf733c2b2b177ca7ff68da0 ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import.
2021-10-25 8:45 [Bug bootstrap/102923] New: [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import iains at gcc dot gnu.org
` (9 preceding siblings ...)
2021-12-29 15:36 ` jakub at gcc dot gnu.org
@ 2021-12-29 19:46 ` segher at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2021-12-29 19:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102923
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Yes. At the time I considered it more a bandaid than a fix, but it
obviously is the right thing to do no matter what :-) Closing as fixed,
thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread