Summary: | -mcpu=power4 -mtune=cell emits power7/cell-only opcodes | ||
---|---|---|---|
Product: | gcc | Reporter: | marcus |
Component: | target | Assignee: | Segher Boessenkool <segher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bill.schmidt, dje, gcc-bugs, meissner, pinskia, rguenth, segher, uweigand |
Priority: | P3 | Keywords: | wrong-code |
Version: | 4.5.0 | ||
Target Milestone: | --- | ||
Host: | powerpc-unknown-linux-gnu | Target: | powerpc-unknown-linux-gnu |
Build: | powerpc-unknown-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2010-05-19 11:38:26 |
Description
marcus
2010-04-23 19:01:26 UTC
This was my fault to some extend; when I added =cell support I asked about if we should emit the cell instructions for -mtune= and the answer was that using -mtune=cell is most likely not going to be used. In fact -mtune=cell most likely produce much slower code on most other processors because of the non use of the dot instructions (and other stuff). well, the kernel now does easier ... in arch/powerpc/Makefile: ifeq ($(CONFIG_TUNE_CELL),y) KBUILD_CFLAGS += $(call cc-option,-mtune=cell) endif Confirmed. Adding spu maintainers to CC. Still happens. rs6000_cpu is set based on the -mtune= setting instead of based on the -mcpu setting. I'll take it. Author: segher Date: Sat Dec 2 01:23:41 2017 New Revision: 255349 URL: https://gcc.gnu.org/viewcvs?rev=255349&root=gcc&view=rev Log: rs6000: Set rs6000_cpu correctly (PR43871) We set rs6000_cpu based on tune_index, but it should be cpu_index. This patch fixes it. PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu based on cpu_index, not tune_index. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c Author: segher Date: Mon Dec 4 09:19:27 2017 New Revision: 255376 URL: https://gcc.gnu.org/viewcvs?rev=255376&root=gcc&view=rev Log: PR bootstrap/83265 Revert 2017-12-01 Segher Boessenkool <segher@kernel.crashing.org> PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu based on cpu_index, not tune_index. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c Author: segher Date: Thu Dec 7 09:36:28 2017 New Revision: 255464 URL: https://gcc.gnu.org/viewcvs?rev=255464&root=gcc&view=rev Log: rs6000: Initialise rs6000_cpu correctly (PR43871) Finally, set rs6000_cpu based not on -mtune=, but only -mcpu= and the defaults. PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu to the given -mcpu=, or to the default processor. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c I would prefer not to backport this since it is quite involved. Please reopen if you have a good reason to want it on 7 or 6. |