This is the mail archive of the
mailing list for the GCC project.
Re: Comparison operations in machine description (-1 vs +1)
Den 2019-11-12 kl. 19:54, skrev Jeff Law:
On 11/12/19 11:29 AM, m wrote:
Hello gcc developers!
I am working on a new back end for my MRISC32 ISA , and I'm still very
new to gcc internals. I suspect that I will have more questions further
down the road, but let's start with this topic...
The MRISC32 ISA has instructions for setting a register based on the
outcome of a comparison. For instance:
slt s1, s2, s3
...which is equal to (in C):
int s1 = s2 < s3 ? -1 : 0;
Look at STORE_FLAG_VALUE. m68k for example works like this.
Thanks! That did the trick!