public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/21397] New: -march selects wrong arm_tune flags
@ 2005-05-05 11:01 trauscher at loytec dot com
2005-05-08 23:47 ` [Bug target/21397] " rearnsha at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: trauscher at loytec dot com @ 2005-05-05 11:01 UTC (permalink / raw)
To: gcc-bugs
When using -march, wrong tuning flags are selected.
E.g., -march=armv4t selects 'tune_flags' for arm600, instead of
arm7tdmi (or similar). The error is in arm_override_options().
When "-march" is given, (sel - all_architectures) is calculated.
In contrast, "-mcpu" calculates (sel - all_cores). This
array index is stored in 'arm_tune' (arm.c:791)
In arm.c:909 tune_flags are always taken from all_cores so
that the calculated index references the wrong array when
using "-march"
tune_flags = all_cores[(int)arm_tune].flags;
--
Summary: -march selects wrong arm_tune flags
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: trauscher at loytec dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i386-linux
GCC target triplet: arm-*-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] -march selects wrong arm_tune flags
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
@ 2005-05-08 23:47 ` rearnsha at gcc dot gnu dot org
2005-05-09 7:04 ` trauscher at loytec dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-05-08 23:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-05-08 23:47 -------
The -march flag is not supposed to alter the tuning. Use -mtune or -mcpu, as
appropriate, if you want to do that.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] -march selects wrong arm_tune flags
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
2005-05-08 23:47 ` [Bug target/21397] " rearnsha at gcc dot gnu dot org
@ 2005-05-09 7:04 ` trauscher at loytec dot com
2005-05-09 11:23 ` [Bug target/21397] arm: -march overrides -mtune rearnsha at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: trauscher at loytec dot com @ 2005-05-09 7:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From trauscher at loytec dot com 2005-05-09 07:04 -------
The problem is that -march=xxx -mtune=yyy doesn't work.
The arm_override_option function scans the options
in the order -mtune, -march, -mcpu. So when -mtune is
given, 'arm_tune' first set by -mtune and then
overwritten with the wrong tune settings from -march.
I think, this problem was introduced between gcc-3.4.3 and
gcc-4.0.0. In 3.4.3 only -mtune sets 'arm_tune' where in
4.0.0 all three flags affect 'arm_tune'.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] arm: -march overrides -mtune
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
2005-05-08 23:47 ` [Bug target/21397] " rearnsha at gcc dot gnu dot org
2005-05-09 7:04 ` trauscher at loytec dot com
@ 2005-05-09 11:23 ` rearnsha at gcc dot gnu dot org
2005-05-09 14:13 ` [Bug target/21397] [4.0/4.1 regression] " rearnsha at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-05-09 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-05-09 11:18 -------
Ah! I understand now. Sorry, your initial report wasn't clear. Yes, I agree
this is incorrect.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-05-09 11:18:37
date| |
Summary|-march selects wrong |arm: -march overrides -mtune
|arm_tune flags |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] [4.0/4.1 regression] arm: -march overrides -mtune
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
` (2 preceding siblings ...)
2005-05-09 11:23 ` [Bug target/21397] arm: -march overrides -mtune rearnsha at gcc dot gnu dot org
@ 2005-05-09 14:13 ` rearnsha at gcc dot gnu dot org
2005-05-09 14:24 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-05-09 14:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-05-09 14:04 -------
This is, of course, a regression from 3.4.x
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rearnsha at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Summary|arm: -march overrides -mtune|[4.0/4.1 regression] arm: -
| |march overrides -mtune
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] [4.0/4.1 regression] arm: -march overrides -mtune
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
` (3 preceding siblings ...)
2005-05-09 14:13 ` [Bug target/21397] [4.0/4.1 regression] " rearnsha at gcc dot gnu dot org
@ 2005-05-09 14:24 ` cvs-commit at gcc dot gnu dot org
2005-05-09 14:53 ` cvs-commit at gcc dot gnu dot org
2005-05-09 15:04 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-09 14:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-09 14:20 -------
Subject: Bug 21397
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rearnsha@gcc.gnu.org 2005-05-09 14:15:51
Modified files:
gcc : ChangeLog
gcc/config/arm : arm.c
Log message:
PR target/21397
* arm.c (ARM_OPT_SET_CPU, ARM_OPT_SET_ARCH, ARM_OPT_SET_TUNE): Define.
(arm_override_options): Use them instead of manifest constants. Don't
allow -march to override the -mtune setting.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8670&r2=2.8671
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&r1=1.451&r2=1.452
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] [4.0/4.1 regression] arm: -march overrides -mtune
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
` (4 preceding siblings ...)
2005-05-09 14:24 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-09 14:53 ` cvs-commit at gcc dot gnu dot org
2005-05-09 15:04 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-09 14:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-09 14:53 -------
Subject: Bug 21397
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: rearnsha@gcc.gnu.org 2005-05-09 14:53:20
Modified files:
gcc : ChangeLog
gcc/config/arm : arm.c
Log message:
PR target/21397
* arm.c (ARM_OPT_SET_CPU, ARM_OPT_SET_ARCH, ARM_OPT_SET_TUNE): Define.
(arm_override_options): Use them instead of manifest constants. Don't
allow -march to override the -mtune setting.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.232&r2=2.7592.2.233
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.430.2.1&r2=1.430.2.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/21397] [4.0/4.1 regression] arm: -march overrides -mtune
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
` (5 preceding siblings ...)
2005-05-09 14:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-09 15:04 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-05-09 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-05-09 15:04 -------
fixed
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-05-09 15:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05 11:01 [Bug target/21397] New: -march selects wrong arm_tune flags trauscher at loytec dot com
2005-05-08 23:47 ` [Bug target/21397] " rearnsha at gcc dot gnu dot org
2005-05-09 7:04 ` trauscher at loytec dot com
2005-05-09 11:23 ` [Bug target/21397] arm: -march overrides -mtune rearnsha at gcc dot gnu dot org
2005-05-09 14:13 ` [Bug target/21397] [4.0/4.1 regression] " rearnsha at gcc dot gnu dot org
2005-05-09 14:24 ` cvs-commit at gcc dot gnu dot org
2005-05-09 14:53 ` cvs-commit at gcc dot gnu dot org
2005-05-09 15:04 ` rearnsha at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).