Re: [PATCH v2] RISC-V: Improve bswap8 when zbb is enabled

2025-07-21 Thread Jeff Law
On 7/17/25 7:45 AM, Dusan Stojkovic wrote: Hi Jeff, So I'm not sure this transformation is correct. Let's consider the case where a5 has the value 0x at the "li" instruction. a5 = 0xff00 li a4, -65536 // a4 = 0x srai a5,a5,32 // a5 = 0xf

[PATCH v2] RISC-V: Improve bswap8 when zbb is enabled

2025-07-17 Thread Dusan Stojkovic
Hi Jeff, >> So I'm not sure this transformation is correct. >> >> Let's consider the case where a5 has the value 0x at the >>"li" instruction. >> >> a5 = 0xff00 >> >> li a4, -65536 // a4 = 0x >> srai a5,a5,32 // a5 = 0xff00 >> and a5,a5,a4 //