On Sun, May 29, 2022 at 4:00 AM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > > (clrsb:m x) > > Represents the number of redundant leading sign bits in x, represented > > as an integer of mode m, starting at the most significant bit position. > > This explanation is just what the NSA instruction (not ever emitted before) > calculates in Xtensa ISA. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (clrsbsi2): New insn pattern. > > libgcc/ChangeLog: > > * config/xtensa/lib1funcs.S (__clrsbsi2): New function. > * config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _clrsbsi2. > --- > gcc/config/xtensa/xtensa.md | 12 +++++++++++- > libgcc/config/xtensa/lib1funcs.S | 23 +++++++++++++++++++++++ > libgcc/config/xtensa/t-xtensa | 2 +- > 3 files changed, 35 insertions(+), 2 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max