On Mon, Jan 19, 2015 at 10:43:29PM -0500, David Edelsohn wrote: > On Fri, Jan 17, 2014 at 10:58 PM, Alan Modra <amo...@gmail.com> wrote: > > This patch cures PR59828 by translating all the -mcpu options at once, > > in order, to their equivalent assembler -m options by using a new spec > > function. In the process this removes some duplication. > > ASM_CPU_SPEC is too fragile a mechanism. I would much prefer to > expand on the ".machine" directive that I added to > rs6000_file_start(). The initial implementation explicitly avoids > .machine when -mcpu= or --with-cpu= is present as a conservative > start. > > It seems much better to select a .machine directive based on the > actual target ISA flag bits enabled than translating CPU command line > options to ASM options. Patches to replace ASM_CPU_SPEC with .machine > and expand functionality for AIX are welcome.
This might make sense when looking only at gcc, but when considering the whole toolchain I think you'll run into difficulty. gas and other powerpc assemblers have always been invoked with -m options to select the cpu, so if you do away with ASM_CPU_SPEC and rely on .machine then you will be exercising the assembler in a new way. I am sure that this will not work for all powerpc assemblers currently in use. -- Alan Modra Australia Development Lab, IBM