Re: Limit generated instruction set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cristian Orost <orost@xxxxxxxxx> writes:

> I am quite new to gcc but I already have a specific question.  It is
> possible to modify the gcc backend in  such a way that the set of
> target instructions is somehow limited?  Can this be configured in
> some way, or  would it be necessary to hack in the source code?

You can certainly modify a backend to adjust the generated
instructions.  You can do this in such a way that a command line
option controls whether your change is used in a particular
compilation.  You would have to hack in the source code to actually
implement this.

> For example, it should be possible (for IA32) to remove the "JG"
> (jump when greater) instruction.  It should be possible to use "JLE"
> or similar instead, without limiting the set of compilable
> programs.  Similarly, a SUB could be replaced by forming a 2's
> complement and an ADD instruction, etc.  I assume gcc must have this
> capability, since a RISC instruction is also limited in this way.

Yes, gcc is able to do this sort of thing if you change the backend to
make it happen.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux