This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC -many


On Wed, Feb 15, 2017 at 1:00 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Feb 15, 2017 at 11:34:26AM +1030, Alan Modra wrote:
>> On Tue, Feb 14, 2017 at 06:38:40PM -0600, Segher Boessenkool wrote:
>> > On Wed, Feb 15, 2017 at 10:36:02AM +1030, Alan Modra wrote:
>> > > Since we've been talking about obsoleting cpu support, how about
>> > > getting rid of -many in ASM_CPU_SPEC for gcc-8?
>> >
>> > Sure, but that doesn't need advance warning to the users, does it?
>>
>> Probably not.
>>
>> > Things worked before and stay working, nothing user-visible?
>>
>> Except for bad user asm() that ought to be true.  Oh, and gcc bugs
>> like emitting power9 insns when -mcpu=power8.  You'd have some chance
>> that the assembler would complain rather than getting sigill at
>> run-time.
>
> What does gcc do when using target attribute, where one function is
> power7, another power9, then another power8?

Ideally, GCC should be emitting pseudo-op directives to the assembler
to specify the architecture level, e.g.

.machine XXX

Both at the beginning of the assembly file and at any position in the
file where the architecture level changes.

There are some challenges to ensure that the compiler is aware of the
architecture level of the generated code.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]