On Mon, Apr 13, 2020 at 8:34 AM Bryce Cherry via Gcc <gcc@gcc.gnu.org>
wrote:

> Hello all,
>
> I'm just curious about this, but what is the percentage of (and what are
> the) unused instructions for each supported architecture under GCC?
>

I would bet that this info doesn't exist. And you would have to clarify
user vs
supervisor instructions. GCC doesn't generate any supervisor instructions.

My guess is that on a very simple RISC CPU, the percentage of user mode
instructions used is pretty high simply because there are not that many
instructions. But the more complicated CISC architectures with lots of
instructions are going to be lower because someone would have had to
write a pattern specifically to use a special instruction.

Maybe someone with broad architecture experience can comment on
which simple architecture has the most used. Intuition says a CISC
architecture like the x86, m68k, or VAX has the most unused instructions
but those have had a lot of work so we might be surprised.

Interesting question but it would take a large survey and the number of
instructions per cpu model within an architecture will vary.

A productive alternative for GCC developers is the question "which
instructions on which architectures would it be nice if GCC could take
advantage of but currently doesn't?" This one might get an answer.

--joel
RTEMS

Reply via email to