powerpc parse_cpu

Ryan Mansfield rmansfield@qnx.com
Tue Dec 18 01:54:00 GMT 2007


Is it an intentional requirement that -maltivec or -mspe be specified 
after the cpu type? If one specifies -mspe or -maltivec (or equivalent 
pseudo opt) before the cpu type, the altivec/spe opcode flag will be 
overridden.

For example:

$ cat foo.s
dssall
rfid
$ ntoppc-as-2.18 -mppc64 -maltivec foo.s
$ ntoppc-as-2.18 -maltivec -mppc64 foo.s
foo.s: Assembler messages:
foo.s:1: Error: Unrecognized opcode: `dssall'

In parse_cpu:

     867   else if (strcmp (arg, "altivec") == 0)
     868     {
     869       if (ppc_cpu == 0)
     870         ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | 
PPC_OPCODE_ALTIVEC;
     871       else
     872         ppc_cpu |= PPC_OPCODE_ALTIVEC;
     873     }
...
     890   else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
     891     {
     892       ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | 
PPC_OPCODE_64;
     893     }

If this is the expected behavior, is it documented anywhere?

Regards,

Ryan Mansfield



More information about the Binutils mailing list