Re: [PATCH, rs6000] Use CC for BCD operations [PR100736]

2022-06-17 Thread Segher Boessenkool
Hi! On Fri, Jun 17, 2022 at 04:19:37PM +0800, HAO CHEN GUI wrote: > On 16/6/2022 下午 7:24, Segher Boessenkool wrote: > > You shouldn't need anything like this, bcdinvalid will work just fine if > > written as bcdadd_ov (with vector of 0 as the second op)? > > The vector of 0 is not equal to BCD

Re: [PATCH, rs6000] Use CC for BCD operations [PR100736]

2022-06-17 Thread HAO CHEN GUI via Gcc-patches
Hi, On 16/6/2022 下午 7:24, Segher Boessenkool wrote: > There is no normal way to get at bit 3 of a CR field. We can use some > unspec though, which is total cheating but it does work, and it is > safe, albeit sometimes suboptimal. Thanks so much for your advice. I will use an unspec for setting

Re: [PATCH, rs6000] Use CC for BCD operations [PR100736]

2022-06-16 Thread Segher Boessenkool
Hi! On Thu, Jun 16, 2022 at 02:36:53PM +0800, HAO CHEN GUI wrote: > This patch uses CC instead of CCFP for all BCD operations. Thus, infinite > math flag has no impact on BCD operations. To support BCD overflow and > invalid coding, ordered and unordered are added into CC mode. This is wrong.

[PATCH, rs6000] Use CC for BCD operations [PR100736]

2022-06-16 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch uses CC instead of CCFP for all BCD operations. Thus, infinite math flag has no impact on BCD operations. To support BCD overflow and invalid coding, ordered and unordered are added into CC mode. With CC, "ge" and "le" are converted to reverse comparison. So the invalid coding