Bug 50979 - architecture mismatch: "mul32" not enabled for "smul" or "umul"
Summary: architecture mismatch: "mul32" not enabled for "smul" or "umul"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.5.4
Assignee: Eric Botcazou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 13:53 UTC by Joel Sherrill
Modified: 2011-11-04 17:43 UTC (History)
3 users (show)

See Also:
Host:
Target: sparc-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-11-03 00:00:00


Attachments
Preprocessed source for failure case (9.17 KB, application/x-bzip)
2011-11-03 13:56 UTC, Joel Sherrill
Details
Tentative fix (204 bytes, patch)
2011-11-03 16:16 UTC, Eric Botcazou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2011-11-03 13:53:06 UTC
Revision: Thu Nov  3 12:25:34 UTC 2011 (revision 180821)
Target: sparc-rtems4.11

home2/joel/build/b-sparc-gcc/./gcc/xgcc -B/home2/joel/build/b-sparc-gcc/./gcc/ -nostdinc -B/home2/joel/build/b-sparc-gcc/sparc-rtems4.11/newlib/ -isystem /home2/joel/build/b-sparc-gcc/sparc-rtems4.11/newlib/targ-include -isystem /users/joel/test-gcc/gcc-svn/newlib/libc/include -B/users/joel/test-gcc/install-svn/sparc-rtems4.11/bin/ -B/users/joel/test-gcc/install-svn/sparc-rtems4.11/lib/ -isystem /users/joel/test-gcc/install-svn/sparc-rtems4.11/include -isystem /users/joel/test-gcc/install-svn/sparc-rtems4.11/sys-include    -g -O2 -mcpu=v8 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I/users/joel/test-gcc/gcc-svn/libgcc/../newlib/libc/sys/rtems/include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I/users/joel/test-gcc/gcc-svn/libgcc/../newlib/libc/sys/rtems/include -I. -I. -I../../.././gcc -I/users/joel/test-gcc/gcc-svn/libgcc -I/users/joel/test-gcc/gcc-svn/libgcc/. -I/users/joel/test-gcc/gcc-svn/libgcc/../gcc -I/users/joel/test-gcc/gcc-svn/libgcc/../include  -DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /users/joel/test-gcc/gcc-svn/libgcc/libgcc2.c 
/tmp/ccIMWbso.s: Assembler messages:
/tmp/ccIMWbso.s:16: Error: Hardware capability "mul32" not enabled for "smul".
/tmp/ccIMWbso.s:18: Error: Hardware capability "mul32" not enabled for "smul".
/tmp/ccIMWbso.s:22: Error: Hardware capability "mul32" not enabled for "umul".
Comment 1 Joel Sherrill 2011-11-03 13:56:07 UTC
Created attachment 25704 [details]
Preprocessed source for failure case

Preprocessed source code which trips issue.  It can be reproduced with this simplified command line.

/home2/joel/build/b-sparc-gcc/./gcc/xgcc \
   -B/home2/joel/build/b-sparc-gcc/./gcc/  \
   -mcpu=v8 -O2  \
   -c /tmp/pr50979.c
Comment 2 Rainer Orth 2011-11-03 15:00:06 UTC
Are you sure this was introduced by my libgcc series?  I'd like to avoid
hunting down unrelated issues.

The gas error was only introduced in a very recent gas (september 22nd), btw.

  Rainer
Comment 3 Joel Sherrill 2011-11-03 15:32:12 UTC
(In reply to comment #2)
> Are you sure this was introduced by my libgcc series?  I'd like to avoid
> hunting down unrelated issues.

No.  I just know it is the next breakage in the sparc. 

> The gas error was only introduced in a very recent gas (september 22nd), btw.

I am building with the binutils head.  So this is likely the cause.

Thanks.
Comment 4 Eric Botcazou 2011-11-03 16:06:42 UTC
Probably everywhere but Solaris.
Comment 5 Eric Botcazou 2011-11-03 16:16:21 UTC
Created attachment 25707 [details]
Tentative fix
Comment 6 Joel Sherrill 2011-11-03 17:06:52 UTC
(In reply to comment #5)
> Created attachment 25707 [details]
> Tentative fix

That seems to have done the trick enough to complete the build of gcc.

Please commit it.

Thanks.
Comment 7 Eric Botcazou 2011-11-04 09:28:28 UTC
> That seems to have done the trick enough to complete the build of gcc.

Great.

> Please commit it.

Let me test it a bit on Linux first.
Comment 8 Eric Botcazou 2011-11-04 17:37:09 UTC
Author: ebotcazou
Date: Fri Nov  4 17:37:03 2011
New Revision: 180966

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180966
Log:
	PR target/50979
	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sparc/sparc.h
Comment 9 Eric Botcazou 2011-11-04 17:38:34 UTC
Author: ebotcazou
Date: Fri Nov  4 17:38:29 2011
New Revision: 180968

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180968
Log:
	PR target/50979
	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/config/sparc/sparc.h
Comment 10 Eric Botcazou 2011-11-04 17:39:23 UTC
Author: ebotcazou
Date: Fri Nov  4 17:39:15 2011
New Revision: 180969

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180969
Log:
	PR target/50979
	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.

Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/config/sparc/sparc.h
Comment 11 Eric Botcazou 2011-11-04 17:43:04 UTC
In future 4.5.x, 4.6.x and 4.7 releases.