This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Committed] S/390: gas: Add -march=all
- From: "Andreas Krebbel" <krebbel at linux dot vnet dot ibm dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 18 Mar 2011 10:59:33 +0100
- Subject: [Committed] S/390: gas: Add -march=all
Hi,
the attached patch adds "all" as cpu type for the S/390 backend. It
can be used in situations where the code does runtime checks in order
to make sure that an instruction can be used. 'as' in then would
reject the instruction when invoked with a lower CPU level. Having
-march=all the build machinery can override the passthrough of
-march=x from GCC by using -Wa,-march=all on the GCC command line.
We had this situation recently in glibc:
http://sources.redhat.com/ml/libc-alpha/2011-03/msg00000.html
Committed to mainline.
Bye,
-Andreas-
2011-03-18 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/tc-s390.c (md_parse_option): Add -march=all option which
switches to the highest available CPU.
Index: gas/config/tc-s390.c
===================================================================
--- gas/config/tc-s390.c.orig
+++ gas/config/tc-s390.c
@@ -398,6 +398,8 @@ md_parse_option (int c, char *arg)
current_cpu = S390_OPCODE_Z10;
else if (strcmp (arg + 5, "z196") == 0)
current_cpu = S390_OPCODE_Z196;
+ else if (strcmp (arg + 5, "all") == 0)
+ current_cpu = S390_OPCODE_MAXCPU - 1;
else
{
as_bad (_("invalid switch -m%s"), arg);