By: Etienne (etienne_lorrain.delete@this.yahoo.fr), February 14, 2013 6:00 am
Room: Moderated Discussions
Maynard Handley (name99.delete@this.redheron.com) on February 13, 2013 3:53 pm wrote:
> The right solution is what it has always been --- the PPC/POWER solution.
> (a) Multiple condition registers.
> ...
> (c) Compares can choose which condition register to modify.
But then you need (and do not have on PPC) complex conditional jumps in most
real world examples where you need to "jump if (R1 < R2) and (R2 < R6)".
Conditional jumps (on PPC) cannot reference multiple condition registers, so
the compiler has to set a single condition bit "if (R1 < R2) and (R2 < R6)",
so it has to only test "(R2 < R6)" if "(R1 < R2)".
I did not see a C compiler using efficiently multiple condition codes, but
I nearly only used GCC on PPC so my experience is to be taken with a pinch of salt.
Etienne.
> The right solution is what it has always been --- the PPC/POWER solution.
> (a) Multiple condition registers.
> ...
> (c) Compares can choose which condition register to modify.
But then you need (and do not have on PPC) complex conditional jumps in most
real world examples where you need to "jump if (R1 < R2) and (R2 < R6)".
Conditional jumps (on PPC) cannot reference multiple condition registers, so
the compiler has to set a single condition bit "if (R1 < R2) and (R2 < R6)",
so it has to only test "(R2 < R6)" if "(R1 < R2)".
I did not see a C compiler using efficiently multiple condition codes, but
I nearly only used GCC on PPC so my experience is to be taken with a pinch of salt.
Etienne.