This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[patch]: make "ppc-gas -maltivec" work.
- From: matthew green <mrg at cygnus dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 14 Dec 2001 12:47:10 +1100
- Subject: [patch]: make "ppc-gas -maltivec" work.
- Organisation: Red Hat, Asia-Pacific.
hi folks.
currently `gas -maltivec' errors out that neither ppc or power
instructions have been specified. this patch sets ppc if the
cpu is otherwise not specified. (this is unrelated to my
opcodes altivec patch.)
OK to commit?
.mrg.
* config/tc-ppc.c (md_parse_option): Make -maltivec default
to generating PowerPC instructions.
Index: config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.40
diff -p -r1.40 tc-ppc.c
*** tc-ppc.c 2001/11/15 21:28:58 1.40
--- tc-ppc.c 2001/12/14 01:45:06
*************** md_parse_option (c, arg)
*** 897,903 ****
|| strcmp (arg, "7455") == 0)
ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
else if (strcmp (arg, "altivec") == 0)
! ppc_cpu |= PPC_OPCODE_ALTIVEC;
/* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
620. */
else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
--- 897,908 ----
|| strcmp (arg, "7455") == 0)
ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
else if (strcmp (arg, "altivec") == 0)
! {
! if (ppc_cpu == 0)
! ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
! else
! ppc_cpu |= PPC_OPCODE_ALTIVEC;
! }
/* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
620. */
else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)