On Tue, 2024-12-17 at 11:27 +0800, Lulu Cheng wrote:
> 在 2024/12/16 下午9:20, Xi Ruoyao 写道:
> /* snip */
> > +;; For HImode it's a little complicated...
> > +(define_expand "rbithi"
> I didn't find rtithi's template description. Are there any test cases
> ?
No, it's not a standard name. I just used the same name as AArch64.
And due to PR50481 is unimplemented yet, there's no way to directly test
it :(.
The functionality can be tested with the existing test case,
gcc/testsuite/gcc.dg/torture/crc-coremark32-data16.c, with the next
patch (adding crc_revsi<mode>4) applied. The generated code uses the
bitrev instruction to reverse bits:
bitrev.d $r13,$r4
bitrev.w $r5,$r5
srli.d $r13,$r13,48
I.e. r5 will contain the 32-bit reversal of the original value, and r13
will contain the 16-bit reversal of r4.
This is a "dg-do run" test so the correctness is already verified at
runtime (I've ran the regression test with the entire series applied).
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University