This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Limit generated instruction set
- From: Cristian Orost <orost at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 27 Oct 2009 07:24:35 -0700 (PDT)
- Subject: Limit generated instruction set
Hi,
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?
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.
Any replies highly appreciated.
Kind regards,
Cristian