[Bug target/113030] parsecpu.awk's chkarch/chkcpu commands is broken for aliases

2024-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113030

Andrew Pinski  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |14.0

--- Comment #7 from Andrew Pinski  ---
Fixed.

[Bug target/113030] parsecpu.awk's chkarch/chkcpu commands is broken for aliases

2024-01-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113030

--- Comment #6 from GCC Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:41caf6b0d603408a829b37f7f7fb09d64d814d48

commit r14-8337-g41caf6b0d603408a829b37f7f7fb09d64d814d48
Author: Andrew Pinski 
Date:   Sat Jan 20 23:12:31 2024 -0800

arm: Fix parsecpu.awk for aliases [PR113030]

So the problem here is the 2 functions check_cpu and check_arch use
the wrong variable to check if an alias is valid for that cpu/arch.
check_cpu uses cpu_optaliases instead of cpu_opt_alias. cpu_optaliases
is an array of index'ed by the cpuname that contains all of the valid
aliases
for that cpu but cpu_opt_alias is an double index array which is index'ed
by cpuname and the alias which provides what is the alias for that option.
Similar thing happens for check_arch and arch_optaliases vs
arch_optaliases.

Tested by running:
```
awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+simd"
config/arm/arm-cpus.in
awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+neon"
config/arm/arm-cpus.in
awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+neon-vfpv3"
config/arm/arm-cpus.in
```
And they don't return error back.

gcc/ChangeLog:

PR target/113030
* config/arm/parsecpu.awk (check_cpu): Use cpu_opt_alias
instead of cpu_optaliases.
(check_arch): Use arch_opt_alias instead of arch_optaliases.

Signed-off-by: Andrew Pinski 

[Bug target/113030] parsecpu.awk's chkarch/chkcpu commands is broken for aliases

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113030

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #5 from Andrew Pinski  ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643549.html

[Bug target/113030] parsecpu.awk's chkarch/chkcpu commands is broken for aliases

2023-12-15 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113030

--- Comment #4 from Richard Earnshaw  ---
Yes, that looks sensible.  Can you post it please?

[Bug target/113030] parsecpu.awk's chkarch/chkcpu commands is broken for aliases

2023-12-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113030

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||internal-improvement
   Last reconfirmed||2023-12-15
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
Summary|ARM32: option parsing for   |parsecpu.awk's
   |--march= doesn't work for   |chkarch/chkcpu commands is
   |aliases |broken for aliases

--- Comment #3 from Andrew Pinski  ---
I tested cc1 and it works, so it is just the script which is broken.

Confirmed.  Unless you can provide an error message for cc1/gcc because that
works for me.