This is the mail archive of the gcc-bugs@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]

[Bug target/71216] [4.9/5/6/7 Regression] Incorrect PPC assembly due to inserted .machine pseudo-op


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71216

--- Comment #9 from Rin Okuyama <rin at NetBSD dot org> ---
Hi Segher,

Thank you for your kind reply. I committed your fix to NetBSD's local
tree of GCC 5.4.

> > However, I have a question on this fix. How about the case where
> > "-Wa,-mXXX" option is given without "-mcpu=YYY" option specified?
> 
> That might or might not work; the user had better know what he is
> doing if he uses an assembler option.

Hmm, I understand. Is this documented explicitly anywhere?

> > This may sound pedantic to you. However, this is dangerous because
> > some special mnemonics in inline assembler codes can be misassembled.
> > In addition, for example, "-mcpu=e500" is forbidden whereas "-Wa,-me500"
> > is possible; the user cannot use instructions for e500 in inline
> > assembler codes.
> 
> GCC does not support -me500, right.  You need to configure your compiler
> for a powerpc-*-eabispe* target as far as I know (I'm no expert on this).

We use -Wa,-me500 option to compile kernel on some machines. As they
share userland with other machines, we cannot configure GCC for a
powerpc-*-eabispe* target. Instead, I found a workaround to specify
-mcpu=powerpc option. It passes -mppc option to assembler, but as it
is preceding to -me500, the latter is prior to the former.

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