From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Jeffrey Walton <noloader@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Enable one ISA for my code, and another ISA for GCC code?
Date: Wed, 15 Aug 2018 12:01:00 -0000 [thread overview]
Message-ID: <CAH6eHdQDPUpFDz64Ct9qu-dF9Dkwa8RzR18JEBx6emSJwUx_nA@mail.gmail.com> (raw)
In-Reply-To: <CAH8yC8kTieR6nz2DBa5NOF5r8RG7uOHNxr35uxz77ihk9D3o=Q@mail.gmail.com>
GCC to gnerate code for On Wed, 15 Aug 2018 at 12:55, Jeffrey Walton wrote:
>
> I'm catching a SIGILL on POWER7 ppc64-le machine. I compiled the
> source with -mcpu=power8 so I could enable some builtins I may need.
> Use of the builtins is guarded at runtime. (This is the classic distro
> model, where most source code is compiled for a minimum machine but
You haven't compiled for a minimum machine, you've compiled for POWER8
when your minimum is POWER7.
> higher ISAs are guarded at runtime).
>
> GCC converted some C code into POWER8 code. The SIGILL is happening in
> the function prologue due to use of mtfprwz. Apparently mtfprwz is a
> ISA 2.07B/POWER8 instruction.
>
> My question is, how do I tell GCC to use a different ISA than I am
> using? I need a solution for compielrs found in the field, and that
> includes GCC 4.8:
You told GCC to generate code for POWER8. If you don't want to it
generate POWER8 instructions, don't tell it to use that ISA.
Maybe you want to use the target attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
next prev parent reply other threads:[~2018-08-15 12:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 11:55 Jeffrey Walton
2018-08-15 12:01 ` Jonathan Wakely [this message]
2018-08-15 12:08 ` Jeffrey Walton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAH6eHdQDPUpFDz64Ct9qu-dF9Dkwa8RzR18JEBx6emSJwUx_nA@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=noloader@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).