This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] -a32 -mvle checking, Was Re: vle testcases
- From: James Lemke <jwlemke at codesourcery dot com>
- To: <binutils at sourceware dot org>
- Date: Thu, 17 May 2012 11:22:38 -0400
- Subject: [RFA] -a32 -mvle checking, Was Re: vle testcases
- References: <20120517070435.GE27540@bubble.grove.modra.org>
On 05/17/2012 03:04 AM, Alan Modra wrote:
James, we should emit an
error when -a64 -mvle, because ppc64 lacks vle relocs. Would you
please look into implementing that?
Patch attached. Ok to commit?
Jim.
--
Jim Lemke
Mentor Graphics / CodeSourcery
Orillia Ontario, +1-613-963-1073
2012-05-17 James Lemke <jwlemke@codesourcery.com>
gas/
* config/tc-ppc.c (md_parse_option): Add checks for -a32 -mvle.
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.183
diff -u -p -r1.183 tc-ppc.c
--- gas/config/tc-ppc.c 14 May 2012 19:45:23 -0000 1.183
+++ gas/config/tc-ppc.c 17 May 2012 15:04:57 -0000
@@ -1173,6 +1173,8 @@ md_parse_option (int c, char *arg)
{
#ifdef BFD64
ppc_obj64 = 1;
+ if (ppc_cpu & PPC_OPCODE_VLE)
+ as_bad (_("The use of -mvle requires -a32."));
#else
as_fatal (_("%s unsupported"), "-a64");
#endif
@@ -1188,8 +1190,13 @@ md_parse_option (int c, char *arg)
if (new_cpu != 0)
{
ppc_cpu = new_cpu;
- if (set_target_endian && target_big_endian == 0)
- as_bad (_("The use of -mvle requires big endian."));
+ if (strcmp (arg, "vle") == 0)
+ {
+ if (set_target_endian && target_big_endian == 0)
+ as_bad (_("The use of -mvle requires big endian."));
+ if (ppc_obj64)
+ as_bad (_("The use of -mvle requires -a32."));
+ }
}
else if (strcmp (arg, "regnames") == 0)