On 11/19/20 8:35 PM, Maciej W. Rozycki wrote: > Our `ffssi2_internal' pattern and the machine FFS instruction, which > technically is a bitfield operation, match the `ctz' operation exactly, > with the result produced for the bitfield source operand of zero equal > to its width as specified with another machine instruction operand, not > directly expressed in RTL and currently hardcoded in the assembly code > produced. In our terms this is the bit size of the machine mode used, > and although it's SImode now let's be flexible for an upcoming change. > > The operation also sets the Z condition code according to the value of > the source operand. > > gcc/ > * config/vax/builtins.md (ffssi2_internal): Rename insn to... > (ctzsi2): ... this. Update the RTL operation. > (ffssi2): Update accordingly. > * gcc/config/vax/vax.c (vax_notice_update_cc): Handle CTZ. > * gcc/config/vax/vax.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro. > > gcc/testsuite/ > * gcc.target/vax/ctzsi.c: New test. OK jeff
- Re: [PATCH 10/31] VAX: Use an int iterator t... Jeff Law via Gcc-patches
- [PATCH 11/31] VAX: Correct `sync_lock_test_and_se... Maciej W. Rozycki
- Re: [PATCH 11/31] VAX: Correct `sync_lock_te... Jeff Law via Gcc-patches
- [PATCH 12/31] VAX: Actually enable `builtins.md' ... Maciej W. Rozycki
- Re: [PATCH 12/31] VAX: Actually enable `buil... Jeff Law via Gcc-patches
- [PATCH 13/31] VAX: Add a test for the SImode `ffs... Maciej W. Rozycki
- Re: [PATCH 13/31] VAX: Add a test for the SI... Jeff Law via Gcc-patches
- [PATCH 14/31] VAX: Add tests for `sync_lock_test_... Maciej W. Rozycki
- Re: [PATCH 14/31] VAX: Add tests for `sync_l... Jeff Law via Gcc-patches
- [PATCH 15/31] VAX: Provide the `ctz' operation Maciej W. Rozycki
- Re: [PATCH 15/31] VAX: Provide the `ctz' ope... Jeff Law via Gcc-patches
- [PATCH 16/31] VAX: Also provide QImode and HImode... Maciej W. Rozycki
- Re: [PATCH 16/31] VAX: Also provide QImode a... Jeff Law via Gcc-patches
- [PATCH 17/31] VAX: Actually produce QImode and HI... Maciej W. Rozycki
- Re: [PATCH 17/31] VAX: Actually produce QImo... Jeff Law via Gcc-patches
- [PATCH 18/31] VAX: Add a test for the `cpymemhi' ... Maciej W. Rozycki
- Re: [PATCH 18/31] VAX: Add a test for the `c... Jeff Law via Gcc-patches
- [PATCH 19/31] VAX: Add the `movmemhi' instruction Maciej W. Rozycki
- Re: [PATCH 19/31] VAX: Add the `movmemhi' in... Jeff Law via Gcc-patches
- [PATCH 20/31] VAX: Fix predicates and constraints... Maciej W. Rozycki
- Re: [PATCH 20/31] VAX: Fix predicates and co... Jeff Law via Gcc-patches