Bug 37759 - powerpc option -mabi=no-spe still generates SPE instructions
Summary: powerpc option -mabi=no-spe still generates SPE instructions
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: 8.5
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-07 05:06 UTC by Patrick Oppenlander
Modified: 2020-06-02 23:47 UTC (History)
4 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: powerpc-eabispe
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
preprocessed source (7.89 KB, text/plain)
2008-10-07 05:07 UTC, Patrick Oppenlander
Details
preprocessed source (8.28 KB, text/plain)
2008-10-07 22:14 UTC, Patrick Oppenlander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Oppenlander 2008-10-07 05:06:28 UTC
powerpc-eabispe-gcc -I../ -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/include -I/home/patrick/src/e7/prex/usr/include -nostdinc -fsingle-precision-constant -mno-spe -gdwarf-2 -Os -ansi -fno-strict-aliasing -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -std=gnu99 -fno-stack-protector -Wno-variadic-macros -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -fno-omit-frame-pointer -DDEBUG -g -Wsign-compare -Werror-implicit-function-declaration -v -save-temps -MD -MT core_thread.o -MP -MF .core_thread.d  -c -o core_thread.o core_thread.c
Using built-in specs.
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.3.2/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c --disable-nls --disable-multilib --disable-werror --without-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2 --with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared --disable-debug --disable-libssp
Thread model: single
gcc version 4.3.2 (GCC) 
COLLECT_GCC_OPTIONS='-I../' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/include' '-I/home/patrick/src/e7/prex/usr/include' '-nostdinc' '-fsingle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -E -quiet -nostdinc -v -I../ -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/include -I/home/patrick/src/e7/prex/usr/include -MD core_thread.d -MF .core_thread.d -MP -MT core_thread.o -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -DDEBUG core_thread.c -mno-spe -ansi -std=gnu99 -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -Wno-variadic-macros -Wsign-compare -Werror-implicit-function-declaration -fsingle-precision-constant -fno-strict-aliasing -fno-stack-protector -fno-omit-frame-pointer -fworking-directory -Os -fpch-preprocess -o core_thread.i
#include "..." search starts here:
#include <...> search starts here:
 ../
 /home/patrick/src/e7/prex
 /home/patrick/src/e7/prex/include
 /home/patrick/src/e7/prex/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-I../' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/include' '-I/home/patrick/src/e7/prex/usr/include' '-nostdinc' '-fsingle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -fpreprocessed core_thread.i -quiet -dumpbase core_thread.c -mno-spe -ansi -auxbase-strip core_thread.o -gdwarf-2 -g -Os -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -Wno-variadic-macros -Wsign-compare -Werror-implicit-function-declaration -ansi -std=gnu99 -version -fsingle-precision-constant -fno-strict-aliasing -fno-stack-protector -fno-omit-frame-pointer -o core_thread.s
GNU C (GCC) version 4.3.2 (powerpc-eabispe)
	compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7), GMP version 4.2.4, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c30b16423d0b6addaa52d5eb1153852d
COLLECT_GCC_OPTIONS='-I../' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/include' '-I/home/patrick/src/e7/prex/usr/include' '-nostdinc' '-fsingle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o'
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/as -mppc -mspe -me500 -many -V -Qy -o core_thread.o core_thread.s
GNU assembler version 2.18 (powerpc-eabispe) using BFD version (GNU Binutils) 2.18
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-I../' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/include' '-I/home/patrick/src/e7/prex/usr/include' '-nostdinc' '-fsingle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o'
Comment 1 Patrick Oppenlander 2008-10-07 05:07:54 UTC
Created attachment 16472 [details]
preprocessed source

after compiling, evstdd and evldd instructions are emitted even though the -mno-spe flag was specified.
Comment 2 Andrew Pinski 2008-10-07 20:38:08 UTC
I think this is by design, you did not change the ABI to be a non SPE based one.
Comment 3 Patrick Oppenlander 2008-10-07 22:14:13 UTC
Created attachment 16477 [details]
preprocessed source

Setting -mabi=no-spe corrects the the first example.

The new prexeth.i example still generates evldd/evstdd even with -mabi=no-spe, adding the -mno-spe flag makes no difference.
Comment 4 Patrick Oppenlander 2008-10-07 22:15:17 UTC
Forgot to add -v output:

powerpc-eabispe-gcc -DLWIP_DEBUG -Iprex/include -Ilwip/src/include -Ilwip/src/include/ipv4 -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/usr/include -I/home/patrick/src/e7/prex/include -nostdinc -fsingle-precision-constant -mabi=no-spe -gdwarf-2 -Os -ansi -fno-strict-aliasing -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -std=gnu99 -fno-stack-protector -Wno-variadic-macros -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -fno-omit-frame-pointer -DDEBUG -g -Wsign-compare -Werror-implicit-function-declaration -v -save-temps -MD -MT prex/prexeth.o -MP -MF .prexeth.d -I/home/patrick/src/e7/prex/dev/include -c -o prex/prexeth.o prex/prexeth.c
Using built-in specs.
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.3.2/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c --disable-nls --disable-multilib --disable-werror --without-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2 --with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared --disable-debug --disable-libssp
Thread model: single
gcc version 4.3.2 (GCC) 
COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -E -quiet -nostdinc -v -Iprex/include -Ilwip/src/include -Ilwip/src/include/ipv4 -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/usr/include -I/home/patrick/src/e7/prex/include -I/home/patrick/src/e7/prex/dev/include -MD prex/prexeth.d -MF .prexeth.d -MP -MT prex/prexeth.o -DLWIP_DEBUG -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -DDEBUG prex/prexeth.c -mabi=no-spe -ansi -std=gnu99 -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -Wno-variadic-macros -Wsign-compare -Werror-implicit-function-declaration -fsingle-precision-constant -fno-strict-aliasing -fno-stack-protector -fno-omit-frame-pointer -fworking-directory -Os -fpch-preprocess -o prexeth.i
#include "..." search starts here:
#include <...> search starts here:
 prex/include
 lwip/src/include
 lwip/src/include/ipv4
 /home/patrick/src/e7/prex
 /home/patrick/src/e7/prex/usr/include
 /home/patrick/src/e7/prex/include
 /home/patrick/src/e7/prex/dev/include
End of search list.
COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -fpreprocessed prexeth.i -quiet -dumpbase prexeth.c -mabi=no-spe -ansi -auxbase-strip prex/prexeth.o -gdwarf-2 -g -Os -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -Wno-variadic-macros -Wsign-compare -Werror-implicit-function-declaration -ansi -std=gnu99 -version -fsingle-precision-constant -fno-strict-aliasing -fno-stack-protector -fno-omit-frame-pointer -o prexeth.s
GNU C (GCC) version 4.3.2 (powerpc-eabispe)
        compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7), GMP version 4.2.4, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c30b16423d0b6addaa52d5eb1153852d
COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o'
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/as -mppc -mspe -me500 -many -V -Qy -o prex/prexeth.o prexeth.s
GNU assembler version 2.18 (powerpc-eabispe) using BFD version (GNU Binutils) 2.18
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o'
Comment 5 Patrick Oppenlander 2008-10-07 23:00:07 UTC
This looks like an option parsing problem.

Building with the deprecated -mspe=no option suppresses all SPE instructions, which is what I expect/want. There seems to be no need to specify -mabi=no-spe if -mspe=no is set.

-mno-spe seems to be broken.
Comment 6 Eric Gallager 2018-05-07 20:09:35 UTC
Is this still relevant now that powerpc and powerpcspe have been split into separate targets?
Comment 7 Arseny Solokha 2018-05-08 09:36:25 UTC
AFAICT, it's still the case for powerpcspe target even on trunk (as of r259982). While gcc apparently doesn't generate SPE instructions for both attached testcases anymore, I've just easily reproduced the issue w/ our internal codebase.
Comment 8 Eric Gallager 2019-02-10 23:43:25 UTC
(In reply to Arseny Solokha from comment #7)
> AFAICT, it's still the case for powerpcspe target even on trunk (as of
> r259982). While gcc apparently doesn't generate SPE instructions for both
> attached testcases anymore, I've just easily reproduced the issue w/ our
> internal codebase.

Looks like the powerpcspe target is being removed now...
Comment 9 Arseny Solokha 2019-02-11 01:38:18 UTC
Yes, but AFAIK none of the PRs specific to powerpcspe have been closed so far. And, personally, I'd like them to stay open for another release cycle in the hope Andrew would actually revive the target this year. But it's up to gcc maintainers to decide, of course.
Comment 10 Eric Gallager 2019-05-11 03:33:04 UTC
(In reply to Arseny Solokha from comment #9)
> Yes, but AFAIK none of the PRs specific to powerpcspe have been closed so
> far. And, personally, I'd like them to stay open for another release cycle
> in the hope Andrew would actually revive the target this year. But it's up
> to gcc maintainers to decide, of course.

OK, leaving this open then...
Comment 11 Eric Gallager 2020-06-02 01:48:20 UTC
(In reply to Eric Gallager from comment #10)
> (In reply to Arseny Solokha from comment #9)
> > Yes, but AFAIK none of the PRs specific to powerpcspe have been closed so
> > far. And, personally, I'd like them to stay open for another release cycle
> > in the hope Andrew would actually revive the target this year. But it's up
> > to gcc maintainers to decide, of course.
> 
> OK, leaving this open then...

The consensus here seemed to be to close them: https://gcc.gnu.org/pipermail/gcc/2020-May/232591.html

So, I'm closing this.
Comment 12 Segher Boessenkool 2020-06-02 23:47:41 UTC
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9 development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html