Hello again,

I have another, quick question: I have dedicated logical instructions in
my RISC machine (lt - less than, gt - greater than, ult - unsigned less
than, etc.). I'm also working on adding instructions for logical OR, AND,
NOT, XOR. While reading GCC internals, I've stumbled on this:

"Except when they appear in the condition operand of a COND_EXPR, logical
‘and’ and ‘or’ operators are simplified as follows: a = b && c becomes
T1 = (bool)b;
if (T1)
  T1 = (bool)c;
a = T1;"

I really, really don't want this. Is there any way I can define the
instructions in the .md file so the compiler generates code for computing
a boolean expression without using branches (using these dedicated insns)?

Regards,
Radu



Reply via email to