This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/2732: Interaction with Solaris assembler and SPARCV9 instructions
- To: gcc-gnats at gcc dot gnu dot org
- Subject: target/2732: Interaction with Solaris assembler and SPARCV9 instructions
- From: nathan at rtfm dot net
- Date: 3 May 2001 20:01:35 -0000
- Reply-To: nathan at rtfm dot net
>Number: 2732
>Category: target
>Synopsis: Interaction with Solaris assembler and SPARCV9 instructions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 03 13:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Nathan Dorfman <nathan@rtfm.net>
>Release: 2.95.2, 2.95.3, and gcc version 3.1 20010502 (experimental)
>Organization:
>Environment:
SunOS kiev 5.7 Generic_106541-15 sun4u sparc SUNW,Ultra-5_10
>Description:
This appears to be a minor oversight, but exists on
2.95.2 and 2.95.3 release versions as well as yesterday's
cvs checkout, which I did just to test this.
If you use -mcpu=v9 (which should mean "allow SPARCV9
instruction set"), gcc will generate V9 instructions,
but will fail to tell the assembler to assemble them
(as -xarch=v9), generating the below message:
/usr/ccs/bin/as: "/var/tmp//cc9CdJR3.s", line 11: error: cannot use v8plus instructions in a non-v8plus target binary
This is the case for both C source files for which
V9 instructions are generated as well as ASM source files
which already include them.
HOWEVER: if -mcpu=ultrasparc is used, everything works
fine (as is called with -xarch=v9)...it's just that
-mcpu=v9 *should* give you the V9 instruction set.
>How-To-Repeat:
Use the attached file. Compile it with -mcpu=v9 should give
you a 'mulx' instruction. Alternatively, contact me for
a simple asm 3-liner that just uses mulx directly.
Anyway, -mcpu=v9 and -mcpu=ultrasparc will produce the
same assembler output (containing the V9 instruction mulx).
However, with -mcpu=v9 the assembly stage will fail because
as is not told to accept V9 instructions.
>Fix:
as -xarch=v9
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="multest.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="multest.c"
aW50IG1haW4oKSB7CglyZWdpc3RlciBpbnQgaSA9IDUsIGogPSAzOwoJaSAqPSBqOwp9Cg==