- setbc RT,BI: sets RT to 1 if CR(BI) is 1, otherwise 0.
- setnbc RT,BI: sets RT to -1 if CR(BI) is 1, otherwise 0.
Ref: PowerISA 3.1, page 129.
These instructions are particularly interesting to improve the following pattern `(src1<src2)? -1: ((src1>src2)? 1: 0)`, which can be found in `instruct cmpL3_reg_reg_ExEx()@ppc.ad`, by removing its branches.
Long.toString, that generate such pattern in getChars, has showed a good performance gain by using these new instructions.
- setnbc RT,BI: sets RT to -1 if CR(BI) is 1, otherwise 0.
Ref: PowerISA 3.1, page 129.
These instructions are particularly interesting to improve the following pattern `(src1<src2)? -1: ((src1>src2)? 1: 0)`, which can be found in `instruct cmpL3_reg_reg_ExEx()@ppc.ad`, by removing its branches.
Long.toString, that generate such pattern in getChars, has showed a good performance gain by using these new instructions.